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 17 package android.view.autofill; 18 19 import java.util.List; 20 21 import android.content.Intent; 22 import android.content.IntentSender; 23 import android.graphics.Rect; 24 import android.os.IBinder; 25 import android.view.autofill.AutofillId; 26 import android.view.autofill.AutofillValue; 27 import android.view.autofill.IAutofillWindowPresenter; 28 29 /** 30 * Object running in the application process and responsible for autofilling it. 31 * 32 * @hide 33 */ 34 oneway interface IAutoFillManagerClient { 35 /** 36 * Notifies the client when the autofill enabled state changed. 37 */ 38 void setState(boolean enabled, boolean resetSession, boolean resetClient); 39 40 /** 41 * Autofills the activity with the contents of a dataset. 42 */ 43 void autofill(int sessionId, in List<AutofillId> ids, in List<AutofillValue> values); 44 45 /** 46 * Authenticates a fill response or a data set. 47 */ 48 void authenticate(int sessionId, int authenticationId, in IntentSender intent, 49 in Intent fillInIntent); 50 51 /** 52 * Sets the views to track. If saveOnAllViewsInvisible is set and all these view are invisible 53 * the session is finished automatically. 54 */ 55 void setTrackedViews(int sessionId, in @nullable AutofillId[] savableIds, 56 boolean saveOnAllViewsInvisible, in @nullable AutofillId[] fillableIds); 57 58 /** 59 * Requests showing the fill UI. 60 */ 61 void requestShowFillUi(int sessionId, in AutofillId id, int width, int height, 62 in Rect anchorBounds, in IAutofillWindowPresenter presenter); 63 64 /** 65 * Requests hiding the fill UI. 66 */ 67 void requestHideFillUi(int sessionId, in AutofillId id); 68 69 /** 70 * Notifies no fill UI will be shown. 71 */ 72 void notifyNoFillUi(int sessionId, in AutofillId id); 73 74 /** 75 * Starts the provided intent sender 76 */ 77 void startIntentSender(in IntentSender intentSender); 78 } 79