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

Commit f8ba6a07 authored by Myles Watson's avatar Myles Watson Committed by Automerger Merge Worker
Browse files

OPP: Use a private notification am: 3d3e4d5b

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Bluetooth/+/12295156

Change-Id: Ide60703a895ccce318fae22e6972072e6f3df82b
parents 00a49027 3d3e4d5b
Loading
Loading
Loading
Loading
+28 −1
Original line number Diff line number Diff line
@@ -569,7 +569,7 @@ class BluetoothOppNotification {
                    mContext.getText(R.string.incoming_file_confirm_ok),
                    PendingIntent.getBroadcast(mContext, 0,
                            new Intent(baseIntent).setAction(Constants.ACTION_ACCEPT), 0)).build();
            Notification n =
            Notification public_n =
                    new Notification.Builder(mContext, OPP_NOTIFICATION_CHANNEL).setOnlyAlertOnce(
                            true)
                            .setOngoing(true)
@@ -596,6 +596,33 @@ class BluetoothOppNotification {
                            .setSmallIcon(R.drawable.bt_incomming_file_notification)
                            .setLocalOnly(true)
                            .build();
            Notification n =
                    new Notification.Builder(mContext, OPP_NOTIFICATION_CHANNEL).setOnlyAlertOnce(
                            true)
                            .setOngoing(true)
                            .setWhen(info.mTimeStamp)
                            .setContentIntent(PendingIntent.getBroadcast(mContext, 0,
                                    new Intent(baseIntent).setAction(
                                            Constants.ACTION_INCOMING_FILE_CONFIRM), 0))
                            .setDeleteIntent(PendingIntent.getBroadcast(mContext, 0,
                                    new Intent(baseIntent).setAction(Constants.ACTION_HIDE), 0))
                            .setColor(mContext.getResources()
                                    .getColor(
                                            com.android.internal.R.color
                                                    .system_notification_accent_color,
                                            mContext.getTheme()))
                            .setContentTitle(mContext.getText(
                                    R.string.incoming_file_confirm_Notification_title))
                            .setContentText(info.mFileName)
                            .setStyle(new Notification.BigTextStyle().bigText(mContext.getString(
                                    R.string.incoming_file_confirm_Notification_content,
                                    info.mDeviceName, info.mFileName)))
                            .setSubText(Formatter.formatFileSize(mContext, info.mTotalBytes))
                            .setSmallIcon(R.drawable.bt_incomming_file_notification)
                            .setLocalOnly(true)
                            .setVisibility(Notification.VISIBILITY_PRIVATE)
                            .setPublicVersion(public_n)
                            .build();
            mNotificationMgr.notify(NOTIFICATION_ID_PROGRESS, n);
        }
        cursor.close();