summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorMiao Chou <mcchou@google.com>2015-06-26 17:14:35 -0700
committerAndre Eisenbach <eisenbach@google.com>2015-07-01 19:09:44 +0000
commit658bf2fa6d3bb1121c3c96abb62ca01d3abe95db (patch)
treed7731d3d67f19b6a78565cdedaa4cc72bd5a3e0b /services/java
parentd3ecb3e6f04a0f76c886238af6bef1d10b987a42 (diff)
downloadframeworks_base-658bf2fa6d3bb1121c3c96abb62ca01d3abe95db.zip
frameworks_base-658bf2fa6d3bb1121c3c96abb62ca01d3abe95db.tar.gz
frameworks_base-658bf2fa6d3bb1121c3c96abb62ca01d3abe95db.tar.bz2
Add BluetoothService to reduce resuming time after reboot
As a subclass of SystemService, BluetoothService wraps around BluetoothManagerService to unlock Auto-enabling Bluetooth earlier by overriding onBootPhase() and removes the need to wait for BOOT_COMPLETED message. Bug:21705209 Change-Id: I2acc41370a750d8416e11e662e06392326741d2c
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/SystemServer.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 76226b4..014527b 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -21,7 +21,6 @@ import android.app.ActivityThread;
import android.app.IAlarmManager;
import android.app.INotificationManager;
import android.app.usage.UsageStatsManagerInternal;
-import android.bluetooth.BluetoothAdapter;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
@@ -401,7 +400,6 @@ public final class SystemServer {
NetworkScoreService networkScore = null;
NsdService serviceDiscovery= null;
WindowManagerService wm = null;
- BluetoothManagerService bluetooth = null;
UsbService usb = null;
SerialService serial = null;
NetworkTimeUpdateService networkTimeUpdater = null;
@@ -508,9 +506,8 @@ public final class SystemServer {
} else if (disableBluetooth) {
Slog.i(TAG, "Bluetooth Service disabled by config");
} else {
- Slog.i(TAG, "Bluetooth Manager Service");
- bluetooth = new BluetoothManagerService(context);
- ServiceManager.addService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE, bluetooth);
+ Slog.i(TAG, "Bluetooth Service");
+ mSystemServiceManager.startService(BluetoothService.class);
}
} catch (RuntimeException e) {
Slog.e("System", "******************************************");