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

am: 9f4ad67

* commit '9f4ad67fad34331aecbdabd4a0193038fa0e9f79':
  Allow user to hide sensitive notifications with no work challenge

Change-Id: I80943b49439532bdb676825ac9a8ee5bc7088b11
This commit is contained in:
Daniel U
2016-04-08 15:51:13 +00:00
committed by android-build-merger

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);