summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 88a0c8f..6e94647 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -498,13 +498,11 @@ public final class ActivityManagerService extends ActivityManagerNative
@Override
public void run() {
Slog.w(TAG, "getAssistContextExtras failed: timeout retrieving from " + activity);
- synchronized (ActivityManagerService.this) {
- synchronized (this) {
- haveResult = true;
- notifyAll();
- }
- pendingAssistExtrasTimedOutLocked(this);
+ synchronized (this) {
+ haveResult = true;
+ notifyAll();
}
+ pendingAssistExtrasTimedOut(this);
}
}
@@ -10753,9 +10751,13 @@ public final class ActivityManagerService extends ActivityManagerNative
}
}
- void pendingAssistExtrasTimedOutLocked(PendingAssistExtras pae) {
- mPendingAssistExtras.remove(pae);
- if (pae.receiver != null) {
+ void pendingAssistExtrasTimedOut(PendingAssistExtras pae) {
+ IResultReceiver receiver;
+ synchronized (this) {
+ mPendingAssistExtras.remove(pae);
+ receiver = pae.receiver;
+ }
+ if (receiver != null) {
// Caller wants result sent back to them.
try {
pae.receiver.send(0, null);