Update adaptive sleep setting with the latest copy

Bug: 129352433
Change-Id: I3c9594f9ed49208ef1d7bbc33e8083a0c733b1f8
Test: manually confirmed it works and looks correct
This commit is contained in:
Alex Salo
2019-04-02 14:24:07 -07:00
parent 5a9f447300
commit fdeb07c05b
4 changed files with 36 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
<!--
Copyright (C) 2019 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
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z"/>
</vector>

View File

@@ -2761,13 +2761,15 @@
<!-- Display settings screen, display white balance settings title [CHAR LIMIT=30] -->
<string name="display_white_balance_title">Display white balance</string>
<!-- Display settings screen, setting option name to enable adaptive sleep [CHAR LIMIT=30] -->
<string name="adaptive_sleep_title">Adaptive sleep</string>
<string name="adaptive_sleep_title">Screen aware</string>
<!-- Setting option summary when adaptive sleep is on [CHAR LIMIT=NONE] -->
<string name="adaptive_sleep_summary_on">On</string>
<string name="adaptive_sleep_summary_on">On / Screen wont turn off if youre looking at it</string>
<!-- Setting option summary when adaptive sleep is off [CHAR LIMIT=NONE] -->
<string name="adaptive_sleep_summary_off">Off</string>
<!-- Description about the feature adaptive sleep [CHAR LIMIT=NONE]-->
<string name="adaptive_sleep_description">Your screen would not dim and go to sleep if the device detects your present attention.</string>
<string name="adaptive_sleep_description">Prevents your screen from turning off if youre looking at it.</string>
<!-- Description feature's privacy sensitive details to make sure users understand what feature users, what it saves/sends etc [CHAR LIMIT=NONE]-->
<string name="adaptive_sleep_privacy">Screen aware uses the front camera to see if someone is looking at the screen. It works on device, and images are never stored or sent to Google.</string>
<!-- Night display screen, setting option name to enable night display (renamed "Night Light" with title caps). [CHAR LIMIT=30] -->

View File

@@ -32,6 +32,7 @@
<com.android.settingslib.RestrictedSwitchPreference
android:key="adaptive_sleep"
android:title="@string/adaptive_sleep_title"
android:summary="@string/adaptive_sleep_description"
settings:keywords="@string/keywords_display_adaptive_sleep"
settings:controller="com.android.settings.display.AdaptiveSleepPreferenceController"
settings:useAdminDisabledSummary="true"

View File

@@ -25,6 +25,7 @@ import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settingslib.search.SearchIndexable;
import com.android.settingslib.widget.FooterPreference;
import java.util.Arrays;
import java.util.List;
@@ -37,8 +38,10 @@ public class AdaptiveSleepSettings extends DashboardFragment {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
mFooterPreferenceMixin.createFooterPreference()
.setTitle(R.string.adaptive_sleep_description);
final FooterPreference footerPreference =
mFooterPreferenceMixin.createFooterPreference();
footerPreference.setIcon(R.drawable.ic_privacy_shield_24dp);
footerPreference.setTitle(R.string.adaptive_sleep_privacy);
}
@Override