Do not buzzing for each progress of bugreport notification

Only alert bugreport notification at the begining and end.

Bug: 146135200
Test: Manually changing the notification settings to default
      from silent.
Change-Id: Ie955266ad8a7a27a9dc74743e276b5e9c7a2d6fb
This commit is contained in:
Rhed Jao
2020-06-09 19:36:18 +08:00
parent 5c70eb259b
commit d8b3398edf

View File

@@ -1245,6 +1245,7 @@ public class BugreportProgressService extends Service {
.setContentText(content)
.setContentIntent(PendingIntent.getService(mContext, info.id, shareIntent,
PendingIntent.FLAG_UPDATE_CURRENT))
.setOnlyAlertOnce(false)
.setDeleteIntent(newCancelIntent(mContext, info));
if (!TextUtils.isEmpty(info.getName())) {
@@ -1284,6 +1285,7 @@ public class BugreportProgressService extends Service {
.setLocalOnly(true)
.setColor(context.getColor(
com.android.internal.R.color.system_notification_accent_color))
.setOnlyAlertOnce(true)
.extend(new Notification.TvExtender());
}