Merge "Fix 'show badge' for pre O apps" into pi-dev am: d31c655a12
am: 11a9d03687
Change-Id: Ib81c3784e158459a06ddc58d373dd0687d9d64c6
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.settings.notification;
|
||||
|
||||
import static android.provider.Settings.Secure.NOTIFICATION_BADGING;
|
||||
|
||||
import android.app.NotificationChannel;
|
||||
import android.content.Context;
|
||||
import android.provider.Settings;
|
||||
import android.support.v7.preference.Preference;
|
||||
@@ -55,8 +56,12 @@ public class BadgePreferenceController extends NotificationPreferenceController
|
||||
NOTIFICATION_BADGING, SYSTEM_WIDE_ON) == SYSTEM_WIDE_OFF) {
|
||||
return false;
|
||||
}
|
||||
if (mChannel != null && !mAppRow.showBadge) {
|
||||
return false;
|
||||
if (mChannel != null) {
|
||||
if (NotificationChannel.DEFAULT_CHANNEL_ID.equals(mChannel.getId())) {
|
||||
return true;
|
||||
} else {
|
||||
return mAppRow.showBadge;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user