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

Commit df837bbf authored by Lucas Dupin's avatar Lucas Dupin Committed by Automerger Merge Worker
Browse files

Merge "Add ContrastDialog class and tests, activity version" into udc-dev am: 8138fa29

parents a1ddf465 8138fa29
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -4232,6 +4232,13 @@ public class Intent implements Parcelable, Cloneable {
    public static final String ACTION_SHOW_BRIGHTNESS_DIALOG =
    public static final String ACTION_SHOW_BRIGHTNESS_DIALOG =
            "com.android.intent.action.SHOW_BRIGHTNESS_DIALOG";
            "com.android.intent.action.SHOW_BRIGHTNESS_DIALOG";
    /**
     * Activity Action: Shows the contrast setting dialog.
     * @hide
     */
    public static final String ACTION_SHOW_CONTRAST_DIALOG =
            "com.android.intent.action.SHOW_CONTRAST_DIALOG";
    /**
    /**
     * Broadcast Action:  A global button was pressed.  Includes a single
     * Broadcast Action:  A global button was pressed.  Includes a single
     * extra field, {@link #EXTRA_KEY_EVENT}, containing the key event that
     * extra field, {@link #EXTRA_KEY_EVENT}, containing the key event that
+14 −0
Original line number Original line Diff line number Diff line
@@ -872,6 +872,20 @@
            </intent-filter>
            </intent-filter>
        </activity>
        </activity>


        <activity
            android:name=".contrast.ContrastDialogActivity"
            android:label="@string/quick_settings_contrast_label"
            android:theme="@style/Theme.SystemUI.ContrastDialog"
            android:finishOnCloseSystemDialogs="true"
            android:launchMode="singleInstance"
            android:excludeFromRecents="true"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.intent.action.SHOW_CONTRAST_DIALOG" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name=".ForegroundServicesDialog"
        <activity android:name=".ForegroundServicesDialog"
            android:process=":fgservices"
            android:process=":fgservices"
            android:excludeFromRecents="true"
            android:excludeFromRecents="true"
+46 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright 2023, 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.
*/
-->
<selector
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">

    <item android:state_selected="true">
        <shape android:shape="rectangle">
            <solid android:color="?androidprv:attr/colorSurfaceHighlight" />
            <stroke
                android:color="?androidprv:attr/colorAccentPrimary"
                android:width="@dimen/contrast_dialog_button_stroke_width" />
            <corners android:radius="@dimen/contrast_dialog_button_radius"/>
        </shape>
    </item>

    <item>
        <layer-list>
            <item android:top="@dimen/contrast_dialog_button_stroke_width"
                android:bottom="@dimen/contrast_dialog_button_stroke_width"
                android:left="@dimen/contrast_dialog_button_stroke_width"
                android:right="@dimen/contrast_dialog_button_stroke_width">
                <shape android:shape="rectangle">
                    <solid android:color="?androidprv:attr/colorSurfaceHighlight" />
                    <corners android:radius="@dimen/contrast_dialog_button_radius"/>
                </shape>
            </item>
        </layer-list>
    </item>
</selector>
+25 −0
Original line number Original line Diff line number Diff line
<!--
  ~ Copyright (C) 2023 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 android:autoMirrored="true" android:height="20dp"
    android:viewportHeight="20" android:viewportWidth="66"
    android:width="66dp" xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillColor="#F2F1E8"
        android:pathData="M0.5,8C0.5,3.858 3.858,0.5 8,0.5H58C62.142,0.5 65.5,3.858 65.5,8V12C65.5,16.142 62.142,19.5 58,19.5H8C3.858,19.5 0.5,16.142 0.5,12V8Z"
        android:strokeColor="#1B1C17" android:strokeWidth="1"/>
    <path android:fillColor="#1B1C17" android:pathData="M11,10m-6,0a6,6 0,1 1,12 0a6,6 0,1 1,-12 0"/>
    <path android:fillColor="#1B1C17" android:pathData="M23,5L43,5A2,2 0,0 1,45 7L45,7A2,2 0,0 1,43 9L23,9A2,2 0,0 1,21 7L21,7A2,2 0,0 1,23 5z"/>
    <path android:fillColor="#1B1C17" android:pathData="M23,11L55,11A2,2 0,0 1,57 13L57,13A2,2 0,0 1,55 15L23,15A2,2 0,0 1,21 13L21,13A2,2 0,0 1,23 11z"/>
</vector>
+23 −0
Original line number Original line Diff line number Diff line
<!--
  ~ Copyright (C) 2023 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 android:autoMirrored="true" android:height="20dp"
    android:viewportHeight="20" android:viewportWidth="66"
    android:width="66dp" xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillColor="#F2F1E8" android:pathData="M0,8C0,3.582 3.582,0 8,0H58C62.418,0 66,3.582 66,8V12C66,16.418 62.418,20 58,20H8C3.582,20 0,16.418 0,12V8Z"/>
    <path android:fillColor="#919283" android:pathData="M11,10m-6,0a6,6 0,1 1,12 0a6,6 0,1 1,-12 0"/>
    <path android:fillColor="#919283" android:pathData="M23,5L43,5A2,2 0,0 1,45 7L45,7A2,2 0,0 1,43 9L23,9A2,2 0,0 1,21 7L21,7A2,2 0,0 1,23 5z"/>
    <path android:fillColor="#919283" android:pathData="M23,11L55,11A2,2 0,0 1,57 13L57,13A2,2 0,0 1,55 15L23,15A2,2 0,0 1,21 13L21,13A2,2 0,0 1,23 11z"/>
</vector>
Loading