Merge "Fix emergency button not visible on pattern work challenge screen" into udc-dev am: 01b382546e
am: e86146d685
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23631338 Change-Id: I82b44ce36153a64d37629f40dc8c7805c17847a6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -29,8 +29,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancelButton"
|
||||
@@ -87,6 +86,7 @@
|
||||
android:paddingStart="?attr/sudMarginStart"
|
||||
android:paddingEnd="?attr/sudMarginEnd"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<Button
|
||||
@@ -96,8 +96,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginStart"
|
||||
android:layout_marginEnd="?attr/sudMarginEnd"
|
||||
android:layout_marginTop="60dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/work_challenge_emergency_button_text"/>
|
||||
|
@@ -61,6 +61,7 @@
|
||||
android:layout_marginStart="?attr/sudMarginStart"
|
||||
android:layout_marginEnd="?attr/sudMarginEnd"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<CheckBox
|
||||
|
@@ -17,9 +17,7 @@
|
||||
package com.android.settings.password;
|
||||
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.CONFIRM_WORK_PROFILE_PATTERN_HEADER;
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_CONFIRM_PATTERN;
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_LAST_PATTERN_ATTEMPT_BEFORE_WIPE;
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_PATTERN_REQUIRED;
|
||||
import static android.app.admin.DevicePolicyResources.UNDEFINED;
|
||||
|
||||
import static com.android.settings.biometrics.GatekeeperPasswordProvider.containsGatekeeperPasswordHandle;
|
||||
@@ -315,23 +313,12 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
R.string.lockpassword_remote_validation_pattern_details);
|
||||
}
|
||||
final boolean isStrongAuthRequired = isStrongAuthRequired();
|
||||
if (mIsManagedProfile) {
|
||||
if (isStrongAuthRequired) {
|
||||
return mDevicePolicyManager.getResources().getString(
|
||||
WORK_PROFILE_PATTERN_REQUIRED,
|
||||
() -> getString(
|
||||
R.string.lockpassword_strong_auth_required_work_pattern));
|
||||
} else {
|
||||
return mDevicePolicyManager.getResources().getString(
|
||||
WORK_PROFILE_CONFIRM_PATTERN,
|
||||
() -> getString(
|
||||
R.string.lockpassword_confirm_your_pattern_generic_profile));
|
||||
}
|
||||
} else {
|
||||
if (!mIsManagedProfile) {
|
||||
return isStrongAuthRequired
|
||||
? getString(R.string.lockpassword_strong_auth_required_device_pattern)
|
||||
: getString(R.string.lockpassword_confirm_your_pattern_generic);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Object[][] getActiveViews() {
|
||||
@@ -381,7 +368,9 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
|
||||
CharSequence detailsText =
|
||||
mDetailsText == null ? getDefaultDetails() : mDetailsText;
|
||||
if (detailsText != null) {
|
||||
mGlifLayout.setDescriptionText(detailsText);
|
||||
}
|
||||
|
||||
mErrorTextView.setText("");
|
||||
updateErrorMessage(
|
||||
|
Reference in New Issue
Block a user