diff options
Diffstat (limited to 'packages/SystemUI/src')
4 files changed, 28 insertions, 10 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java index d455cec..14f93f7 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java @@ -162,7 +162,9 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setPriority(Notification.PRIORITY_MAX) .setCategory(Notification.CATEGORY_SYSTEM) .setVisibility(Notification.VISIBILITY_PUBLIC) - .setFullScreenIntent(pendingBroadcast(ACTION_SHOW_FALLBACK_CHARGER), true); + .setFullScreenIntent(pendingBroadcast(ACTION_SHOW_FALLBACK_CHARGER), true) + .setColor(mContext.getResources().getColor( + com.android.internal.R.color.system_notification_accent_color)); final Notification n = nb.build(); if (n.headsUpContentView != null) { n.headsUpContentView.setViewVisibility(com.android.internal.R.id.right_icon, View.GONE); @@ -185,7 +187,9 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setPriority(Notification.PRIORITY_MAX) .setCategory(Notification.CATEGORY_SYSTEM) .setVisibility(Notification.VISIBILITY_PUBLIC) - .setFullScreenIntent(pendingBroadcast(ACTION_SHOW_FALLBACK_WARNING), true); + .setFullScreenIntent(pendingBroadcast(ACTION_SHOW_FALLBACK_WARNING), true) + .setColor(mContext.getResources().getColor( + com.android.internal.R.color.battery_saver_mode_color)); if (hasBatterySettings()) { nb.setContentIntent(pendingBroadcast(ACTION_SHOW_BATTERY_SETTINGS)); } @@ -214,7 +218,9 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setOngoing(true) .setShowWhen(false) .setCategory(Notification.CATEGORY_SYSTEM) - .setVisibility(Notification.VISIBILITY_PUBLIC); + .setVisibility(Notification.VISIBILITY_PUBLIC) + .setColor(mContext.getResources().getColor( + com.android.internal.R.color.battery_saver_mode_color)); addStopSaverAction(nb); if (hasSaverSettings()) { nb.setContentIntent(pendingActivity(mOpenSaverSettings)); diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java index d4c8ce3..d9fea47 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java @@ -164,7 +164,8 @@ class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Voi .setContentTitle(r.getString(R.string.screenshot_saving_title)) .setContentText(r.getString(R.string.screenshot_saving_text)) .setSmallIcon(R.drawable.stat_notify_image) - .setWhen(now); + .setWhen(now) + .setColor(r.getColor(com.android.internal.R.color.system_notification_accent_color)); mNotificationStyle = new Notification.BigPictureStyle() .bigPicture(preview); @@ -177,7 +178,9 @@ class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Voi .setContentText(r.getString(R.string.screenshot_saving_text)) .setSmallIcon(R.drawable.stat_notify_image) .setCategory(Notification.CATEGORY_PROGRESS) - .setWhen(now); + .setWhen(now) + .setColor(r.getColor( + com.android.internal.R.color.system_notification_accent_color)); mNotificationBuilder.setPublicVersion(mPublicNotificationBuilder.build()); @@ -304,7 +307,9 @@ class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Voi .setContentText(r.getString(R.string.screenshot_saved_text)) .setContentIntent(PendingIntent.getActivity(params.context, 0, launchIntent, 0)) .setWhen(now) - .setAutoCancel(true); + .setAutoCancel(true) + .setColor(r.getColor( + com.android.internal.R.color.system_notification_accent_color));; // Update the text in the public version as well mPublicNotificationBuilder @@ -312,7 +317,9 @@ class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Voi .setContentText(r.getString(R.string.screenshot_saved_text)) .setContentIntent(PendingIntent.getActivity(params.context, 0, launchIntent, 0)) .setWhen(now) - .setAutoCancel(true); + .setAutoCancel(true) + .setColor(r.getColor( + com.android.internal.R.color.system_notification_accent_color)); mNotificationBuilder.setPublicVersion(mPublicNotificationBuilder.build()); @@ -717,7 +724,9 @@ class GlobalScreenshot { .setWhen(System.currentTimeMillis()) .setVisibility(Notification.VISIBILITY_PUBLIC) // ok to show outside lockscreen .setCategory(Notification.CATEGORY_ERROR) - .setAutoCancel(true); + .setAutoCancel(true) + .setColor(context.getResources().getColor( + com.android.internal.R.color.system_notification_accent_color)); Notification n = new Notification.BigTextStyle(b) .bigText(r.getString(R.string.screenshot_failed_text)) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java index 152bfdc..32fb567 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java @@ -139,7 +139,7 @@ public class BarTransitions { mOpaque = res.getColor(R.color.system_bar_background_opaque); mSemiTransparent = res.getColor(R.color.system_bar_background_semi_transparent); mTransparent = res.getColor(R.color.system_bar_background_transparent); - mWarning = res.getColor(R.color.system_bar_background_warning); + mWarning = res.getColor(com.android.internal.R.color.battery_saver_mode_color); } mGradient = res.getDrawable(gradientResourceId); mInterpolator = new LinearInterpolator(); diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java index 481266b..dce5c37 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java @@ -309,7 +309,8 @@ public class StorageNotification extends SystemUI { pi = PendingIntent.getBroadcastAsUser(mContext, 0, intent, 0, UserHandle.CURRENT); } - + mUsbStorageNotification.color = mContext.getResources().getColor( + com.android.internal.R.color.system_notification_accent_color); mUsbStorageNotification.setLatestEventInfo(mContext, title, message, pi); mUsbStorageNotification.visibility = Notification.VISIBILITY_PUBLIC; mUsbStorageNotification.category = Notification.CATEGORY_SYSTEM; @@ -403,6 +404,8 @@ public class StorageNotification extends SystemUI { } mMediaStorageNotification.icon = icon; + mMediaStorageNotification.color = mContext.getResources().getColor( + com.android.internal.R.color.system_notification_accent_color); mMediaStorageNotification.setLatestEventInfo(mContext, title, message, pi); mMediaStorageNotification.visibility = Notification.VISIBILITY_PUBLIC; mMediaStorageNotification.category = Notification.CATEGORY_SYSTEM; |