Update work profile lock in Settings to latest spec

* Updated FrameLayout of work profile lock in Settings to use GlifLayout
* Removed old background image of work profile lock
* Updated text for PIN, password and pattern
* Added enterprise logo to work profile lock

Bug: 141290838
Test: Manual testing
      atest com.android.settings.password

Change-Id: Ie09974857b6c76a182a8075b9e1964a2e0af0de9
This commit is contained in:
Alex Johnston
2019-12-09 12:52:14 +00:00
parent 1772ec0040
commit 7868acfa74
13 changed files with 330 additions and 264 deletions

View File

@@ -90,8 +90,6 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
private TextView mHeaderTextView;
private TextView mDetailsTextView;
private View mLeftSpacerLandscape;
private View mRightSpacerLandscape;
// caller-supplied text for various prompts
private CharSequence mHeaderText;
@@ -100,6 +98,8 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
private AppearAnimationUtils mAppearAnimationUtils;
private DisappearAnimationUtils mDisappearAnimationUtils;
private boolean mIsManagedProfile;
// required constructor for fragments
public ConfirmLockPatternFragment() {
@@ -119,8 +119,8 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern);
mDetailsTextView = (TextView) view.findViewById(R.id.sud_layout_description);
mErrorTextView = (TextView) view.findViewById(R.id.errorText);
mLeftSpacerLandscape = view.findViewById(R.id.leftSpacer);
mRightSpacerLandscape = view.findViewById(R.id.rightSpacer);
mIsManagedProfile = UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId);
// make it so unhandled touch events within the unlock screen go to the
// lock pattern view.
@@ -325,7 +325,9 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
}
private int getDefaultHeader() {
return mFrp ? R.string.lockpassword_confirm_your_pattern_header_frp
if (mFrp) return R.string.lockpassword_confirm_your_pattern_header_frp;
return mIsManagedProfile
? R.string.lockpassword_confirm_your_work_pattern_header
: R.string.lockpassword_confirm_your_pattern_header;
}