Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 255dd042 authored by Selim Cinek's avatar Selim Cinek
Browse files

Added notification color to all system notifications

Bug: 17128331
Change-Id: I81a94510ef51b99916f314c0dd65852426a1fbeb
parent 5e85359a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1607,6 +1607,7 @@ public class Notification implements Parcelable
        builder.setPriority(this.priority);
        builder.setTicker(this.tickerText);
        builder.setNumber(this.number);
        builder.setColor(this.color);
        builder.mFlags = this.flags;
        builder.setSound(this.sound, this.audioStreamType);
        builder.setDefaults(this.defaults);
+4 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@
    <drawable name="notification_template_icon_bg">#3333B5E5</drawable>
    <drawable name="notification_template_icon_low_bg">#0cffffff</drawable>

    <color name="notification_icon_bg_color">#ffa3a3a3</color>
    <color name="notification_icon_bg_color">#ff9e9e9e</color>
    <color name="notification_action_legacy_color_filter">#ff555555</color>

    <color name="notification_media_action_bg">#00000000</color>
@@ -142,5 +142,8 @@

    <color name="accessibility_focus_highlight">#bf39b500</color>

    <color name="system_notification_accent_color">#ff607D8B</color>
    <color name="battery_saver_mode_color">#fff4511e</color><!-- deep orange 600 -->

</resources>
+2 −0
Original line number Diff line number Diff line
@@ -1984,5 +1984,7 @@
  <java-symbol type="layout" name="select_dialog_singlechoice_material" />
  <java-symbol type="layout" name="select_dialog_multichoice_material" />
  <java-symbol type="array" name="no_ems_support_sim_operators" />
  <java-symbol type="color" name="battery_saver_mode_color" />
  <java-symbol type="color" name="system_notification_accent_color" />
  <java-symbol type="dimen" name="text_handle_min_size" />
</resources>
+3 −1
Original line number Diff line number Diff line
@@ -210,6 +210,8 @@ public class GpsNetInitiatedHandler {
        // if not to popup dialog immediately, pending intent will open the dialog
        Intent intent = !mPopupImmediately ? getDlgIntent(notif) : new Intent();
        PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, intent, 0);
        mNiNotification.color = mContext.getResources().getColor(
                com.android.internal.R.color.system_notification_accent_color);
        mNiNotification.setLatestEventInfo(mContext, title, message, pi);

        notificationManager.notifyAsUser(null, notif.notificationId, mNiNotification,
+14 −4
Original line number Diff line number Diff line
@@ -124,7 +124,9 @@ final class NotificationController {
                .setContentText(printJob.getPrinterName())
                .setWhen(System.currentTimeMillis())
                .setOngoing(true)
                .setShowWhen(true);
                .setShowWhen(true)
                .setColor(mContext.getResources().getColor(
                        com.android.internal.R.color.system_notification_accent_color));
        mNotificationManager.notify(0, builder.build());
    }

@@ -140,7 +142,9 @@ final class NotificationController {
                .setContentText(printJob.getPrinterName())
                .setWhen(System.currentTimeMillis())
                .setOngoing(true)
                .setShowWhen(true);
                .setShowWhen(true)
                .setColor(mContext.getResources().getColor(
                        com.android.internal.R.color.system_notification_accent_color));
        mNotificationManager.notify(0, builder.build());
    }

@@ -154,7 +158,9 @@ final class NotificationController {
                .setContentText(printJob.getPrinterName())
                .setWhen(System.currentTimeMillis())
                .setOngoing(true)
                .setShowWhen(true);
                .setShowWhen(true)
                .setColor(mContext.getResources().getColor(
                        com.android.internal.R.color.system_notification_accent_color));
           mNotificationManager.notify(0, builder.build());
    }

@@ -166,7 +172,9 @@ final class NotificationController {
                .setContentText(printJob.getPrinterName())
                .setWhen(System.currentTimeMillis())
                .setOngoing(true)
                .setShowWhen(true);
                .setShowWhen(true)
                .setColor(mContext.getResources().getColor(
                        com.android.internal.R.color.system_notification_accent_color));
        mNotificationManager.notify(0, builder.build());
    }

@@ -198,6 +206,8 @@ final class NotificationController {

        builder.setNumber(printJobCount);
        builder.setStyle(inboxStyle);
        builder.setColor(mContext.getResources().getColor(
                com.android.internal.R.color.system_notification_accent_color));

        mNotificationManager.notify(0, builder.build());
    }
Loading