summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adam He <adamhe@google.com> 2019-04-09 17:37:07 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-04-09 17:37:07 +0000
commit168f7e48acb828e1570cd5057023f774457f6ac5 (patch)
tree79eee593146ec31ebd5dd97bd370303a9d7a5895
parentf4cd9daf58dfade41b7d6eec9ab70f44b964bfe5 (diff)
parent5023abdf30e9b936ee04af0baa56480f9581af39 (diff)
Merge "Added documentation to note onDisconnected() should not make calls to their respective managers." into qt-dev
-rw-r--r--core/java/android/service/autofill/AutofillService.java2
-rw-r--r--core/java/android/service/autofill/augmented/AugmentedAutofillService.java3
-rw-r--r--core/java/android/service/contentcapture/ContentCaptureService.java5
3 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/service/autofill/AutofillService.java b/core/java/android/service/autofill/AutofillService.java
index 2b7e8b859f28..5a918023fdc3 100644
--- a/core/java/android/service/autofill/AutofillService.java
+++ b/core/java/android/service/autofill/AutofillService.java
@@ -674,6 +674,8 @@ public abstract class AutofillService extends Service {
* Called when the Android system disconnects from the service.
*
* <p> At this point this service may no longer be an active {@link AutofillService}.
+ * It should not make calls on {@link AutofillManager} that requires the caller to be
+ * the current service.
*/
public void onDisconnected() {
}
diff --git a/core/java/android/service/autofill/augmented/AugmentedAutofillService.java b/core/java/android/service/autofill/augmented/AugmentedAutofillService.java
index 96b861b46dd4..b00eb8a0a2e1 100644
--- a/core/java/android/service/autofill/augmented/AugmentedAutofillService.java
+++ b/core/java/android/service/autofill/augmented/AugmentedAutofillService.java
@@ -41,6 +41,7 @@ import android.util.Slog;
import android.util.SparseArray;
import android.util.TimeUtils;
import android.view.autofill.AutofillId;
+import android.view.autofill.AutofillManager;
import android.view.autofill.AutofillValue;
import android.view.autofill.IAugmentedAutofillManagerClient;
import android.view.autofill.IAutofillWindowPresenter;
@@ -183,6 +184,8 @@ public abstract class AugmentedAutofillService extends Service {
* Called when the Android system disconnects from the service.
*
* <p> At this point this service may no longer be an active {@link AugmentedAutofillService}.
+ * It should not make calls on {@link AutofillManager} that requires the caller to be
+ * the current service.
*/
public void onDisconnected() {
}
diff --git a/core/java/android/service/contentcapture/ContentCaptureService.java b/core/java/android/service/contentcapture/ContentCaptureService.java
index dc57a1591913..5be73b92fbc0 100644
--- a/core/java/android/service/contentcapture/ContentCaptureService.java
+++ b/core/java/android/service/contentcapture/ContentCaptureService.java
@@ -37,7 +37,6 @@ import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.RemoteException;
-import android.service.autofill.AutofillService;
import android.util.Log;
import android.util.Slog;
import android.util.SparseIntArray;
@@ -350,7 +349,9 @@ public abstract class ContentCaptureService extends Service {
/**
* Called when the Android system disconnects from the service.
*
- * <p> At this point this service may no longer be an active {@link AutofillService}.
+ * <p> At this point this service may no longer be an active {@link ContentCaptureService}.
+ * It should not make calls on {@link ContentCaptureManager} that requires the caller to be
+ * the current service.
*/
public void onDisconnected() {
Slog.i(TAG, "unbinding from " + getClass().getName());