Added colors to system notifications

Bug: 17128331
Change-Id: I0cf0fe76a97d9dd772cd23475eddf5bdb92b2cca
This commit is contained in:
Selim Cinek
2014-08-20 14:48:42 +02:00
parent 320dc05125
commit 4ce62f3fab
2 changed files with 17 additions and 12 deletions

View File

@@ -90,7 +90,9 @@ public final class BluetoothPairingRequest extends BroadcastReceiver {
.setContentText(res.getString(R.string.bluetooth_notif_message, name))
.setContentIntent(pending)
.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)
context.getSystemService(Context.NOTIFICATION_SERVICE);

View File

@@ -130,8 +130,11 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver {
.setPriority(Notification.PRIORITY_MAX)
.setOnlyAlertOnce(false)
.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))
.setColor(context.getResources().getColor(
com.android.internal.R.color.system_notification_accent_color))
.build();
notification.flags |= Notification.FLAG_NO_CLEAR; /* cannot be set with the builder */