Add bubble confirmation prompt

@ the app level if the global level is off

Test: robotests
Bug: 129068779
Change-Id: I94acb334dc9879cd372a2a0dfa8e9508fbf1c316
This commit is contained in:
Julia Reynolds
2019-04-01 11:51:21 -04:00
parent 44427259e8
commit 19e2473bed
9 changed files with 279 additions and 30 deletions

View File

@@ -52,11 +52,11 @@ public class BubbleSummaryPreferenceController extends NotificationPreferenceCon
if (mAppRow == null && mChannel == null) {
return false;
}
if (Settings.Secure.getInt(mContext.getContentResolver(),
NOTIFICATION_BUBBLES, SYSTEM_WIDE_ON) == SYSTEM_WIDE_OFF) {
return false;
}
if (mChannel != null) {
if (Settings.Secure.getInt(mContext.getContentResolver(),
NOTIFICATION_BUBBLES, SYSTEM_WIDE_ON) == SYSTEM_WIDE_OFF) {
return false;
}
if (isDefaultChannel()) {
return true;
} else {
@@ -91,7 +91,9 @@ public class BubbleSummaryPreferenceController extends NotificationPreferenceCon
if (mChannel != null) {
canBubble |= mChannel.canBubble();
} else {
canBubble |= mAppRow.allowBubbles;
canBubble |= mAppRow.allowBubbles
&& (Settings.Secure.getInt(mContext.getContentResolver(),
NOTIFICATION_BUBBLES, SYSTEM_WIDE_ON) == SYSTEM_WIDE_ON);
}
}
return mContext.getString(canBubble ? R.string.switch_on_text : R.string.switch_off_text);