Add list of selected/excluded convos to bubble settings

* Some changes to extend AppConversationListPrefController
* When a user removes something from the selected or
  excluded list that resets the channel setting

Bug: 148619540
Test: make -j40 RunSettingsRoboTests ROBOTEST_FILTER="Bubble"
Change-Id: I7a9ed7b70208dbdefca6c3c09d34d55c65f06408
This commit is contained in:
Mady Mellor
2020-04-17 11:24:50 -07:00
parent dcc79e9942
commit a27918494f
10 changed files with 472 additions and 35 deletions

View File

@@ -49,12 +49,15 @@ public class BubblePreferenceController extends NotificationPreferenceController
private boolean mIsAppPage;
private boolean mHasSentInvalidMsg;
private int mNumConversations;
private NotificationSettings.DependentFieldListener mListener;
public BubblePreferenceController(Context context, @Nullable FragmentManager fragmentManager,
NotificationBackend backend, boolean isAppPage) {
NotificationBackend backend, boolean isAppPage,
@Nullable NotificationSettings.DependentFieldListener listener) {
super(context, backend);
mFragmentManager = fragmentManager;
mIsAppPage = isAppPage;
mListener = listener;
}
@Override
@@ -128,6 +131,9 @@ public class BubblePreferenceController extends NotificationPreferenceController
mBackend.setAllowBubbles(mAppRow.pkg, mAppRow.uid, value);
}
}
if (mListener != null) {
mListener.onFieldValueChanged();
}
}
return true;
}