diff options
4 files changed, 11 insertions, 51 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 194638896015..a50a3b123f30 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -20,6 +20,10 @@ <!-- These resources are around just to allow their values to be customized for different hardware and product builds. --> <resources> + <!-- Component to be used as the status bar service. Must implement the IStatusBar + interface. This name is in the ComponentName flattened format (package/class) --> + <string name="config_statusBarComponent">com.android.systemui/com.android.systemui.statusbar.PhoneStatusBarService</string> + <!-- Flag indicating whether the surface flinger has limited alpha compositing functionality in hardware. If set, the window manager will disable alpha trasformation in animations where not diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index d8e05bb1dda8..74d87ba01835 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -9,13 +9,6 @@ android:label="@string/app_label" android:icon="@drawable/ic_launcher_settings"> - <receiver - android:name=".statusbar.StatusBarStarter" - > - <intent-filter> - <action android:name="com.android.internal.policy.statusbar.START" /> - </intent-filter> - </receiver> <service android:name=".statusbar.PhoneStatusBarService" android:exported="false" diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStarter.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStarter.java deleted file mode 100644 index 2b9dfb0e1da8..000000000000 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStarter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.systemui.statusbar; - -import android.content.Context; -import android.content.Intent; -import android.content.BroadcastReceiver; -import android.util.Log; - -/** - * Receive a broadcast from the StatusBarManagerService at boot time, and - * kick off the StatusBarService. - */ -public class StatusBarStarter extends BroadcastReceiver { - private static final String TAG = "StatusBarStarter"; - - @Override - public void onReceive(Context context, Intent intent) { - Log.d(TAG, "StatusBarStarter onReceive intent=" + intent); - context.startService(new Intent(context, PhoneStatusBarService.class)); - } -} - - diff --git a/services/java/com/android/server/status/StatusBarManagerService.java b/services/java/com/android/server/status/StatusBarManagerService.java index 198e36313a00..10219028ae79 100644 --- a/services/java/com/android/server/status/StatusBarManagerService.java +++ b/services/java/com/android/server/status/StatusBarManagerService.java @@ -19,6 +19,7 @@ package com.android.server.status; import android.app.PendingIntent; import android.app.StatusBarManager; import android.content.BroadcastReceiver; +import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; @@ -55,9 +56,6 @@ public class StatusBarManagerService extends IStatusBarService.Stub static final String TAG = "StatusBarManagerService"; static final boolean SPEW = true; - public static final String ACTION_STATUSBAR_START - = "com.android.internal.policy.statusbar.START"; - final Context mContext; Handler mHandler = new Handler(); NotificationCallbacks mNotificationCallbacks; @@ -112,9 +110,12 @@ public class StatusBarManagerService extends IStatusBarService.Stub } public void systemReady2() { - // Start the status bar app - Intent intent = new Intent(ACTION_STATUSBAR_START); - mContext.sendBroadcast(intent /** permission **/); + 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); } // ================================================================================ |