diff --git a/res/drawable/ic_enterprise.xml b/res/drawable/ic_enterprise.xml
new file mode 100644
index 00000000000..c2d9df61893
--- /dev/null
+++ b/res/drawable/ic_enterprise.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout-land/confirm_lock_password.xml b/res/layout-land/confirm_lock_password.xml
index 544dd269d84..546ef67b003 100644
--- a/res/layout-land/confirm_lock_password.xml
+++ b/res/layout-land/confirm_lock_password.xml
@@ -13,81 +13,98 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
+ android:icon="@drawable/ic_enterprise"
+ android:layout="@layout/sud_glif_blank_template">
-
-
-
+
-
-
-
-
-
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
-
+ android:layout_gravity="?attr/sudGlifHeaderGravity"
+ android:src="@drawable/ic_enterprise" />
-
+
+
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginEnd="?attr/sudMarginSides" />
+
-
+
-
+
-
+
-
+
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout-land/confirm_lock_pattern.xml b/res/layout-land/confirm_lock_pattern.xml
index 6ca9be4e29d..9e6133bc349 100644
--- a/res/layout-land/confirm_lock_pattern.xml
+++ b/res/layout-land/confirm_lock_pattern.xml
@@ -13,83 +13,67 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
+ android:layout_height="match_parent"
+ android:icon="@drawable/ic_enterprise"
+ android:layout="@layout/sud_glif_blank_template">
+ android:layout_height="match_parent">
-
-
-
-
-
-
-
-
-
-
+ android:fillViewport="true">
-
+
-
+
-
+ android:layout_height="wrap_content" />
+
+ x
+
+
+
+
-
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginEnd="?attr/sudMarginSides"
+ android:layout_marginBottom="24dp"
+ android:gravity="center_vertical"/>
-
+
+
+
+
+
+
-
+ android:layout_gravity="center" />
+
+
-
+
+
diff --git a/res/layout-sw600dp/confirm_lock_password.xml b/res/layout-sw600dp/confirm_lock_password.xml
index 2bfc47084f2..3925a698417 100644
--- a/res/layout-sw600dp/confirm_lock_password.xml
+++ b/res/layout-sw600dp/confirm_lock_password.xml
@@ -14,15 +14,16 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-
+ android:layout="@layout/sud_glif_blank_template">
-
+
diff --git a/res/layout-sw600dp/confirm_lock_pattern.xml b/res/layout-sw600dp/confirm_lock_pattern.xml
index c9a3dfa2370..51af1f3d3d0 100644
--- a/res/layout-sw600dp/confirm_lock_pattern.xml
+++ b/res/layout-sw600dp/confirm_lock_pattern.xml
@@ -13,12 +13,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
+ android:layout_height="match_parent"
+ android:layout="@layout/sud_glif_blank_template">
-
-
+ android:layout_gravity="center_horizontal" />
+
diff --git a/res/layout/confirm_lock_password_base.xml b/res/layout/confirm_lock_password_base.xml
index 19a9fbb1feb..bc0c81e0921 100644
--- a/res/layout/confirm_lock_password_base.xml
+++ b/res/layout/confirm_lock_password_base.xml
@@ -13,55 +13,52 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
+ android:icon="@drawable/ic_enterprise"
+ android:layout="@layout/sud_glif_blank_template">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
-
+ android:orientation="vertical">
-
+
-
+
-
+
+
+
+
+
+
+
+
-
+
diff --git a/res/layout/confirm_lock_pattern_base.xml b/res/layout/confirm_lock_pattern_base.xml
index b02f9c06858..304185213c1 100644
--- a/res/layout/confirm_lock_pattern_base.xml
+++ b/res/layout/confirm_lock_pattern_base.xml
@@ -13,91 +13,95 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
+ android:layout_height="match_parent"
+ android:icon="@drawable/ic_enterprise"
+ android:layout="@layout/sud_glif_blank_template">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingBottom="24dp">
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 885d57caf97..968f6505206 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2086,7 +2086,7 @@
Share hotspot
- Verify it\u0027s you
+ Verify that it\u0027s you
Wi\u2011Fi password: %1$s
@@ -3969,10 +3969,16 @@
For security, set pattern
Re-enter your password
+
+ Enter your work password
Confirm your pattern
+
+ Enter your work pattern
Re-enter your PIN
+
+ Enter your work PIN
Passwords don\u2019t match
diff --git a/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
index 912b600c058..cc30a92ed51 100644
--- a/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
+++ b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
@@ -186,8 +186,6 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity {
final LockPatternUtils lockPatternUtils = new LockPatternUtils(this);
final Bundle bpBundle = new Bundle();
- mTitle = bpBundle.getString(BiometricPrompt.KEY_TITLE);
- mDetails = bpBundle.getString(BiometricPrompt.KEY_SUBTITLE);
bpBundle.putString(BiometricPrompt.KEY_TITLE, mTitle);
bpBundle.putString(BiometricPrompt.KEY_DESCRIPTION, mDetails);
bpBundle.putBoolean(BiometricPrompt.EXTRA_DISALLOW_BIOMETRICS_IF_POLICY_EXISTS,
diff --git a/src/com/android/settings/password/ConfirmDeviceCredentialBaseActivity.java b/src/com/android/settings/password/ConfirmDeviceCredentialBaseActivity.java
index a30d2e1b086..eaea2eac0e8 100644
--- a/src/com/android/settings/password/ConfirmDeviceCredentialBaseActivity.java
+++ b/src/com/android/settings/password/ConfirmDeviceCredentialBaseActivity.java
@@ -17,7 +17,6 @@
package com.android.settings.password;
import android.app.KeyguardManager;
-import android.hardware.biometrics.BiometricManager;
import android.os.Bundle;
import android.os.UserManager;
import android.util.Log;
@@ -65,7 +64,7 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
return;
}
if (UserManager.get(this).isManagedProfile(credentialOwnerUserId)) {
- setTheme(R.style.Theme_ConfirmDeviceCredentialsWork);
+ setTheme(SetupWizardUtils.getTheme(getIntent()));
mConfirmCredentialTheme = ConfirmCredentialTheme.WORK;
} else if (getIntent().getBooleanExtra(
ConfirmDeviceCredentialBaseFragment.DARK_THEME, false)) {
diff --git a/src/com/android/settings/password/ConfirmDeviceCredentialBaseFragment.java b/src/com/android/settings/password/ConfirmDeviceCredentialBaseFragment.java
index bb953a133a2..a1eb1066eca 100644
--- a/src/com/android/settings/password/ConfirmDeviceCredentialBaseFragment.java
+++ b/src/com/android/settings/password/ConfirmDeviceCredentialBaseFragment.java
@@ -140,9 +140,6 @@ public abstract class ConfirmDeviceCredentialBaseFragment extends InstrumentedFr
Utils.getUserIdFromBundle(
getActivity(),
getActivity().getIntent().getExtras(), isInternalActivity()));
- if (mUserManager.isManagedProfile(credentialOwnerUserId)) {
- setWorkChallengeBackground(view, credentialOwnerUserId);
- }
}
// User could be locked while Effective user is unlocked even though the effective owns the
diff --git a/src/com/android/settings/password/ConfirmLockPassword.java b/src/com/android/settings/password/ConfirmLockPassword.java
index 13d37498599..a62f77f8641 100644
--- a/src/com/android/settings/password/ConfirmLockPassword.java
+++ b/src/com/android/settings/password/ConfirmLockPassword.java
@@ -56,16 +56,12 @@ import java.util.ArrayList;
public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
- // The index of the array is isStrongAuth << 2 + isProfile << 1 + isAlpha.
+ // The index of the array is isStrongAuth << 1 + isAlpha.
private static final int[] DETAIL_TEXTS = new int[] {
R.string.lockpassword_confirm_your_pin_generic,
R.string.lockpassword_confirm_your_password_generic,
- R.string.lockpassword_confirm_your_pin_generic_profile,
- R.string.lockpassword_confirm_your_password_generic_profile,
R.string.lockpassword_strong_auth_required_device_pin,
- R.string.lockpassword_strong_auth_required_device_password,
- R.string.lockpassword_strong_auth_required_work_pin,
- R.string.lockpassword_strong_auth_required_work_password,
+ R.string.lockpassword_strong_auth_required_device_password
};
public static class InternalActivity extends ConfirmLockPassword {
@@ -109,6 +105,7 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
private InputMethodManager mImm;
private AppearAnimationUtils mAppearAnimationUtils;
private DisappearAnimationUtils mDisappearAnimationUtils;
+ private boolean mIsManagedProfile;
// required constructor for fragments
public ConfirmLockPasswordFragment() {
@@ -149,6 +146,8 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
mImm = (InputMethodManager) getActivity().getSystemService(
Context.INPUT_METHOD_SERVICE);
+ mIsManagedProfile = UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId);
+
Intent intent = getActivity().getIntent();
if (intent != null) {
CharSequence headerMessage = intent.getCharSequenceExtra(
@@ -205,6 +204,10 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
return mIsAlpha ? R.string.lockpassword_confirm_your_password_header_frp
: R.string.lockpassword_confirm_your_pin_header_frp;
}
+ if (mIsManagedProfile) {
+ return mIsAlpha ? R.string.lockpassword_confirm_your_work_password_header
+ : R.string.lockpassword_confirm_your_work_pin_header;
+ }
return mIsAlpha ? R.string.lockpassword_confirm_your_password_header
: R.string.lockpassword_confirm_your_pin_header;
}
@@ -215,10 +218,8 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
: R.string.lockpassword_confirm_your_pin_details_frp;
}
boolean isStrongAuthRequired = isStrongAuthRequired();
- boolean isProfile = UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId);
- // Map boolean flags to an index by isStrongAuth << 2 + isProfile << 1 + isAlpha.
- int index = ((isStrongAuthRequired ? 1 : 0) << 2) + ((isProfile ? 1 : 0) << 1)
- + (mIsAlpha ? 1 : 0);
+ // Map boolean flags to an index by isStrongAuth << 1 + isAlpha.
+ int index = ((isStrongAuthRequired ? 1 : 0) << 1) + (mIsAlpha ? 1 : 0);
return DETAIL_TEXTS[index];
}
diff --git a/src/com/android/settings/password/ConfirmLockPattern.java b/src/com/android/settings/password/ConfirmLockPattern.java
index 2f7557e6331..557eae40c5a 100644
--- a/src/com/android/settings/password/ConfirmLockPattern.java
+++ b/src/com/android/settings/password/ConfirmLockPattern.java
@@ -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;
}