Add auto lock preference inside private space settings
This includes below changes - Adds perference for Auto Lock settings inside private space settings page. - Feaure is behind flag android.multiuser.support_autolock_for_private_space Screenshots: go/ss/ZCaYGWMDdH8bQNz.png go/ss/AxnD8DviiT5hhkW.png go/ss/9TMYmacyiVhyexB.png go/ss/6SzhkGfTbDYVUVE.png Bug: 312893140 Test: atest AutoLockPreferenceControllerTest, atest AutoLockPreferenceControllerTest Change-Id: I95beb9d71c709002e17307e612c60b2f5087290b
This commit is contained in:
@@ -1483,4 +1483,18 @@
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Entries for private space auto lock option -->
|
||||
<string-array name="private_space_auto_lock_options">
|
||||
<item>@string/private_space_auto_lock_every_time</item>
|
||||
<item>@string/private_space_auto_lock_after_inactivity</item>
|
||||
<item>@string/private_space_auto_lock_never</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Values for private space auto lock option -->
|
||||
<string-array name="private_space_auto_lock_options_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1237,10 +1237,22 @@
|
||||
<string name="private_space_face_unlock_title">Face Unlock for Private Space</string>
|
||||
<!-- Biometric category title - biometric options for unlocking the device. [CHAR LIMIT=50] -->
|
||||
<string name="private_space_category_ways_to_unlock">Ways to unlock</string>
|
||||
<!-- Summary for one lock when device screen lock is used as private profile lock. [CHAR LIMIT=60] -->
|
||||
<!-- Summary for one lock when device screen lock is used as private profile lock. [CHAR LIMIT=40] -->
|
||||
<string name="private_space_screen_lock_summary">Same as device screen lock</string>
|
||||
<!-- Dialog message to choose a new lock for Private Space. [CHAR LIMIT=50] -->
|
||||
<string name="private_space_new_lock_title">Choose a new lock for Private Space?</string>
|
||||
<!-- Title for the preference for auto lock private space. [CHAR LIMIT=40] -->
|
||||
<string name="private_space_auto_lock_title">Lock automatically</string>
|
||||
<!-- Title for private space auto lock settings page. [CHAR LIMIT=50] -->
|
||||
<string name="private_space_auto_lock_page_title">Lock private space automatically</string>
|
||||
<!-- Description for private space auto lock settings page. [CHAR LIMIT=NONE] -->
|
||||
<string name="private_space_auto_lock_page_summary">You can lock your private space automatically if you haven\’t used your device for a period of time</string>
|
||||
<!-- Configure auto lock: Value for auto lock configuration to lock private space every time device locks. [CHAR LIMIT=40] -->
|
||||
<string name="private_space_auto_lock_every_time">Every time device locks</string>
|
||||
<!-- Configure auto lock: Value for auto lock configuration to lock private space after 5 minutes of inactivity. [CHAR LIMIT=40] -->
|
||||
<string name="private_space_auto_lock_after_inactivity">After 5 minutes of inactivity</string>
|
||||
<!-- Configure auto lock: Value for auto lock configuration to never lock private space. [CHAR LIMIT=20] -->
|
||||
<string name="private_space_auto_lock_never">Never</string>
|
||||
<!-- Title for the preference to hide Private Space. [CHAR LIMIT=60] -->
|
||||
<string name="private_space_hide_title">Hide when locked</string>
|
||||
<!-- Title for the hide Private Space setting. [CHAR LIMIT=60] -->
|
||||
|
||||
20
res/xml/private_space_auto_lock_settings.xml
Normal file
20
res/xml/private_space_auto_lock_settings.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2023 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.
|
||||
-->
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:title="@string/private_space_auto_lock_page_title"/>
|
||||
@@ -36,6 +36,13 @@
|
||||
<PreferenceCategory
|
||||
android:title="@string/security_header">
|
||||
|
||||
<Preference
|
||||
android:key="private_space_auto_lock"
|
||||
android:title="@string/private_space_auto_lock_title"
|
||||
android:fragment="com.android.settings.privatespace.autolock.AutoLockSettingsFragment"
|
||||
settings:controller="com.android.settings.privatespace.autolock.AutoLockPreferenceController"
|
||||
settings:searchable="false" />
|
||||
|
||||
<Preference
|
||||
android:key="private_space_use_one_lock"
|
||||
android:title="@string/private_space_lock_title"
|
||||
|
||||
Reference in New Issue
Block a user