use of com.android.settings.notification.AppBubbleListPreferenceController in project android_packages_apps_Settings by omnirom.
the class AppBubbleNotificationSettings method getPreferenceControllers.
protected static List<NotificationPreferenceController> getPreferenceControllers(Context context, AppBubbleNotificationSettings fragment, DependentFieldListener listener) {
List<NotificationPreferenceController> controllers = new ArrayList<>();
controllers.add(new HeaderPreferenceController(context, fragment));
controllers.add(new BubblePreferenceController(context, fragment != null ? fragment.getChildFragmentManager() : null, new NotificationBackend(), true, /* isAppPage */
listener));
controllers.add(new AppBubbleListPreferenceController(context, new NotificationBackend()));
return controllers;
}
use of com.android.settings.notification.AppBubbleListPreferenceController in project android_packages_apps_Settings by omnirom.
the class AppBubbleListPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
ShadowApplication shadowApplication = ShadowApplication.getInstance();
shadowApplication.setSystemService(Context.NOTIFICATION_SERVICE, mNm);
shadowApplication.setSystemService(Context.USER_SERVICE, mUm);
mContext = RuntimeEnvironment.application;
List<ConversationChannelWrapper> convoList = new ArrayList<>();
convoList.add(getConvo(-1, "default"));
convoList.add(getConvo(1, "selected"));
convoList.add(getConvo(0, "excluded"));
mConvoList = new ParceledListSlice<>(convoList);
when(mBackend.getConversations(anyString(), anyInt())).thenReturn(mConvoList);
mController = new AppBubbleListPreferenceController(mContext, mBackend);
}
Aggregations