Fix issue #3089800: adb shell am -W causes ActivityManager crash
Change-Id: I5508afeb523d84e552117f94c8b70e2bae2c33fa
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 016ddcd..86c7bdf 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -2535,7 +2535,7 @@
mWaitingActivityLaunched.add(outResult);
do {
try {
- wait();
+ mService.wait();
} catch (InterruptedException e) {
}
} while (!outResult.timeout && outResult.who == null);
@@ -2551,7 +2551,7 @@
mWaitingActivityVisible.add(outResult);
do {
try {
- wait();
+ mService.wait();
} catch (InterruptedException e) {
}
} while (!outResult.timeout && outResult.who == null);