Allow to block/unblock Conversation Notifications from Settings
The user can end up in a state where the Channel of a Conversation is blocked (has an importance of 0). Currently there was no way to unblock it, because we didn't allow it from the Settings. Therefore now the option to block/unblock is added to the Conversation Settings page. Fixes: 255062535 Test: Block/Unblock a Conversation from Settings Test: Mark a notification blocked and conversation by clicking the “Show notifications” toggle and the “This is a conversation” button at once. Now unblock it from the Settings. Change-Id: I06778d259155d87d6af4bdb7013cd3b6c9a2e5ee
This commit is contained in:
@@ -25,6 +25,9 @@
|
|||||||
android:layout="@layout/settings_entity_header"
|
android:layout="@layout/settings_entity_header"
|
||||||
settings:allowDividerBelow="true"/>
|
settings:allowDividerBelow="true"/>
|
||||||
|
|
||||||
|
<com.android.settings.widget.SettingsMainSwitchPreference
|
||||||
|
android:key="block" />
|
||||||
|
|
||||||
<!-- important conversation -->
|
<!-- important conversation -->
|
||||||
<com.android.settings.notification.app.ConversationPriorityPreference
|
<com.android.settings.notification.app.ConversationPriorityPreference
|
||||||
android:key="priority"
|
android:key="priority"
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ public class ConversationNotificationSettings extends NotificationSettings {
|
|||||||
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||||
mControllers = new ArrayList<>();
|
mControllers = new ArrayList<>();
|
||||||
mControllers.add(new ConversationHeaderPreferenceController(context, this));
|
mControllers.add(new ConversationHeaderPreferenceController(context, this));
|
||||||
|
mControllers.add(new BlockPreferenceController(context, mDependentFieldListener, mBackend));
|
||||||
mControllers.add(new ConversationPriorityPreferenceController(
|
mControllers.add(new ConversationPriorityPreferenceController(
|
||||||
context, mBackend, mDependentFieldListener));
|
context, mBackend, mDependentFieldListener));
|
||||||
mControllers.add(new HighImportancePreferenceController(
|
mControllers.add(new HighImportancePreferenceController(
|
||||||
|
|||||||
Reference in New Issue
Block a user