summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-02-21 04:15:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-02-21 04:15:39 +0000
commit9868947bd0fb16b4eef55115cd4922d4d18fb42a (patch)
treefd5b4064001cce1bd2ffca64be004e1090114e66 /core/java
parent91240cec6114e7b3165aa1b205fda132fe540977 (diff)
parentae93a0111d5bd8dd500f0610abd124f945858df3 (diff)
Merge "Permanently and immediately binds the augmented autofill service."
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/service/autofill/augmented/AugmentedAutofillService.java20
-rw-r--r--core/java/android/service/autofill/augmented/IAugmentedAutofillService.aidl3
2 files changed, 22 insertions, 1 deletions
diff --git a/core/java/android/service/autofill/augmented/AugmentedAutofillService.java b/core/java/android/service/autofill/augmented/AugmentedAutofillService.java
index ce83a57bf68b..792eda764320 100644
--- a/core/java/android/service/autofill/augmented/AugmentedAutofillService.java
+++ b/core/java/android/service/autofill/augmented/AugmentedAutofillService.java
@@ -85,6 +85,18 @@ public abstract class AugmentedAutofillService extends Service {
private final IAugmentedAutofillService mInterface = new IAugmentedAutofillService.Stub() {
@Override
+ public void onConnected() {
+ mHandler.sendMessage(obtainMessage(AugmentedAutofillService::handleOnConnected,
+ AugmentedAutofillService.this));
+ }
+
+ @Override
+ public void onDisconnected() {
+ mHandler.sendMessage(obtainMessage(AugmentedAutofillService::handleOnDisconnected,
+ AugmentedAutofillService.this));
+ }
+
+ @Override
public void onFillRequest(int sessionId, IBinder client, int taskId,
ComponentName componentName, AutofillId focusedId, AutofillValue focusedValue,
long requestTime, IFillCallback callback) {
@@ -174,6 +186,14 @@ public abstract class AugmentedAutofillService extends Service {
public void onDisconnected() {
}
+ private void handleOnConnected() {
+ onConnected();
+ }
+
+ private void handleOnDisconnected() {
+ onDisconnected();
+ }
+
private void handleOnFillRequest(int sessionId, @NonNull IBinder client, int taskId,
@NonNull ComponentName componentName, @NonNull AutofillId focusedId,
@Nullable AutofillValue focusedValue, long requestTime,
diff --git a/core/java/android/service/autofill/augmented/IAugmentedAutofillService.aidl b/core/java/android/service/autofill/augmented/IAugmentedAutofillService.aidl
index fb6912ac6752..509681113c1f 100644
--- a/core/java/android/service/autofill/augmented/IAugmentedAutofillService.aidl
+++ b/core/java/android/service/autofill/augmented/IAugmentedAutofillService.aidl
@@ -31,7 +31,8 @@ import java.util.List;
* @hide
*/
oneway interface IAugmentedAutofillService {
-
+ void onConnected();
+ void onDisconnected();
void onFillRequest(int sessionId, in IBinder autofillManagerClient, int taskId,
in ComponentName activityComponent, in AutofillId focusedId,
in AutofillValue focusedValue, long requestTime, in IFillCallback callback);