Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2dfd87b authored by Alex Salo's avatar Alex Salo Committed by android-build-merger
Browse files

Merge "Update adaptive sleep setting with the latest copy" into qt-dev

am: 02576b6e

Change-Id: I04efc7f8d3c052d7ce2627188190f2dd9e76b0b1
parents 8911d732 02576b6e
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<!--
  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>
+5 −3
Original line number Diff line number Diff line
@@ -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 won’t turn off if you’re 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 you’re 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] -->
+1 −0
Original line number Diff line number Diff line
@@ -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"
+5 −2
Original line number Diff line number Diff line
@@ -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