[Fingerprint] Help text for backup screen lock
Show a help text saying "Choose your backup screen lock method" when asking the user for backup screen lock during fingerprint enrollment. A backup translation is specified, using the source string "Set up your backup screen lock method". Bug: 22879473 Change-Id: I9b9348141227103e695d1fc78601745cac0309a7
This commit is contained in:
25
res/layout/choose_lock_generic_fingerprint_header.xml
Normal file
25
res/layout/choose_lock_generic_fingerprint_header.xml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2015 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:minHeight="56dp"
|
||||||
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||||
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||||
|
android:text="@string/lock_settings_picker_fingerprint_message"
|
||||||
|
android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
|
@@ -930,6 +930,9 @@
|
|||||||
<!-- Title for security picker to choose the unlock method: None/Pattern/PIN/Password [CHAR LIMIT=22] -->
|
<!-- Title for security picker to choose the unlock method: None/Pattern/PIN/Password [CHAR LIMIT=22] -->
|
||||||
<string name="lock_settings_picker_title">Choose screen lock</string>
|
<string name="lock_settings_picker_title">Choose screen lock</string>
|
||||||
|
|
||||||
|
<!-- Message shown in screen lock picker while setting up the backup/fallback screen lock method for fingerprint. Users can choose to use this method to unlock the screen instead of fingerprint, or when fingerprint is not accepted. [CHAR LIMIT=80] [BACKUP_MESSAGE_ID=2799884038398627882] -->
|
||||||
|
<string name="lock_settings_picker_fingerprint_message">Choose your backup screen lock method</string>
|
||||||
|
|
||||||
<!-- Main Security lock settings --><skip />
|
<!-- Main Security lock settings --><skip />
|
||||||
<!-- Title for PreferenceScreen to launch picker for security method when there is none [CHAR LIMIT=22] -->
|
<!-- Title for PreferenceScreen to launch picker for security method when there is none [CHAR LIMIT=22] -->
|
||||||
<string name="unlock_set_unlock_launch_picker_title">Screen lock</string>
|
<string name="unlock_set_unlock_launch_picker_title">Screen lock</string>
|
||||||
|
@@ -38,7 +38,10 @@ import android.hardware.fingerprint.FingerprintManager;
|
|||||||
import android.hardware.fingerprint.FingerprintManager.RemovalCallback;
|
import android.hardware.fingerprint.FingerprintManager.RemovalCallback;
|
||||||
import android.util.EventLog;
|
import android.util.EventLog;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
import android.view.accessibility.AccessibilityManager;
|
import android.view.accessibility.AccessibilityManager;
|
||||||
|
import android.widget.ListView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.android.internal.logging.MetricsLogger;
|
import com.android.internal.logging.MetricsLogger;
|
||||||
@@ -167,6 +170,18 @@ public class ChooseLockGeneric extends SettingsActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
if (mForFingerprint) {
|
||||||
|
final LayoutInflater inflater = LayoutInflater.from(getContext());
|
||||||
|
final ListView listView = getListView();
|
||||||
|
final View fingerprintHeader = inflater.inflate(
|
||||||
|
R.layout.choose_lock_generic_fingerprint_header, listView, false);
|
||||||
|
listView.addHeaderView(fingerprintHeader, null, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
|
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
|
||||||
Preference preference) {
|
Preference preference) {
|
||||||
|
Reference in New Issue
Block a user