Merge "Bluetooth: Make notifications local-only" am: 348a7085fa
am: 620fe71520
Change-Id: I3df0a009c7fc6184ea1176f6953748c5031d76cd
This commit is contained in:
@@ -120,7 +120,8 @@ public final class BluetoothPairingService extends Service {
|
|||||||
Notification.Builder builder = new Notification.Builder(this,
|
Notification.Builder builder = new Notification.Builder(this,
|
||||||
BLUETOOTH_NOTIFICATION_CHANNEL)
|
BLUETOOTH_NOTIFICATION_CHANNEL)
|
||||||
.setSmallIcon(android.R.drawable.stat_sys_data_bluetooth)
|
.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,
|
PendingIntent pairIntent = PendingIntent.getActivity(this, 0,
|
||||||
getPairingDialogIntent(this, intent), PendingIntent.FLAG_ONE_SHOT);
|
getPairingDialogIntent(this, intent), PendingIntent.FLAG_ONE_SHOT);
|
||||||
|
@@ -181,6 +181,7 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver {
|
|||||||
.setDeleteIntent(PendingIntent.getBroadcast(context, 0, deleteIntent, 0))
|
.setDeleteIntent(PendingIntent.getBroadcast(context, 0, deleteIntent, 0))
|
||||||
.setColor(context.getColor(
|
.setColor(context.getColor(
|
||||||
com.android.internal.R.color.system_notification_accent_color))
|
com.android.internal.R.color.system_notification_accent_color))
|
||||||
|
.setLocalOnly(true)
|
||||||
.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