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

Commit 7c5ee6c6 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere Committed by Android (Google) Code Review
Browse files

Merge changes from topic "gallery-dark"

* changes:
  Force the app dark/light theme in the Gallery app (1/2)
  Represent the Gallery screen hierarchy as a tree
parents e7308644 33470b90
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ val LocalAndroidColorScheme =
 * Important: Use M3 colors from MaterialTheme.colorScheme whenever possible instead. In the future,
 * most of the colors in this class will be removed in favor of their M3 counterpart.
 */
class AndroidColorScheme internal constructor(private val context: Context) {
class AndroidColorScheme internal constructor(context: Context) {
    val colorPrimary = getColor(context, R.attr.colorPrimary)
    val colorPrimaryDark = getColor(context, R.attr.colorPrimaryDark)
    val colorAccent = getColor(context, R.attr.colorAccent)
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ android_library {
    ],

    static_libs: [
        "SystemUI-core",
        "SystemUIComposeCore",
        "SystemUIComposeFeatures",

+33 −0
Original line number Diff line number Diff line
@@ -16,7 +16,40 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.android.systemui.compose.gallery">
    <!-- To emulate a display size and density. -->
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />

    <application
        android:name="android.app.Application"
        android:appComponentFactory="androidx.core.app.AppComponentFactory"
        tools:replace="android:name,android:appComponentFactory">
        <!-- Disable providers from SystemUI -->
        <provider android:name="com.android.systemui.keyguard.KeyguardSliceProvider"
            android:authorities="com.android.systemui.test.keyguard.disabled"
            android:enabled="false"
            tools:replace="android:authorities"
            tools:node="remove" />
        <provider android:name="com.google.android.systemui.keyguard.KeyguardSliceProviderGoogle"
            android:authorities="com.android.systemui.test.keyguard.disabled"
            android:enabled="false"
            tools:replace="android:authorities"
            tools:node="remove" />
        <provider android:name="com.android.keyguard.clock.ClockOptionsProvider"
            android:authorities="com.android.systemui.test.keyguard.clock.disabled"
            android:enabled="false"
            tools:replace="android:authorities"
            tools:node="remove" />
        <provider android:name="com.android.systemui.people.PeopleProvider"
            android:authorities="com.android.systemui.test.people.disabled"
            android:enabled="false"
            tools:replace="android:authorities"
            tools:node="remove" />
        <provider android:name="androidx.core.content.FileProvider"
            android:authorities="com.android.systemui.test.fileprovider.disabled"
            android:enabled="false"
            tools:replace="android:authorities"
            tools:node="remove"/>
    </application>
</manifest>
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.android.systemui.compose.gallery.app">
    <application
        android:allowBackup="true"
@@ -23,7 +24,8 @@
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.SystemUIGallery">
        android:theme="@style/Theme.SystemUI.Gallery"
        tools:replace="android:icon,android:theme,android:label">
        <activity
            android:name="com.android.systemui.compose.gallery.GalleryActivity"
            android:exported="true"
+0 −26
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2022 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 xmlns:tools="http://schemas.android.com/tools">
    <style name="Theme.SystemUIGallery" parent="Theme.AppCompat.DayNight.NoActionBar">
        <item name="android:statusBarColor" tools:targetApi="l">
            @android:color/transparent
        </item>
        <item name="android:navigationBarColor" tools:targetApi="l">
            @android:color/transparent
        </item>
    </style>
</resources>
 No newline at end of file
Loading