Fix emergency button not visible on pattern work challenge screen
Hide the subtext for work challenge pattern,so everything fits and adjust some spacing Test: btest a.d.g.WorkTelephonyTest#workChallengePatternScreen_whenAllSubscriptionsManaged_hasEmergencyButton -nm Bug: 283137301 Bug: 286391641 Change-Id: Ia6214b624f8d7328f7445f01a08166b8ab33fdec
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;
|
||||
mGlifLayout.setDescriptionText(detailsText);
|
||||
if (detailsText != null) {
|
||||
mGlifLayout.setDescriptionText(detailsText);
|
||||
}
|
||||
|
||||
mErrorTextView.setText("");
|
||||
updateErrorMessage(
|
||||
|
Reference in New Issue
Block a user