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

Commit 6c707076 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Add filtering to notification channel settings" into sc-dev

parents 9b6ce3e0 4dc7795e
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -65,11 +65,6 @@
        android:summary="@string/promote_conversation_summary"
        settings:allowDividerAbove="true"/>

    <PreferenceCategory
        android:key="channel_advanced"
        android:order="50"
        settings:initialExpandedChildrenCount="0">

        <!-- Default ringtone -->
        <com.android.settings.notification.app.NotificationSoundPreference
            android:key="ringtone"
@@ -120,7 +115,6 @@
            android:order="18"
            android:title="@string/app_settings_link"
            settings:allowDividerAbove="true"/>
    </PreferenceCategory>

    <com.android.settings.notification.app.NotificationFooterPreference
        android:key="desc"
+4 −3
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ import android.view.View;
import android.widget.ImageView;

import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceViewHolder;

import com.android.settings.R;
@@ -67,8 +66,10 @@ public class AppBubbleListPreferenceController extends AppConversationListPrefer
            @Nullable NotificationChannel channel, @Nullable NotificationChannelGroup group,
            Drawable conversationDrawable,
            ShortcutInfo conversationInfo,
            RestrictedLockUtils.EnforcedAdmin admin) {
        super.onResume(appRow, channel, group, conversationDrawable, conversationInfo, admin);
            RestrictedLockUtils.EnforcedAdmin admin,
            List<String> preferenceFilter) {
        super.onResume(appRow, channel, group, conversationDrawable, conversationInfo, admin,
                preferenceFilter);
        // In case something changed in the foreground (e.g. via bubble button on notification)
        loadConversationsAndPopulate();
    }
+6 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.settings.notification.app;

import android.app.NotificationChannel;
import android.content.Context;
import android.util.Slog;

@@ -47,6 +48,11 @@ public class AddToHomeScreenPreferenceController extends NotificationPreferenceC
        return mConversationInfo != null;
    }

    @Override
    boolean isIncludedInFilter() {
        return mPreferenceFilter.contains(NotificationChannel.EDIT_LAUNCHER);
    }

    @Override
    public boolean handlePreferenceTreeClick(Preference preference) {
        if (KEY.equals(preference.getKey())) {
+5 −0
Original line number Diff line number Diff line
@@ -58,6 +58,11 @@ public class AllowSoundPreferenceController extends NotificationPreferenceContro

    }

    @Override
    boolean isIncludedInFilter() {
        return mPreferenceFilter.contains(NotificationChannel.EDIT_SOUND);
    }

    @Override
    public void updateState(Preference preference) {
        if (mChannel != null) {
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ public class AppBubbleNotificationSettings extends NotificationSettings implemen
        }

        for (NotificationPreferenceController controller : mControllers) {
            controller.onResume(mAppRow, null, null, null, null, mSuspendedAppsAdmin);
            controller.onResume(mAppRow, null, null, null, null, mSuspendedAppsAdmin, null);
            controller.displayPreference(getPreferenceScreen());
        }
        updatePreferenceStates();
Loading