Loading src/com/android/settings/notification/ConfigureNotificationSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,7 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { Log.i(TAG, "Preference not found: " + KEY_LOCK_SCREEN_PROFILE_NOTIFICATIONS); return; } mLockscreenProfile.setUserId(mProfileChallengeUserId); ArrayList<CharSequence> entries = new ArrayList<>(); ArrayList<CharSequence> values = new ArrayList<>(); entries.add(getString(R.string.lock_screen_notifications_summary_disable_profile)); Loading src/com/android/settings/notification/NotificationLockscreenPreference.java +18 −0 Original line number Diff line number Diff line Loading @@ -18,11 +18,14 @@ package com.android.settings.notification; import com.android.settings.R; import com.android.settings.RestrictedListPreference; import com.android.settings.Utils; import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; import android.util.AttributeSet; import android.view.View; Loading @@ -38,6 +41,7 @@ public class NotificationLockscreenPreference extends RestrictedListPreference { private Listener mListener; private boolean mShowRemoteInput; private boolean mRemoteInputCheckBoxEnabled = true; private int mUserId = UserHandle.myUserId(); public NotificationLockscreenPreference(Context context, AttributeSet attrs) { super(context, attrs); Loading @@ -47,6 +51,20 @@ public class NotificationLockscreenPreference extends RestrictedListPreference { mRemoteInputCheckBoxEnabled = enabled; } @Override protected void onClick() { final Context context = getContext(); if (!Utils.startQuietModeDialogIfNecessary(context, UserManager.get(context), mUserId)) { // Call super to create preference dialog only when work mode is on // startQuietModeDialogIfNecessary will return false if mUserId is not a managed user super.onClick(); } } public void setUserId(int userId) { mUserId = userId; } @Override protected void onPrepareDialogBuilder(AlertDialog.Builder builder, DialogInterface.OnClickListener innerListener) { Loading Loading
src/com/android/settings/notification/ConfigureNotificationSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,7 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { Log.i(TAG, "Preference not found: " + KEY_LOCK_SCREEN_PROFILE_NOTIFICATIONS); return; } mLockscreenProfile.setUserId(mProfileChallengeUserId); ArrayList<CharSequence> entries = new ArrayList<>(); ArrayList<CharSequence> values = new ArrayList<>(); entries.add(getString(R.string.lock_screen_notifications_summary_disable_profile)); Loading
src/com/android/settings/notification/NotificationLockscreenPreference.java +18 −0 Original line number Diff line number Diff line Loading @@ -18,11 +18,14 @@ package com.android.settings.notification; import com.android.settings.R; import com.android.settings.RestrictedListPreference; import com.android.settings.Utils; import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; import android.util.AttributeSet; import android.view.View; Loading @@ -38,6 +41,7 @@ public class NotificationLockscreenPreference extends RestrictedListPreference { private Listener mListener; private boolean mShowRemoteInput; private boolean mRemoteInputCheckBoxEnabled = true; private int mUserId = UserHandle.myUserId(); public NotificationLockscreenPreference(Context context, AttributeSet attrs) { super(context, attrs); Loading @@ -47,6 +51,20 @@ public class NotificationLockscreenPreference extends RestrictedListPreference { mRemoteInputCheckBoxEnabled = enabled; } @Override protected void onClick() { final Context context = getContext(); if (!Utils.startQuietModeDialogIfNecessary(context, UserManager.get(context), mUserId)) { // Call super to create preference dialog only when work mode is on // startQuietModeDialogIfNecessary will return false if mUserId is not a managed user super.onClick(); } } public void setUserId(int userId) { mUserId = userId; } @Override protected void onPrepareDialogBuilder(AlertDialog.Builder builder, DialogInterface.OnClickListener innerListener) { Loading