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 android.graphics.Rect; 20import android.os.Bundle; 21import android.os.IBinder; 22import android.service.autofill.FillEventHistory; 23import android.view.autofill.AutofillId; 24import android.view.autofill.AutofillValue; 25import android.view.autofill.IAutoFillManagerClient; 26 27/** 28 * Mediator between apps being auto-filled and auto-fill service implementations. 29 * 30 * {@hide} 31 */ 32interface IAutoFillManager { 33 // Returns flags: FLAG_ADD_CLIENT_ENABLED | FLAG_ADD_CLIENT_DEBUG | FLAG_ADD_CLIENT_VERBOSE 34 int addClient(in IAutoFillManagerClient client, int userId); 35 int startSession(IBinder activityToken, in IBinder appCallback, in AutofillId autoFillId, 36 in Rect bounds, in AutofillValue value, int userId, boolean hasCallback, int flags, 37 String packageName); 38 FillEventHistory getFillEventHistory(); 39 boolean restoreSession(int sessionId, in IBinder activityToken, in IBinder appCallback); 40 void updateSession(int sessionId, in AutofillId id, in Rect bounds, 41 in AutofillValue value, int action, int flags, int userId); 42 int updateOrRestartSession(IBinder activityToken, in IBinder appCallback, 43 in AutofillId autoFillId, in Rect bounds, in AutofillValue value, int userId, 44 boolean hasCallback, int flags, String packageName, int sessionId, int action); 45 void finishSession(int sessionId, int userId); 46 void cancelSession(int sessionId, int userId); 47 void setAuthenticationResult(in Bundle data, int sessionId, int authenticationId, int userId); 48 void setHasCallback(int sessionId, int userId, boolean hasIt); 49 void disableOwnedAutofillServices(int userId); 50 boolean isServiceSupported(int userId); 51 boolean isServiceEnabled(int userId, String packageName); 52} 53