diff options
| -rw-r--r-- | services/core/java/com/android/server/am/ActiveServices.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 31712becec05..6e5c0412985c 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -1940,7 +1940,9 @@ public final class ActiveServices { ActivityServiceConnectionsHolder<ConnectionRecord> activity = null; if (token != null) { activity = mAm.mAtmInternal.getServiceConnectionsHolder(token); - if (activity == null) { + // TODO(b/171280916): Remove the check after we have another API get window context + // token than getActivityToken. + if (activity == null && !mAm.mWindowManager.isWindowToken(token)) { Slog.w(TAG, "Binding with unknown activity: " + token); return 0; } |