Make sure the fragment manager is passed to BubblePreferenceController
This wasn't being set always / at least for the app specific page. This CL ensures it is & makes it so that there is only 1 constructor. Fixes: 132864244 Test: make -j40 RunSettingsRoboTests ROBOTEST_FILTER=Bubble Change-Id: I9c422e75583b3091d1571cfb8cc43ec49b801599
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.settings.notification;
|
||||
|
||||
import static android.provider.Settings.Secure.NOTIFICATION_BUBBLES;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.content.Context;
|
||||
import android.provider.Settings;
|
||||
|
||||
@@ -41,11 +42,7 @@ public class BubblePreferenceController extends NotificationPreferenceController
|
||||
|
||||
private FragmentManager mFragmentManager;
|
||||
|
||||
public BubblePreferenceController(Context context, NotificationBackend backend) {
|
||||
super(context, backend);
|
||||
}
|
||||
|
||||
public BubblePreferenceController(Context context, FragmentManager fragmentManager,
|
||||
public BubblePreferenceController(Context context, @Nullable FragmentManager fragmentManager,
|
||||
NotificationBackend backend) {
|
||||
super(context, backend);
|
||||
mFragmentManager = fragmentManager;
|
||||
@@ -96,7 +93,7 @@ public class BubblePreferenceController extends NotificationPreferenceController
|
||||
mChannel.setAllowBubbles(value);
|
||||
saveChannel();
|
||||
return true;
|
||||
} else if (mAppRow != null) {
|
||||
} else if (mAppRow != null && mFragmentManager != null) {
|
||||
RestrictedSwitchPreference pref = (RestrictedSwitchPreference) preference;
|
||||
// if the global setting is off, toggling app level permission requires extra
|
||||
// confirmation
|
||||
|
Reference in New Issue
Block a user