diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl index be3ded1685b74..e3862ffae1a51 100644 --- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl @@ -32,6 +32,7 @@ interface IStatusBarService void removeIcon(String slot); // ---- Methods below are for use by the status bar policy services ---- + // You need the STATUS_BAR_SERVICE permission void registerStatusBar(IStatusBar callbacks, out StatusBarIconList iconList, out List notificationKeys, out List notifications); void visibilityChanged(boolean visible); diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 2ddb6b95ad9e4..aff94531a16c0 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -908,6 +908,13 @@ android:description="@string/permdesc_statusBar" android:protectionLevel="signatureOrSystem" /> + + + Allows application to disable the status bar or add and remove system icons. + + status bar + + Allows the application to be the status bar. + expand/collapse status bar diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index aba5e05745a0e..d8e05bb1dda8c 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -2,6 +2,8 @@ package="com.android.systemui" android:sharedUserId="android.uid.system"> + + notificationKeys, List notifications) { + enforceStatusBarService(); + Slog.i(TAG, "registerStatusBar bar=" + bar); mBar = bar; synchronized (mIcons) { @@ -273,20 +280,27 @@ public class StatusBarManagerService extends IStatusBarService.Stub * the status bar is visible or not. */ public void visibilityChanged(boolean visible) { + enforceStatusBarService(); + //Slog.d(TAG, "visibilityChanged visible=" + visible); } public void onNotificationClick(String pkg, String tag, int id) { + enforceStatusBarService(); + mNotificationCallbacks.onNotificationClick(pkg, tag, id); } public void onNotificationError(String pkg, String tag, int id, String message) { - Slog.d(TAG, "onNotificationError message=" + message); + enforceStatusBarService(); + // WARNING: this will call back into us to do the remove. Don't hold any locks. mNotificationCallbacks.onNotificationError(pkg, tag, id, message); } public void onClearAllNotifications() { + enforceStatusBarService(); + mNotificationCallbacks.onClearAll(); }