App Bubble control page should always be available, even if off globally
There is API to open up the app-specific bubble page, therefor, we should always show the toggle. The previous work to move bubbles to developer settings broke this. This CL adds a param to the controller to note whether it's the app specific page or not (since controller is also used for channel settings) to enable this behaviour. Added a test for this situation. Test: make -j40 RunSettingsRoboTests ROBOTEST_FILTER=Bubble Bug: 131846917 Change-Id: I72b1f4b5b033d1b24281061cfa6bed4d734dfcb1
This commit is contained in:
@@ -41,11 +41,13 @@ public class BubblePreferenceController extends NotificationPreferenceController
|
||||
static final int SYSTEM_WIDE_OFF = 0;
|
||||
|
||||
private FragmentManager mFragmentManager;
|
||||
private boolean mIsAppPage;
|
||||
|
||||
public BubblePreferenceController(Context context, @Nullable FragmentManager fragmentManager,
|
||||
NotificationBackend backend) {
|
||||
NotificationBackend backend, boolean isAppPage) {
|
||||
super(context, backend);
|
||||
mFragmentManager = fragmentManager;
|
||||
mIsAppPage = isAppPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,7 +60,7 @@ public class BubblePreferenceController extends NotificationPreferenceController
|
||||
if (!super.isAvailable()) {
|
||||
return false;
|
||||
}
|
||||
if (!isGloballyEnabled()) {
|
||||
if (!mIsAppPage && !isGloballyEnabled()) {
|
||||
return false;
|
||||
}
|
||||
if (mChannel != null) {
|
||||
|
Reference in New Issue
Block a user