diff options
| author | Adam He <adamhe@google.com> | 2019-02-20 15:57:05 -0800 |
|---|---|---|
| committer | Adam He <adamhe@google.com> | 2019-02-20 17:13:02 -0800 |
| commit | ae93a0111d5bd8dd500f0610abd124f945858df3 (patch) | |
| tree | 3eba59e70833720800f6f45908ee23bf3c23fd9b /core/java | |
| parent | 1671308c2922a83ca0b74b324843763397331792 (diff) | |
Permanently and immediately binds the augmented autofill service.
Fixes: 124456706
Test: manual verification
Change-Id: I01a2035f405b9ed659412828de9ff08937bc673d
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/service/autofill/augmented/AugmentedAutofillService.java | 20 | ||||
| -rw-r--r-- | core/java/android/service/autofill/augmented/IAugmentedAutofillService.aidl | 3 |
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); |
