1 /* 2 * Copyright (C) 2018 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.graphics.Rect; 22 import android.view.autofill.AutofillId; 23 import android.view.autofill.AutofillValue; 24 import android.view.autofill.IAutofillWindowPresenter; 25 26 /** 27 * Object running in the application process and responsible to provide the functionalities 28 * required by an Augmented Autofill service. 29 * 30 * @hide 31 */ 32 interface IAugmentedAutofillManagerClient { 33 /** 34 * Gets the coordinates of the input field view. 35 */ getViewCoordinates(in AutofillId id)36 Rect getViewCoordinates(in AutofillId id); 37 38 /** 39 * Autofills the activity with the contents of the values. 40 */ autofill(int sessionId, in List<AutofillId> ids, in List<AutofillValue> values)41 void autofill(int sessionId, in List<AutofillId> ids, in List<AutofillValue> values); 42 43 /** 44 * Requests showing the fill UI. 45 */ requestShowFillUi(int sessionId, in AutofillId id, int width, int height, in Rect anchorBounds, in IAutofillWindowPresenter presenter)46 void requestShowFillUi(int sessionId, in AutofillId id, int width, int height, 47 in Rect anchorBounds, in IAutofillWindowPresenter presenter); 48 49 /** 50 * Requests hiding the fill UI. 51 */ requestHideFillUi(int sessionId, in AutofillId id)52 void requestHideFillUi(int sessionId, in AutofillId id); 53 } 54