Merge "Update screen lock and biometrics options in order" into udc-qpr-dev am: 8ea74c3d76
am: f0278e6835
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23896224 Change-Id: I470152428e4fe0ecf1fc9e8f3d499fca89d114db Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -886,7 +886,7 @@
|
|||||||
|
|
||||||
<!-- Biometric settings --><skip />
|
<!-- Biometric settings --><skip />
|
||||||
<!-- Title shown for menu item that launches biometric settings. [CHAR LIMIT=66] -->
|
<!-- Title shown for menu item that launches biometric settings. [CHAR LIMIT=66] -->
|
||||||
<string name="security_settings_biometric_preference_title">Face & Fingerprint Unlock</string>
|
<string name="security_settings_biometric_preference_title">Fingerprint & Face Unlock</string>
|
||||||
<!-- Title shown for work menu item that launches biometric settings. [CHAR LIMIT=66] -->
|
<!-- Title shown for work menu item that launches biometric settings. [CHAR LIMIT=66] -->
|
||||||
<string name="security_settings_work_biometric_preference_title">Face & Fingerprint Unlock for work</string>
|
<string name="security_settings_work_biometric_preference_title">Face & Fingerprint Unlock for work</string>
|
||||||
<!-- Message shown in summary field of biometric settings. [CHAR LIMIT=66] -->
|
<!-- Message shown in summary field of biometric settings. [CHAR LIMIT=66] -->
|
||||||
@@ -1238,14 +1238,8 @@
|
|||||||
<!-- Title for preference that guides the user to skip Face Unlock setup [CHAR LIMIT=60]-->
|
<!-- Title for preference that guides the user to skip Face Unlock setup [CHAR LIMIT=60]-->
|
||||||
<string name="face_unlock_skip_face">Continue without Face Unlock</string>
|
<string name="face_unlock_skip_face">Continue without Face Unlock</string>
|
||||||
|
|
||||||
<!-- Title for preference that guides the user through creating a backup unlock pattern for biometrics unlock [CHAR LIMIT=45]-->
|
|
||||||
<string name="biometrics_unlock_set_unlock_pattern">Pattern \u2022 Face \u2022 Fingerprint</string>
|
|
||||||
<!-- Title for preference that guides the user through creating a backup unlock PIN for biometrics unlock [CHAR LIMIT=45]-->
|
|
||||||
<string name="biometrics_unlock_set_unlock_pin">PIN \u2022 Face \u2022 Fingerprint</string>
|
|
||||||
<!-- Title for preference that guides the user through creating a backup unlock password for biometrics unlock [CHAR LIMIT=45]-->
|
|
||||||
<string name="biometrics_unlock_set_unlock_password">Password \u2022 Face \u2022 Fingerprint</string>
|
|
||||||
<!-- Title for preference that guides the user to skip face unlock setup [CHAR LIMIT=60]-->
|
<!-- Title for preference that guides the user to skip face unlock setup [CHAR LIMIT=60]-->
|
||||||
<string name="biometrics_unlock_skip_biometrics">Continue without face or fingerprint</string>
|
<string name="biometrics_unlock_skip_biometrics">Continue without fingerprint or face</string>
|
||||||
|
|
||||||
<!-- Summary for "Configure lockscreen" when lock screen is off [CHAR LIMIT=45] -->
|
<!-- Summary for "Configure lockscreen" when lock screen is off [CHAR LIMIT=45] -->
|
||||||
<string name="unlock_set_unlock_mode_off">None</string>
|
<string name="unlock_set_unlock_mode_off">None</string>
|
||||||
|
@@ -533,17 +533,18 @@ public class BiometricUtils {
|
|||||||
// Assume the flow is "Screen Lock" + "Face" + "Fingerprint"
|
// Assume the flow is "Screen Lock" + "Face" + "Fingerprint"
|
||||||
ssb.append(bidi.unicodeWrap(screenLock));
|
ssb.append(bidi.unicodeWrap(screenLock));
|
||||||
|
|
||||||
|
if (hasFingerprint) {
|
||||||
|
ssb.append(bidi.unicodeWrap(SEPARATOR));
|
||||||
|
ssb.append(bidi.unicodeWrap(
|
||||||
|
capitalize(context.getString(R.string.security_settings_fingerprint))));
|
||||||
|
}
|
||||||
|
|
||||||
if (isFaceSupported) {
|
if (isFaceSupported) {
|
||||||
ssb.append(bidi.unicodeWrap(SEPARATOR));
|
ssb.append(bidi.unicodeWrap(SEPARATOR));
|
||||||
ssb.append(bidi.unicodeWrap(
|
ssb.append(bidi.unicodeWrap(
|
||||||
capitalize(context.getString(R.string.keywords_face_settings))));
|
capitalize(context.getString(R.string.keywords_face_settings))));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasFingerprint) {
|
|
||||||
ssb.append(bidi.unicodeWrap(SEPARATOR));
|
|
||||||
ssb.append(bidi.unicodeWrap(
|
|
||||||
capitalize(context.getString(R.string.security_settings_fingerprint))));
|
|
||||||
}
|
|
||||||
return ssb.toString();
|
return ssb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -60,6 +60,7 @@ import com.android.internal.widget.LockPatternUtils;
|
|||||||
import com.android.internal.widget.LockscreenCredential;
|
import com.android.internal.widget.LockscreenCredential;
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.biometrics.BiometricEnrollBase;
|
import com.android.settings.biometrics.BiometricEnrollBase;
|
||||||
|
import com.android.settings.biometrics.BiometricUtils;
|
||||||
import com.android.settings.password.ChooseLockGeneric.ChooseLockGenericFragment;
|
import com.android.settings.password.ChooseLockGeneric.ChooseLockGenericFragment;
|
||||||
import com.android.settings.search.SearchFeatureProvider;
|
import com.android.settings.search.SearchFeatureProvider;
|
||||||
import com.android.settings.testutils.FakeFeatureFactory;
|
import com.android.settings.testutils.FakeFeatureFactory;
|
||||||
@@ -543,7 +544,7 @@ public class ChooseLockGenericTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void updatePreferenceText_supportBiometrics_showFaceAndFingerprint() {
|
public void updatePreferenceText_supportBiometrics_setScreenLockFingerprintFace_inOrder() {
|
||||||
ShadowStorageManager.setIsFileEncrypted(false);
|
ShadowStorageManager.setIsFileEncrypted(false);
|
||||||
final Intent intent = new Intent().putExtra(EXTRA_KEY_FOR_BIOMETRICS, true);
|
final Intent intent = new Intent().putExtra(EXTRA_KEY_FOR_BIOMETRICS, true);
|
||||||
initActivity(intent);
|
initActivity(intent);
|
||||||
@@ -552,19 +553,29 @@ public class ChooseLockGenericTest {
|
|||||||
R.string.security_settings_fingerprint));
|
R.string.security_settings_fingerprint));
|
||||||
final String supportFace = capitalize(mActivity.getResources().getString(
|
final String supportFace = capitalize(mActivity.getResources().getString(
|
||||||
R.string.keywords_face_settings));
|
R.string.keywords_face_settings));
|
||||||
String pinTitle =
|
|
||||||
|
// The strings of golden copy
|
||||||
|
final String pinFingerprintFace = mActivity.getText(R.string.unlock_set_unlock_pin_title)
|
||||||
|
+ BiometricUtils.SEPARATOR + supportFingerprint + BiometricUtils.SEPARATOR
|
||||||
|
+ supportFace;
|
||||||
|
final String patternFingerprintFace = mActivity.getText(
|
||||||
|
R.string.unlock_set_unlock_pattern_title) + BiometricUtils.SEPARATOR
|
||||||
|
+ supportFingerprint + BiometricUtils.SEPARATOR + supportFace;
|
||||||
|
final String passwordFingerprintFace = mActivity.getText(
|
||||||
|
R.string.unlock_set_unlock_password_title) + BiometricUtils.SEPARATOR
|
||||||
|
+ supportFingerprint + BiometricUtils.SEPARATOR + supportFace;
|
||||||
|
|
||||||
|
// The strings obtain from preferences
|
||||||
|
final String pinTitle =
|
||||||
(String) mFragment.findPreference(ScreenLockType.PIN.preferenceKey).getTitle();
|
(String) mFragment.findPreference(ScreenLockType.PIN.preferenceKey).getTitle();
|
||||||
String patternTitle =
|
final String patternTitle =
|
||||||
(String) mFragment.findPreference(ScreenLockType.PATTERN.preferenceKey).getTitle();
|
(String) mFragment.findPreference(ScreenLockType.PATTERN.preferenceKey).getTitle();
|
||||||
String passwordTitle =
|
final String passwordTitle =
|
||||||
(String) mFragment.findPreference(ScreenLockType.PASSWORD.preferenceKey).getTitle();
|
(String) mFragment.findPreference(ScreenLockType.PASSWORD.preferenceKey).getTitle();
|
||||||
|
|
||||||
assertThat(pinTitle).contains(supportFingerprint);
|
assertThat(pinTitle).isEqualTo(pinFingerprintFace);
|
||||||
assertThat(pinTitle).contains(supportFace);
|
assertThat(patternTitle).isEqualTo(patternFingerprintFace);
|
||||||
assertThat(patternTitle).contains(supportFingerprint);
|
assertThat(passwordTitle).isEqualTo(passwordFingerprintFace);
|
||||||
assertThat(patternTitle).contains(supportFace);
|
|
||||||
assertThat(passwordTitle).contains(supportFingerprint);
|
|
||||||
assertThat(passwordTitle).contains(supportFace);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user