зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1550291 - Add new "Crash handler" notification channel; r=JanH
Differential Revision: https://phabricator.services.mozilla.com/D33028 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
35f5c7975e
Коммит
c9f1eb41c0
|
@ -120,6 +120,10 @@ public final class NotificationHelper implements BundleEventListener {
|
|||
* HTML5 web site notifications
|
||||
*/
|
||||
SITE_NOTIFICATIONS,
|
||||
/**
|
||||
* Crash handler notification used on Android Q+
|
||||
*/
|
||||
CRASH_HANDLER,
|
||||
}
|
||||
|
||||
// Holds the mapping between the Channel enum used by the rest of our codebase and the
|
||||
|
@ -150,6 +154,9 @@ public final class NotificationHelper implements BundleEventListener {
|
|||
|
||||
final String SITE_NOTIFICATIONS_CHANNEL_TAG = "site-notifications";
|
||||
put(Channel.SITE_NOTIFICATIONS, SITE_NOTIFICATIONS_CHANNEL_TAG);
|
||||
|
||||
final String CRASH_HANDLER_CHANNEL_TAG = "crash-handler";
|
||||
put(Channel.CRASH_HANDLER, CRASH_HANDLER_CHANNEL_TAG);
|
||||
}};
|
||||
|
||||
// These are channels we no longer require and want to retire from Android's settings UI.
|
||||
|
@ -275,6 +282,13 @@ public final class NotificationHelper implements BundleEventListener {
|
|||
}
|
||||
break;
|
||||
|
||||
case CRASH_HANDLER: {
|
||||
channel = new NotificationChannel(mDefinedNotificationChannels.get(definedChannel),
|
||||
mContext.getString(R.string.crash_handler_notifications_channel),
|
||||
NotificationManager.IMPORTANCE_HIGH);
|
||||
}
|
||||
break;
|
||||
|
||||
case DEFAULT:
|
||||
default: {
|
||||
channel = new NotificationChannel(mDefinedNotificationChannels.get(definedChannel),
|
||||
|
|
|
@ -933,3 +933,4 @@ Picture-in-picture mini window -->
|
|||
<!-- LOCALIZATION NOTE (site_notifications_channel): This is for system notifications displayed by
|
||||
web sites through the HTML Notifications API. -->
|
||||
<!ENTITY site_notifications_channel "Site notifications">
|
||||
<!ENTITY crash_handler_notifications_channel "&brandShortName; Crash Reporter">
|
||||
|
|
|
@ -668,4 +668,5 @@
|
|||
<string name="updater_notification_channel">&updater_notification_channel;</string>
|
||||
<string name="synced_tabs_notification_channel">&synced_tabs_notification_channel;</string>
|
||||
<string name="site_notifications_channel">&site_notifications_channel;</string>
|
||||
<string name="crash_handler_notifications_channel">&crash_handler_notifications_channel;</string>
|
||||
</resources>
|
||||
|
|
Загрузка…
Ссылка в новой задаче