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

Commit 493a76e0 authored by Marie Janssen's avatar Marie Janssen Committed by android-build-merger
Browse files

Bluetooth: Make notifications local-only

am: 11383973

Change-Id: I26d09208b0425e5cdfb8317c7aa782ad0ef1fe5d
parents c1ab582f 11383973
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -120,7 +120,8 @@ public final class BluetoothPairingService extends Service {
        Notification.Builder builder = new Notification.Builder(this,
            BLUETOOTH_NOTIFICATION_CHANNEL)
                .setSmallIcon(android.R.drawable.stat_sys_data_bluetooth)
                .setTicker(res.getString(R.string.bluetooth_notif_ticker));
                .setTicker(res.getString(R.string.bluetooth_notif_ticker))
                .setLocalOnly(true);

        PendingIntent pairIntent = PendingIntent.getActivity(this, 0,
                getPairingDialogIntent(this, intent), PendingIntent.FLAG_ONE_SHOT);
+1 −0
Original line number Diff line number Diff line
@@ -181,6 +181,7 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver {
                        .setDeleteIntent(PendingIntent.getBroadcast(context, 0, deleteIntent, 0))
                        .setColor(context.getColor(
                                com.android.internal.R.color.system_notification_accent_color))
                        .setLocalOnly(true)
                        .build();

                notification.flags |= Notification.FLAG_NO_CLEAR; // Cannot be set with the builder.