Refine fold setting
Current fold setting has a toggle button which can enable the “Stay unlocked on fold” setting. Create a new page for fold setting which will allow us to choose something from three options.(https://screenshot.googleplex.com/6W65aTYtigGpr3v) *Always - Front display turns on when you fold your device [Currently available setting] *Only games, videos, and more - Front display turns on for apps that stop your screen going idle [Default] *Never - Front display locks when you fold your device [New option for user] Test: atest FoldLockBehaviorSettingsTest FoldLockBehaviorPreferenceControllerTest *Manual Flash the build with these changes Manually select options one by one Observe the behavior Fixes: 294194379 Change-Id: Ie5b4e1d7560ed645ec2ca5f49cc9715b17d21367
This commit is contained in:
committed by
Shivangi Dubey
parent
b675bb6d3a
commit
dc485887cc
@@ -48,12 +48,12 @@
|
||||
settings:keywords="@string/keywords_ambient_display_screen"
|
||||
settings:controller="com.android.settings.security.screenlock.LockScreenPreferenceController"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="stay_awake_on_fold"
|
||||
android:title="@string/stay_awake_on_fold_title"
|
||||
android:summary="@string/stay_awake_on_fold_summary"
|
||||
settings:keywords="@string/keywords_stay_awake_on_lock"
|
||||
settings:controller="com.android.settings.display.StayAwakeOnFoldPreferenceController"/>
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
android:fragment="com.android.settings.display.FoldLockBehaviorSettings"
|
||||
android:key="fold_lock_behavior"
|
||||
android:title="@string/fold_lock_behavior_title"
|
||||
settings:controller="com.android.settings.display.FoldLockBehaviorPreferenceController"
|
||||
settings:keywords="@string/keywords_fold_lock_behavior" />
|
||||
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
android:key="screen_timeout"
|
||||
|
18
res/xml/fold_lock_behavior_settings.xml
Normal file
18
res/xml/fold_lock_behavior_settings.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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/fold_lock_behavior_title"/>
|
Reference in New Issue
Block a user