Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3afe367f authored by Beverly's avatar Beverly Committed by Automerger Merge Worker
Browse files

Add conversations image to People DND setting page am: e646b28e

Change-Id: I28dfa7645ad754e3fe43b89f92119a77ba5c09f8
parents fffa6d3a e646b28e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -25,6 +25,12 @@
       android:key="zen_mode_settings_category_conversations"
       android:title="@string/zen_mode_conversations_section_title">

      <!-- Senders image -->
      <com.android.settingslib.widget.LayoutPreference
          android:key="zen_mode_conversations_image"
          android:layout="@layout/zen_mode_senders_overlay_image"
          android:selectable="false"/>

      <Preference
          android:key="zen_mode_conversations"
          android:title="@string/zen_mode_conversations_title"
+9 −3
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;

import com.android.settings.R;
import com.android.settings.notification.NotificationBackend;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.core.lifecycle.Lifecycle;
@@ -47,12 +48,16 @@ public class ZenModePeopleSettings extends ZenModeSettingsBase implements Indexa
            app = null;
        }
        return buildPreferenceControllers(
                context, getSettingsLifecycle(), app, this, getFragmentManager());
                context, getSettingsLifecycle(), app, this, getFragmentManager(),
                new NotificationBackend());
    }

    private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
            Lifecycle lifecycle, Application app, Fragment host, FragmentManager fragmentManager) {
            Lifecycle lifecycle, Application app, Fragment host, FragmentManager fragmentManager,
            NotificationBackend notificationBackend) {
        List<AbstractPreferenceController> controllers = new ArrayList<>();
        controllers.add(new ZenModeConversationsImagePreferenceController(context,
                "zen_mode_conversations_image", lifecycle, notificationBackend));
        controllers.add(new ZenModeConversationsPreferenceController(context,
                "zen_mode_conversations", lifecycle));
        controllers.add(new ZenModeCallsPreferenceController(context, lifecycle,
@@ -83,7 +88,8 @@ public class ZenModePeopleSettings extends ZenModeSettingsBase implements Indexa
                @Override
                public List<AbstractPreferenceController> createPreferenceControllers(
                        Context context) {
                    return buildPreferenceControllers(context, null, null, null, null);
                    return buildPreferenceControllers(context, null, null, null,
                            null, null);
                }
            };
}