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

Commit 154a6a50 authored by Jenhou (Alan) Huang's avatar Jenhou (Alan) Huang Committed by Automerger Merge Worker
Browse files

Merge "[VolumePanel] Move the Settings' volume panel into a SystemUIDialog"...

Merge "[VolumePanel] Move the Settings' volume panel into a SystemUIDialog" into tm-qpr-dev am: 16219f2e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19482609



Change-Id: I51953caf99f845431d7ceeb7fd102aef308b2837
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d4357de0 16219f2e
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -58,6 +58,12 @@ public class FeatureFlagUtils {
    public static final String SETTINGS_APP_LOCALE_OPT_IN_ENABLED =
    public static final String SETTINGS_APP_LOCALE_OPT_IN_ENABLED =
            "settings_app_locale_opt_in_enabled";
            "settings_app_locale_opt_in_enabled";


    /**
     * Launch the Volume panel in SystemUI.
     * @hide
     */
    public static final String SETTINGS_VOLUME_PANEL_IN_SYSTEMUI =
            "settings_volume_panel_in_systemui";


    /** @hide */
    /** @hide */
    public static final String SETTINGS_ENABLE_MONITOR_PHANTOM_PROCS =
    public static final String SETTINGS_ENABLE_MONITOR_PHANTOM_PROCS =
@@ -105,6 +111,7 @@ public class FeatureFlagUtils {
        DEFAULT_FLAGS.put(SETTINGS_SUPPORT_LARGE_SCREEN, "true");
        DEFAULT_FLAGS.put(SETTINGS_SUPPORT_LARGE_SCREEN, "true");
        DEFAULT_FLAGS.put("settings_search_always_expand", "true");
        DEFAULT_FLAGS.put("settings_search_always_expand", "true");
        DEFAULT_FLAGS.put(SETTINGS_APP_LOCALE_OPT_IN_ENABLED, "true");
        DEFAULT_FLAGS.put(SETTINGS_APP_LOCALE_OPT_IN_ENABLED, "true");
        DEFAULT_FLAGS.put(SETTINGS_VOLUME_PANEL_IN_SYSTEMUI, "false");
        DEFAULT_FLAGS.put(SETTINGS_ENABLE_MONITOR_PHANTOM_PROCS, "true");
        DEFAULT_FLAGS.put(SETTINGS_ENABLE_MONITOR_PHANTOM_PROCS, "true");
        DEFAULT_FLAGS.put(SETTINGS_APP_ALLOW_DARK_THEME_ACTIVATION_AT_BEDTIME, "true");
        DEFAULT_FLAGS.put(SETTINGS_APP_ALLOW_DARK_THEME_ACTIVATION_AT_BEDTIME, "true");
        DEFAULT_FLAGS.put(SETTINGS_HIDE_SECOND_LAYER_PAGE_NAVIGATE_UP_BUTTON_IN_TWO_PANE, "true");
        DEFAULT_FLAGS.put(SETTINGS_HIDE_SECOND_LAYER_PAGE_NAVIGATE_UP_BUTTON_IN_TWO_PANE, "true");
+1 −0
Original line number Original line Diff line number Diff line
@@ -81,5 +81,6 @@
        <permission name="android.permission.READ_DEVICE_CONFIG" />
        <permission name="android.permission.READ_DEVICE_CONFIG" />
        <permission name="android.permission.READ_SAFETY_CENTER_STATUS" />
        <permission name="android.permission.READ_SAFETY_CENTER_STATUS" />
        <permission name="android.permission.SET_UNRESTRICTED_KEEP_CLEAR_AREAS" />
        <permission name="android.permission.SET_UNRESTRICTED_KEEP_CLEAR_AREAS" />
        <permission name="android.permission.READ_SEARCH_INDEXABLES" />
    </privapp-permissions>
    </privapp-permissions>
</permissions>
</permissions>
+11 −0
Original line number Original line Diff line number Diff line
@@ -152,6 +152,9 @@
    <uses-permission android:name="android.permission.CONTROL_KEYGUARD_SECURE_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.CONTROL_KEYGUARD_SECURE_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.GET_RUNTIME_PERMISSIONS" />
    <uses-permission android:name="android.permission.GET_RUNTIME_PERMISSIONS" />


    <!-- For auto-grant the access to the Settings' slice preferences, e.g. volume slices. -->
    <uses-permission android:name="android.permission.READ_SEARCH_INDEXABLES" />

    <!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked -->
    <!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked -->
    <uses-permission android:name="android.permission.SET_WALLPAPER"/>
    <uses-permission android:name="android.permission.SET_WALLPAPER"/>


@@ -956,5 +959,13 @@
            </intent-filter>
            </intent-filter>
        </receiver>
        </receiver>


        <receiver android:name=".volume.VolumePanelDialogReceiver"
                  android:exported="true">
            <intent-filter>
                <action android:name="android.settings.panel.action.VOLUME" />
                <action android:name="com.android.systemui.action.LAUNCH_VOLUME_PANEL_DIALOG" />
                <action android:name="com.android.systemui.action.DISMISS_VOLUME_PANEL_DIALOG" />
            </intent-filter>
        </receiver>
    </application>
    </application>
</manifest>
</manifest>
+101 −0
Original line number Original line 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.
  -->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/volume_panel_dialog"
    android:layout_width="@dimen/large_dialog_width"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@style/Widget.SliceView.Panel"
        android:gravity="center_vertical|center_horizontal"
        android:layout_marginTop="@dimen/dialog_top_padding"
        android:layout_marginBottom="@dimen/dialog_bottom_padding"
        android:orientation="vertical">

        <TextView
            android:id="@+id/volume_panel_dialog_title"
            android:ellipsize="end"
            android:gravity="center_vertical|center_horizontal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/sound_settings"
            android:textAppearance="@style/TextAppearance.Dialog.Title"/>
    </LinearLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/volume_panel_parent_layout"
        android:scrollbars="vertical"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:minHeight="304dp"
        android:layout_weight="1"
        android:overScrollMode="never"/>

    <LinearLayout
        android:id="@+id/button_layout"
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/dialog_button_vertical_padding"
        android:layout_marginStart="@dimen/dialog_side_padding"
        android:layout_marginEnd="@dimen/dialog_side_padding"
        android:layout_marginBottom="@dimen/dialog_bottom_padding"
        android:baselineAligned="false"
        android:clickable="false"
        android:focusable="false">

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_gravity="start|center_vertical"
            android:orientation="vertical">
            <Button
                android:id="@+id/settings_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/volume_panel_dialog_settings_button"
                android:ellipsize="end"
                android:maxLines="1"
                style="@style/Widget.Dialog.Button.BorderButton"
                android:clickable="true"
                android:focusable="true"/>
        </LinearLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/dialog_button_horizontal_padding"
            android:layout_gravity="end|center_vertical">
            <Button
                android:id="@+id/done_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/inline_done_button"
                style="@style/Widget.Dialog.Button"
                android:maxLines="1"
                android:ellipsize="end"
                android:clickable="true"
                android:focusable="true"/>
        </LinearLayout>
    </LinearLayout>
</LinearLayout>
+31 −0
Original line number Original line 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.
-->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/slice_slider_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <androidx.slice.widget.SliceView
        android:id="@+id/slice_view"
        style="@style/Widget.SliceView.Panel.Slider"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingVertical="@dimen/volume_panel_slice_vertical_padding"
        android:paddingHorizontal="@dimen/volume_panel_slice_horizontal_padding"/>
</LinearLayout>
 No newline at end of file
Loading