summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2010-10-21 11:09:02 -0400
committerJoe Onorato <joeo@google.com>2010-10-21 15:42:34 -0400
commitf3c3c4fd14cb4185ec6df5a4355aab8b9f4039dc (patch)
tree848b4faed343c2fc72a800b0973e6fa1ebbe7d4a /services
parent10e370c68902782c17c42e92c8d5a21978442010 (diff)
downloadframeworks_base-f3c3c4fd14cb4185ec6df5a4355aab8b9f4039dc.zip
frameworks_base-f3c3c4fd14cb4185ec6df5a4355aab8b9f4039dc.tar.gz
frameworks_base-f3c3c4fd14cb4185ec6df5a4355aab8b9f4039dc.tar.bz2
Refactor SystemUI so the status bar isn't a Service of its own.
There is now one SystemUIService, which starts the status bar service. Pretty soon there will be other things running in here too. This way we don't need to have each of them started by something individually. This also moves the choice between tablet and phone status bar into SystemUI.apk, which seems like a much better place for it. Change-Id: Ib69ef2f43d648764f8dbb52008f5d036a1ee07d9
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/StatusBarManagerService.java16
-rw-r--r--services/java/com/android/server/SystemServer.java17
2 files changed, 12 insertions, 21 deletions
diff --git a/services/java/com/android/server/StatusBarManagerService.java b/services/java/com/android/server/StatusBarManagerService.java
index 1ffc0ee..400b31f 100644
--- a/services/java/com/android/server/StatusBarManagerService.java
+++ b/services/java/com/android/server/StatusBarManagerService.java
@@ -111,22 +111,6 @@ public class StatusBarManagerService extends IStatusBarService.Stub
}
// ================================================================================
- // Constructing the view
- // ================================================================================
-
- public void systemReady() {
- }
-
- public void systemReady2() {
- ComponentName cn = ComponentName.unflattenFromString(
- mContext.getString(com.android.internal.R.string.config_statusBarComponent));
- Intent intent = new Intent();
- intent.setComponent(cn);
- Slog.i(TAG, "Starting service: " + cn);
- mContext.startService(intent);
- }
-
- // ================================================================================
// From IStatusBarService
// ================================================================================
public void expand() {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index ec12e80..46797c5 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -27,9 +27,11 @@ import dalvik.system.Zygote;
import android.accounts.AccountManagerService;
import android.app.ActivityManagerNative;
import android.bluetooth.BluetoothAdapter;
+import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.ContentService;
import android.content.Context;
+import android.content.Intent;
import android.content.pm.IPackageManager;
import android.content.res.Configuration;
import android.database.ContentObserver;
@@ -502,9 +504,6 @@ class ServerThread extends Thread {
notification.systemReady();
}
- if (statusBar != null) {
- statusBar.systemReady();
- }
wm.systemReady();
// Update the configuration for this context by hand, because we're going
@@ -523,7 +522,7 @@ class ServerThread extends Thread {
}
// These are needed to propagate to the runnable below.
- final StatusBarManagerService statusBarF = statusBar;
+ final Context contextF = context;
final BatteryService batteryF = battery;
final ConnectivityService connectivityF = connectivity;
final DockObserver dockF = dock;
@@ -548,7 +547,7 @@ class ServerThread extends Thread {
public void run() {
Slog.i(TAG, "Making services ready");
- if (statusBarF != null) statusBarF.systemReady2();
+ startSystemUi(contextF);
if (batteryF != null) batteryF.systemReady();
if (connectivityF != null) connectivityF.systemReady();
if (dockF != null) dockF.systemReady();
@@ -578,6 +577,14 @@ class ServerThread extends Thread {
Looper.loop();
Slog.d(TAG, "System ServerThread is exiting!");
}
+
+ static final void startSystemUi(Context context) {
+ Intent intent = new Intent();
+ intent.setComponent(new ComponentName("com.android.systemui",
+ "com.android.systemui.SystemUIService"));
+ Slog.d(TAG, "Starting service: " + intent);
+ context.startService(intent);
+ }
}
public class SystemServer {