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

Commit 5e44955e authored by Salvador Martinez's avatar Salvador Martinez Committed by android-build-merger
Browse files

Merge "Change dark theme screen to toggle" into qt-dev

am: 3b8a0b82

Change-Id: I5d13eac9e99d47cc591eed30de6e739a826d4a54
parents 95a850bc 3b8a0b82
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ 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="48dp"
        android:height="48dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0"
        android:tint="?android:attr/colorAccent">
    <path
        android:fillColor="#FF000000"
        android:pathData="M12,22C17.52,22 22,17.52 22,12 22,6.48 17.52,2 12,2 6.48,2 2,6.48 2,12 2,17.52 6.48,22 12,22ZM12,3.915c3.889,0 8,4.005 8,8.085 0,4.08 -3.927,7.992 -7.928,7.992z"/>
</vector>
 No newline at end of file
+4 −7
Original line number Diff line number Diff line
@@ -9900,17 +9900,14 @@
    <string name="demo_mode">System UI demo mode</string>
    <!-- [CHAR LIMIT=60] Name of setting that changes the UI to dark -->
    <string name="dark_ui_mode">Theme</string>
    <!-- [CHAR LIMIT=60] Name of dev option that changes the color of the UI -->
    <string name="dark_ui_mode_title">Choose Theme</string>
    <!-- [CHAR_LIMIT=NONE] Summary that is shown in the footer when light mode is selected -->
    <string name="dark_ui_settings_light_summary">This setting also applies to apps</string>
    <string name="dark_ui_mode">Dark Theme</string>
    <!-- [CHAR_LIMIT=NONE] Summary that is shown in the footer when dark mode is selected -->
    <string name="dark_ui_settings_dark_summary">Supported apps will also switch to dark theme</string>
    <!-- [CHAR_LIMIT=40] Positive button text in dark theme notification -->
    <string name="dark_ui_settings_dialog_acknowledge">Got it</string>
    <!-- [CHAR LIMIT=60] Name of dev option to enable extra quick settings tiles -->
    <string name="quick_settings_developer_tiles">Quick settings developer tiles</string>
+2 −3
Original line number Diff line number Diff line
@@ -58,9 +58,8 @@
            android:title="@string/screen_zoom_title"
            settings:searchable="false"/>

        <Preference
        <SwitchPreference
            android:key="dark_ui_mode_accessibility"
            android:fragment="com.android.settings.display.DarkUISettings"
            android:title="@string/dark_ui_mode"
            settings:searchable="false"/>

+2 −3
Original line number Diff line number Diff line
@@ -56,11 +56,10 @@
    </com.android.settingslib.RestrictedPreference>


    <Preference
    <SwitchPreference
        android:key="dark_ui_mode"
        android:fragment="com.android.settings.display.DarkUISettings"
        android:title="@string/dark_ui_mode"
        settings:searchable="false"
        settings:keywords="@string/keywords_dark_ui_mode"
        settings:controller="com.android.settings.display.DarkUIPreferenceController"/>

    <!-- Cross-listed item, if you change this, also change it in power_usage_summary.xml -->
+8 −0
Original line number Diff line number Diff line
@@ -18,11 +18,13 @@ package com.android.settings;

import android.app.settings.SettingsEnums;
import android.content.Context;
import android.os.Bundle;
import android.provider.SearchIndexableResource;

import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.display.BrightnessLevelPreferenceController;
import com.android.settings.display.CameraGesturePreferenceController;
import com.android.settings.display.DarkUIPreferenceController;
import com.android.settings.display.LiftToWakePreferenceController;
import com.android.settings.display.NightDisplayPreferenceController;
import com.android.settings.display.NightModePreferenceController;
@@ -62,6 +64,12 @@ public class DisplaySettings extends DashboardFragment {
        return R.xml.display_settings;
    }

    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        use(DarkUIPreferenceController.class).setParentFragment(this);
    }

    @Override
    protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
        return buildPreferenceControllers(context, getSettingsLifecycle());
Loading