Merge "Fix build." into gingerbread
diff --git a/core/java/android/bluetooth/BluetoothDeviceProfileState.java b/core/java/android/bluetooth/BluetoothDeviceProfileState.java
index df1d960..ff82d39 100644
--- a/core/java/android/bluetooth/BluetoothDeviceProfileState.java
+++ b/core/java/android/bluetooth/BluetoothDeviceProfileState.java
@@ -516,7 +516,7 @@
                     }
                     break;
                 case DISCONNECT_A2DP_OUTGOING:
-                    processCommand(DISCONNECT_A2DP_OUTGOING);
+                    deferMessage(message);
                     break;
                 case DISCONNECT_A2DP_INCOMING:
                     // Ignore, will be handled by Bluez
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);