diff options
Diffstat (limited to 'services/java')
3 files changed, 15 insertions, 16 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index f4a5f5b..2185456 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -731,7 +731,6 @@ class ServerThread extends Thread { final StatusBarManagerService statusBarF = statusBar; final DreamManagerService dreamyF = dreamy; final InputManagerService inputManagerF = inputManager; - final BluetoothService bluetoothF = bluetooth; // We now tell the activity manager it is okay to run third party // code. It will call back into us once it has gotten to the state @@ -844,7 +843,8 @@ class ServerThread extends Thread { reportWtf("making DreamManagerService ready", e); } try { - if (inputManagerF != null) inputManagerF.systemReady(bluetoothF); + // TODO(BT) Pass parameter to input manager + if (inputManagerF != null) inputManagerF.systemReady(); } catch (Throwable e) { reportWtf("making InputManagerService ready", e); } diff --git a/services/java/com/android/server/input/InputManagerService.java b/services/java/com/android/server/input/InputManagerService.java index e7afb1a..21100e2 100644 --- a/services/java/com/android/server/input/InputManagerService.java +++ b/services/java/com/android/server/input/InputManagerService.java @@ -57,7 +57,6 @@ import android.os.Process; import android.os.RemoteException; import android.provider.Settings; import android.provider.Settings.SettingNotFoundException; -import android.server.BluetoothService; import android.util.Log; import android.util.Slog; import android.util.SparseArray; @@ -110,7 +109,6 @@ public class InputManagerService extends IInputManager.Stub implements Watchdog. private final Callbacks mCallbacks; private final InputManagerHandler mHandler; private boolean mSystemReady; - private BluetoothService mBluetoothService; private NotificationManager mNotificationManager; // Persistent data store. Must be locked each time during use. @@ -238,11 +236,11 @@ public class InputManagerService extends IInputManager.Stub implements Watchdog. updateShowTouchesFromSettings(); } - public void systemReady(BluetoothService bluetoothService) { + // TODO(BT) Pass in paramter for bluetooth system + public void systemReady() { if (DEBUG) { Slog.d(TAG, "System ready."); } - mBluetoothService = bluetoothService; mNotificationManager = (NotificationManager)mContext.getSystemService( Context.NOTIFICATION_SERVICE); mSystemReady = true; @@ -1398,9 +1396,9 @@ public class InputManagerService extends IInputManager.Stub implements Watchdog. // Native callback. private String getDeviceAlias(String uniqueId) { - if (mBluetoothService != null && - BluetoothAdapter.checkBluetoothAddress(uniqueId)) { - return mBluetoothService.getRemoteAlias(uniqueId); + if (BluetoothAdapter.checkBluetoothAddress(uniqueId)) { + // TODO(BT) mBluetoothService.getRemoteAlias(uniqueId) + return null; } return null; } diff --git a/services/java/com/android/server/power/ShutdownThread.java b/services/java/com/android/server/power/ShutdownThread.java index 5715151..a3770d7 100644 --- a/services/java/com/android/server/power/ShutdownThread.java +++ b/services/java/com/android/server/power/ShutdownThread.java @@ -325,6 +325,9 @@ public final class ShutdownThread extends Thread { } } + // Shutdown radios. + shutdownRadios(MAX_RADIO_WAIT_TIME); + // Shutdown MountService to ensure media is in a safe state IMountShutdownObserver observer = new IMountShutdownObserver.Stub() { public void onShutDownComplete(int statusCode) throws RemoteException { @@ -381,9 +384,9 @@ public final class ShutdownThread extends Thread { INfcAdapter.Stub.asInterface(ServiceManager.checkService("nfc")); final ITelephony phone = ITelephony.Stub.asInterface(ServiceManager.checkService("phone")); - final IBluetooth bluetooth = - IBluetooth.Stub.asInterface(ServiceManager.checkService( - BluetoothAdapter.BLUETOOTH_SERVICE)); + final IBluetoothManager bluetooth = + IBluetoothManager.Stub.asInterface(ServiceManager.checkService( + BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE)); try { nfcOff = nfc == null || @@ -398,8 +401,7 @@ public final class ShutdownThread extends Thread { } try { - bluetoothOff = bluetooth == null || - bluetooth.getBluetoothState() == BluetoothAdapter.STATE_OFF; + bluetoothOff = bluetooth == null || !bluetooth.isEnabled(); if (!bluetoothOff) { Log.w(TAG, "Disabling Bluetooth..."); bluetooth.disable(false); // disable but don't persist new state @@ -425,8 +427,7 @@ public final class ShutdownThread extends Thread { while (SystemClock.elapsedRealtime() < endTime) { if (!bluetoothOff) { try { - bluetoothOff = - bluetooth.getBluetoothState() == BluetoothAdapter.STATE_OFF; + bluetoothOff = !bluetooth.isEnabled(); } catch (RemoteException ex) { Log.e(TAG, "RemoteException during bluetooth shutdown", ex); bluetoothOff = true; |