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

Commit 40ec6b78 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Migrate SysUI theme to UiMode

Legacy RRO was deleted and resources migrated to DeviceDefault theme.
Theming via overlays is still possible, but the overlay should provide
both themes: day and night.

Test: adb shell service call uimode 4 i32 1
Test: adb shell service call uimode 4 i32 2
Change-Id: I5dee2f94764c5c2f4e11cfabfff97656b3822e8a
parent 4b4c530c
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2018 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
  -->

<resources>
    <style name="Theme.DeviceDefault.QuickSettings" parent="android:Theme.DeviceDefault">
        <!-- Color palette -->
        <item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
        <item name="colorSecondary">@color/secondary_device_default_settings</item>
        <item name="colorAccent">@color/accent_device_default_dark</item>
        <item name="colorError">@color/error_color_device_default_dark</item>
        <item name="colorControlNormal">?attr/textColorPrimary</item>
        <item name="alertDialogTheme">@style/Theme.DeviceDefault.Dialog.Alert</item>

        <!-- QS panel background -->
        <item name="colorBackgroundFloating">@color/material_grey_900</item>

        <!-- volume background -->
        <item name="panelColorBackground">@color/material_grey_800</item>
    </style>
</resources>
 No newline at end of file
+2 −5
Original line number Diff line number Diff line
@@ -335,10 +335,7 @@
        <item name="*android:errorColor">?android:attr/colorError</item>
    </style>

    <!-- Overlay manager may replace this theme -->
    <style name="qs_base" parent="@*android:style/Theme.DeviceDefault.QuickSettings" />

    <style name="qs_theme" parent="qs_base">
    <style name="qs_theme" parent="@*android:style/Theme.DeviceDefault.QuickSettings">
        <item name="lightIconTheme">@style/QSIconTheme</item>
        <item name="darkIconTheme">@style/QSIconTheme</item>
        <item name="android:windowIsFloating">true</item>
@@ -501,7 +498,7 @@
           parent="@*android:style/TextAppearance.Material.Notification.Info">
    </style>

    <style name="edit_theme" parent="qs_base">
    <style name="edit_theme" parent="qs_theme">
        <item name="android:colorBackground">?android:attr/colorSecondary</item>
    </style>

+5 −0
Original line number Diff line number Diff line
@@ -91,6 +91,11 @@ public class AutoReinflateContainer extends FrameLayout implements
        inflateLayout();
    }

    @Override
    public void onUiModeChanged() {
        inflateLayout();
    }

    @Override
    public void onLocaleListChanged() {
        inflateLayout();
+2 −1
Original line number Diff line number Diff line
@@ -51,7 +51,8 @@ public class FragmentHostManager {
    private final View mRootView;
    private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges(
            ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_LOCALE
                | ActivityInfo.CONFIG_SCREEN_LAYOUT | ActivityInfo.CONFIG_ASSETS_PATHS);
                | ActivityInfo.CONFIG_SCREEN_LAYOUT | ActivityInfo.CONFIG_ASSETS_PATHS
                | ActivityInfo.CONFIG_UI_MODE);
    private final FragmentService mManager;
    private final ExtensionFragmentManager mPlugins = new ExtensionFragmentManager();

Loading