Loading src/com/android/settings/notification/AppNotificationSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ public class AppNotificationSettings extends NotificationSettingsBase { channelPref.setKey(channel.getId()); channelPref.setTitle(channel.getName()); channelPref.setChecked(channel.getImportance() != IMPORTANCE_NONE); channelPref.setMultiLine(true); if (channel.isDeleted()) { channelPref.setTitle( Loading src/com/android/settings/widget/MasterSwitchPreference.java +16 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.support.v7.preference.PreferenceViewHolder; import android.util.AttributeSet; import android.widget.CompoundButton; import android.widget.Switch; import android.widget.TextView; import com.android.settings.R; import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin; Loading @@ -34,6 +35,7 @@ public class MasterSwitchPreference extends Preference { private Switch mSwitch; private boolean mChecked; private boolean mMultiLine; public MasterSwitchPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { Loading Loading @@ -74,6 +76,12 @@ public class MasterSwitchPreference extends Preference { } }); } if (mMultiLine) { TextView textView = (TextView)holder.findViewById(android.R.id.title); if (textView != null) { textView.setSingleLine(false); } } } public boolean isChecked() { Loading @@ -97,6 +105,14 @@ public class MasterSwitchPreference extends Preference { } } public boolean isMultiLine() { return mMultiLine; } public void setMultiLine(boolean multiLine) { mMultiLine = multiLine; } /** * If admin is not null, disables the switch. * Otherwise, keep it enabled. Loading Loading
src/com/android/settings/notification/AppNotificationSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ public class AppNotificationSettings extends NotificationSettingsBase { channelPref.setKey(channel.getId()); channelPref.setTitle(channel.getName()); channelPref.setChecked(channel.getImportance() != IMPORTANCE_NONE); channelPref.setMultiLine(true); if (channel.isDeleted()) { channelPref.setTitle( Loading
src/com/android/settings/widget/MasterSwitchPreference.java +16 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.support.v7.preference.PreferenceViewHolder; import android.util.AttributeSet; import android.widget.CompoundButton; import android.widget.Switch; import android.widget.TextView; import com.android.settings.R; import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin; Loading @@ -34,6 +35,7 @@ public class MasterSwitchPreference extends Preference { private Switch mSwitch; private boolean mChecked; private boolean mMultiLine; public MasterSwitchPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { Loading Loading @@ -74,6 +76,12 @@ public class MasterSwitchPreference extends Preference { } }); } if (mMultiLine) { TextView textView = (TextView)holder.findViewById(android.R.id.title); if (textView != null) { textView.setSingleLine(false); } } } public boolean isChecked() { Loading @@ -97,6 +105,14 @@ public class MasterSwitchPreference extends Preference { } } public boolean isMultiLine() { return mMultiLine; } public void setMultiLine(boolean multiLine) { mMultiLine = multiLine; } /** * If admin is not null, disables the switch. * Otherwise, keep it enabled. Loading