Added colors to system notifications
Bug: 17128331 Change-Id: I0cf0fe76a97d9dd772cd23475eddf5bdb92b2cca
This commit is contained in:
@@ -90,7 +90,9 @@ public final class BluetoothPairingRequest extends BroadcastReceiver {
|
|||||||
.setContentText(res.getString(R.string.bluetooth_notif_message, name))
|
.setContentText(res.getString(R.string.bluetooth_notif_message, name))
|
||||||
.setContentIntent(pending)
|
.setContentIntent(pending)
|
||||||
.setAutoCancel(true)
|
.setAutoCancel(true)
|
||||||
.setDefaults(Notification.DEFAULT_SOUND);
|
.setDefaults(Notification.DEFAULT_SOUND)
|
||||||
|
.setColor(res.getColor(
|
||||||
|
com.android.internal.R.color.system_notification_accent_color));
|
||||||
|
|
||||||
NotificationManager manager = (NotificationManager)
|
NotificationManager manager = (NotificationManager)
|
||||||
context.getSystemService(Context.NOTIFICATION_SERVICE);
|
context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
|
@@ -130,8 +130,11 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver {
|
|||||||
.setPriority(Notification.PRIORITY_MAX)
|
.setPriority(Notification.PRIORITY_MAX)
|
||||||
.setOnlyAlertOnce(false)
|
.setOnlyAlertOnce(false)
|
||||||
.setDefaults(Notification.DEFAULT_ALL)
|
.setDefaults(Notification.DEFAULT_ALL)
|
||||||
.setContentIntent(PendingIntent.getActivity(context, 0, connectionAccessIntent, 0))
|
.setContentIntent(PendingIntent.getActivity(context, 0,
|
||||||
|
connectionAccessIntent, 0))
|
||||||
.setDeleteIntent(PendingIntent.getBroadcast(context, 0, deleteIntent, 0))
|
.setDeleteIntent(PendingIntent.getBroadcast(context, 0, deleteIntent, 0))
|
||||||
|
.setColor(context.getResources().getColor(
|
||||||
|
com.android.internal.R.color.system_notification_accent_color))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
notification.flags |= Notification.FLAG_NO_CLEAR; /* cannot be set with the builder */
|
notification.flags |= Notification.FLAG_NO_CLEAR; /* cannot be set with the builder */
|
||||||
|
Reference in New Issue
Block a user