Merge "Allow user to hide sensitive notifications with no work challenge" into nyc-dev

This commit is contained in:
Daniel U
2016-04-08 15:44:44 +00:00
committed by Android (Google) Code Review

View File

@@ -75,9 +75,14 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment {
mContext = getActivity(); mContext = getActivity();
mProfileChallengeUserId = Utils.getManagedProfileId( mProfileChallengeUserId = Utils.getManagedProfileId(
UserManager.get(mContext), UserHandle.myUserId()); UserManager.get(mContext), UserHandle.myUserId());
mSecure = new LockPatternUtils(getActivity()).isSecure(UserHandle.myUserId());
final LockPatternUtils utils = new LockPatternUtils(getActivity());
final boolean isUnified =
!utils.isSeparateProfileChallengeEnabled(mProfileChallengeUserId);
mSecure = utils.isSecure(UserHandle.myUserId());
mSecureProfile = (mProfileChallengeUserId != UserHandle.USER_NULL) mSecureProfile = (mProfileChallengeUserId != UserHandle.USER_NULL)
&& new LockPatternUtils(getActivity()).isSecure(mProfileChallengeUserId); && (utils.isSecure(mProfileChallengeUserId) || (isUnified && mSecure));
addPreferencesFromResource(R.xml.configure_notification_settings); addPreferencesFromResource(R.xml.configure_notification_settings);