Merge "Use checkboxes on notification settings pages"

This commit is contained in:
Julia Reynolds
2018-01-25 23:46:13 +00:00
committed by Android (Google) Code Review
3 changed files with 29 additions and 5 deletions

View File

@@ -30,6 +30,7 @@ import com.android.settings.applications.LayoutPreference;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.search.Indexable;
import com.android.settings.widget.MasterCheckBoxPreference;
import com.android.settings.widget.MasterSwitchPreference;
import com.android.settings.widget.SwitchBar;
import com.android.settings.wrapper.NotificationChannelGroupWrapper;
@@ -277,9 +278,9 @@ abstract public class NotificationSettingsBase extends DashboardFragment {
protected Preference populateSingleChannelPrefs(PreferenceGroup parent,
final NotificationChannel channel, final boolean groupBlocked) {
MasterSwitchPreference channelPref = new MasterSwitchPreference(
MasterCheckBoxPreference channelPref = new MasterCheckBoxPreference(
getPrefContext());
channelPref.setSwitchEnabled(mSuspendedAppsAdmin == null
channelPref.setCheckBoxEnabled(mSuspendedAppsAdmin == null
&& isChannelBlockable(channel)
&& isChannelConfigurable(channel)
&& !groupBlocked);