IAutoFillManager.aidl revision 49f08edf7d08101dfc00920f2abb1dab2280cd7e
1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.view.autofill;
18
19import java.util.List;
20
21import android.content.ComponentName;
22import android.graphics.Rect;
23import android.os.Bundle;
24import android.os.IBinder;
25import android.os.RemoteCallback;
26import android.service.autofill.FillEventHistory;
27import android.service.autofill.UserData;
28import android.view.autofill.AutofillId;
29import android.view.autofill.AutofillValue;
30import android.view.autofill.IAutoFillManagerClient;
31
32/**
33 * Mediator between apps being auto-filled and auto-fill service implementations.
34 *
35 * {@hide}
36 */
37interface IAutoFillManager {
38    // Returns flags: FLAG_ADD_CLIENT_ENABLED | FLAG_ADD_CLIENT_DEBUG | FLAG_ADD_CLIENT_VERBOSE
39    int addClient(in IAutoFillManagerClient client, int userId);
40    void removeClient(in IAutoFillManagerClient client, int userId);
41    int startSession(IBinder activityToken, in IBinder appCallback, in AutofillId autoFillId,
42            in Rect bounds, in AutofillValue value, int userId, boolean hasCallback, int flags,
43            in ComponentName componentName, boolean compatMode);
44    FillEventHistory getFillEventHistory();
45    boolean restoreSession(int sessionId, in IBinder activityToken, in IBinder appCallback);
46    void updateSession(int sessionId, in AutofillId id, in Rect bounds,
47            in AutofillValue value, int action, int flags, int userId);
48    int updateOrRestartSession(IBinder activityToken, in IBinder appCallback,
49            in AutofillId autoFillId, in Rect bounds, in AutofillValue value, int userId,
50            boolean hasCallback, int flags, in ComponentName componentName, int sessionId,
51            int action, boolean compatMode);
52    void setAutofillFailure(int sessionId, in List<AutofillId> ids, int userId);
53    void finishSession(int sessionId, int userId);
54    void cancelSession(int sessionId, int userId);
55    void setAuthenticationResult(in Bundle data, int sessionId, int authenticationId, int userId);
56    void setHasCallback(int sessionId, int userId, boolean hasIt);
57    void disableOwnedAutofillServices(int userId);
58    boolean isServiceSupported(int userId);
59    boolean isServiceEnabled(int userId, String packageName);
60    void onPendingSaveUi(int operation, IBinder token);
61    UserData getUserData();
62    String getUserDataId();
63    void setUserData(in UserData userData);
64    boolean isFieldClassificationEnabled();
65    ComponentName getAutofillServiceComponentName();
66    String[] getAvailableFieldClassificationAlgorithms();
67    String getDefaultFieldClassificationAlgorithm();
68}
69