blob: 1d66f7f7f4633cc03940afa81cea23b9ab9e1e9e [file] [log] [blame]
Felipe Leme29a5b0d2016-10-25 14:57:11 -07001/*
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
Svet Ganov782043c2017-02-11 00:52:02 +000017package android.view.autofill;
Felipe Leme29a5b0d2016-10-25 14:57:11 -070018
19import java.util.List;
20
Svet Ganov0f4928f2017-02-02 20:02:51 -080021import android.content.Intent;
22import android.content.IntentSender;
Felipe Leme4753bb02017-03-22 20:24:00 -070023import android.graphics.Rect;
Felipe Lemee6010f22017-03-03 11:19:51 -080024import android.os.IBinder;
Felipe Leme640f30a2017-03-06 15:44:06 -080025import android.view.autofill.AutofillId;
26import android.view.autofill.AutofillValue;
Felipe Leme4753bb02017-03-22 20:24:00 -070027import android.view.autofill.IAutofillWindowPresenter;
Felipe Leme6d553872016-12-08 17:13:25 -080028
Felipe Leme29a5b0d2016-10-25 14:57:11 -070029/**
Felipe Leme640f30a2017-03-06 15:44:06 -080030 * Object running in the application process and responsible for autofilling it.
Felipe Leme436ab6a2016-12-15 11:56:15 -080031 *
Felipe Leme29a5b0d2016-10-25 14:57:11 -070032 * @hide
33 */
Svet Ganov782043c2017-02-11 00:52:02 +000034oneway interface IAutoFillManagerClient {
35 /**
Felipe Leme640f30a2017-03-06 15:44:06 -080036 * Notifies the client when the autofill enabled state changed.
Svet Ganov782043c2017-02-11 00:52:02 +000037 */
Svet Ganov48f10a22017-04-26 18:49:30 -070038 void setState(boolean enabled, boolean resetSession, boolean resetClient);
Svet Ganov782043c2017-02-11 00:52:02 +000039
Felipe Leme436ab6a2016-12-15 11:56:15 -080040 /**
Felipe Leme640f30a2017-03-06 15:44:06 -080041 * Autofills the activity with the contents of a dataset.
Felipe Leme436ab6a2016-12-15 11:56:15 -080042 */
Philip P. Moltmann134cee22017-05-06 11:28:38 -070043 void autofill(int sessionId, in List<AutofillId> ids, in List<AutofillValue> values);
Svet Ganov0f4928f2017-02-02 20:02:51 -080044
45 /**
Svet Ganov782043c2017-02-11 00:52:02 +000046 * Authenticates a fill response or a data set.
Svet Ganov0f4928f2017-02-02 20:02:51 -080047 */
Svetoslav Ganova9379d02017-05-09 17:40:24 -070048 void authenticate(int sessionId, int authenticationId, in IntentSender intent,
49 in Intent fillInIntent);
Felipe Lemee6010f22017-03-03 11:19:51 -080050
51 /**
Philip P. Moltmann494c3f52017-04-11 10:13:33 -070052 * 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 List<AutofillId> ids,
56 boolean saveOnAllViewsInvisible);
57
58 /**
Felipe Leme4753bb02017-03-22 20:24:00 -070059 * Requests showing the fill UI.
Felipe Lemee6010f22017-03-03 11:19:51 -080060 */
Philip P. Moltmann134cee22017-05-06 11:28:38 -070061 void requestShowFillUi(int sessionId, in AutofillId id, int width, int height,
62 in Rect anchorBounds, in IAutofillWindowPresenter presenter);
Felipe Leme4753bb02017-03-22 20:24:00 -070063
64 /**
65 * Requests hiding the fill UI.
66 */
Philip P. Moltmann134cee22017-05-06 11:28:38 -070067 void requestHideFillUi(int sessionId, in AutofillId id);
Felipe Leme4753bb02017-03-22 20:24:00 -070068
69 /**
Svet Ganovc3d1c852017-04-12 22:34:28 -070070 * Notifies no fill UI will be shown.
Felipe Leme4753bb02017-03-22 20:24:00 -070071 */
Philip P. Moltmann134cee22017-05-06 11:28:38 -070072 void notifyNoFillUi(int sessionId, in AutofillId id);
Svet Ganovc3d1c852017-04-12 22:34:28 -070073
74 /**
75 * Starts the provided intent sender
76 */
77 void startIntentSender(in IntentSender intentSender);
Felipe Leme29a5b0d2016-10-25 14:57:11 -070078}