Merge "Fix deadlock when create alert window notification" into oc-dev am: 678477b383 am: 59cd5a98dc

am: 3692e73964

Change-Id: I73608ceef0c56bf08eff107fe0186c581dcadd0d
This commit is contained in:
Wale Ogunwale
2017-06-09 13:31:15 +00:00
committed by android-build-merger

View File

@@ -63,12 +63,6 @@ class AlertWindowNotification {
mNotificationTag = CHANNEL_PREFIX + mPackageName;
mRequestCode = sNextRequestCode++;
mIconUtilities = new IconUtilities(mService.mContext);
if (sChannelGroup == null) {
sChannelGroup = new NotificationChannelGroup(CHANNEL_PREFIX,
mService.mContext.getString(
R.string.alert_windows_notification_channel_group_name));
mNotificationManager.createNotificationChannelGroup(sChannelGroup);
}
}
void post() {
@@ -143,6 +137,13 @@ class AlertWindowNotification {
}
private void createNotificationChannel(Context context, String appName) {
if (sChannelGroup == null) {
sChannelGroup = new NotificationChannelGroup(CHANNEL_PREFIX,
mService.mContext.getString(
R.string.alert_windows_notification_channel_group_name));
mNotificationManager.createNotificationChannelGroup(sChannelGroup);
}
final String nameChannel =
context.getString(R.string.alert_windows_notification_channel_name, appName);
final NotificationChannel channel =