Add footer in private space auto lock settings page

Add a footer note to private space auto lock settings page that apps in
private space may need to be authenticated unlock when a separate lock
is set for private space.

Screenshot:
go/ss/7fE8epun3A2hgq4.png

Bug: 343166689
Test: Manual
Change-Id: I18c650eba128da512116a3166babb49f7ef33bb3
This commit is contained in:
josephpv
2024-05-29 09:55:43 +00:00
parent 9ebdedd2f6
commit 5fd6d6435b
2 changed files with 6 additions and 0 deletions

View File

@@ -1280,6 +1280,8 @@
<string name="private_space_auto_lock_after_inactivity">5 minutes after screen timeout</string> <string name="private_space_auto_lock_after_inactivity">5 minutes after screen timeout</string>
<!-- Configure auto lock: Value for auto lock configuration to lock private space only after device restarts. [CHAR LIMIT=40] --> <!-- Configure auto lock: Value for auto lock configuration to lock private space only after device restarts. [CHAR LIMIT=40] -->
<string name="private_space_auto_lock_after_device_restart">Only after device restarts</string> <string name="private_space_auto_lock_after_device_restart">Only after device restarts</string>
<!-- Note in footer of private space auto lock settings page that using privae apps may need a lock verification when a separate lock is used for private space. [CHAR LIMIT=NONE] -->
<string name="private_space_auto_lock_footer_message">If you use a different lock for your private space, you may need to verify it\u2019s you to open apps in your private space.</string>
<!-- Title for the settings page for hiding private space. [CHAR LIMIT=45] --> <!-- Title for the settings page for hiding private space. [CHAR LIMIT=45] -->
<string name="private_space_hide_page_title">Hide private space</string> <string name="private_space_hide_page_title">Hide private space</string>
<!-- Title for the settings preference for hiding private space when it's locked. [CHAR LIMIT=60] --> <!-- Title for the settings preference for hiding private space when it's locked. [CHAR LIMIT=60] -->

View File

@@ -31,6 +31,7 @@ import com.android.settings.R;
import com.android.settings.privatespace.PrivateSpaceMaintainer; import com.android.settings.privatespace.PrivateSpaceMaintainer;
import com.android.settings.widget.RadioButtonPickerFragment; import com.android.settings.widget.RadioButtonPickerFragment;
import com.android.settingslib.widget.CandidateInfo; import com.android.settingslib.widget.CandidateInfo;
import com.android.settingslib.widget.FooterPreference;
import com.android.settingslib.widget.TopIntroPreference; import com.android.settingslib.widget.TopIntroPreference;
import java.util.ArrayList; import java.util.ArrayList;
@@ -76,7 +77,10 @@ public class AutoLockSettingsFragment extends RadioButtonPickerFragment {
protected void addStaticPreferences(PreferenceScreen screen) { protected void addStaticPreferences(PreferenceScreen screen) {
final TopIntroPreference introPreference = new TopIntroPreference(screen.getContext()); final TopIntroPreference introPreference = new TopIntroPreference(screen.getContext());
introPreference.setTitle(R.string.private_space_auto_lock_page_summary); introPreference.setTitle(R.string.private_space_auto_lock_page_summary);
final FooterPreference footerPreference = new FooterPreference(screen.getContext());
footerPreference.setSummary(R.string.private_space_auto_lock_footer_message);
screen.addPreference(introPreference); screen.addPreference(introPreference);
screen.addPreference(footerPreference);
} }
@Override @Override