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

Commit fd2d47b7 authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge "Colored notifications" into lmp-dev

parents f965ba37 cb39c9d2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -314,6 +314,8 @@ class BluetoothOppNotification {
            // Build the notification object
            // TODO: split description into two rows with filename in second row
            Notification.Builder b = new Notification.Builder(mContext);
            b.setColor(mContext.getResources().getColor(
                    com.android.internal.R.color.system_notification_accent_color));
            b.setContentTitle(item.description);
            b.setContentInfo(
                    BluetoothOppUtility.formatProgressText(item.totalTotal, item.totalCurrent));
@@ -403,6 +405,8 @@ class BluetoothOppNotification {
                    outboundFailNumber);
            intent = new Intent(Constants.ACTION_OPEN_OUTBOUND_TRANSFER);
            intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName());
            outNoti.color = mContext.getResources().getColor(
                    com.android.internal.R.color.system_notification_accent_color);
            outNoti.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(
                    mContext, 0, intent, 0));
            intent = new Intent(Constants.ACTION_COMPLETE_HIDE);
@@ -450,6 +454,8 @@ class BluetoothOppNotification {
                    inboundFailNumber);
            intent = new Intent(Constants.ACTION_OPEN_INBOUND_TRANSFER);
            intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName());
            inNoti.color = mContext.getResources().getColor(
                    com.android.internal.R.color.system_notification_accent_color);
            inNoti.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(
                    mContext, 0, intent, 0));
            intent = new Intent(Constants.ACTION_COMPLETE_HIDE);
@@ -494,6 +500,8 @@ class BluetoothOppNotification {
            intent.setDataAndNormalize(contentUri);

            n.when = timeStamp;
            n.color = mContext.getResources().getColor(
                    com.android.internal.R.color.system_notification_accent_color);
            n.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(mContext, 0,
                    intent, 0));

+2 −0
Original line number Diff line number Diff line
@@ -765,6 +765,8 @@ public class BluetoothPbapService extends Service {
            deleteIntent.setAction(AUTH_CANCELLED_ACTION);
            notification = new Notification(android.R.drawable.stat_sys_data_bluetooth,
                getString(R.string.auth_notif_ticker), System.currentTimeMillis());
            notification.color = getResources().getColor(
                    com.android.internal.R.color.system_notification_accent_color);
            notification.setLatestEventInfo(this, getString(R.string.auth_notif_title),
                    getString(R.string.auth_notif_message, name), PendingIntent
                            .getActivity(this, 0, clickIntent, 0));