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

Commit 955f9d2d authored by Nicolò Mazzucato's avatar Nicolò Mazzucato Committed by Android (Google) Code Review
Browse files

Merge "Align mirroring bottom sheet to UX mocks" into main

parents 352e82e4 2f6c2a3c
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -15,8 +15,9 @@
  -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:id="@+id/cd_bottom_sheet"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_horizontal"
    android:orientation="vertical"
    android:paddingHorizontal="@dimen/dialog_side_padding"
@@ -26,11 +27,14 @@

    <ImageView
        android:id="@+id/connected_display_dialog_icon"
        android:layout_width="@dimen/screenrecord_logo_size"
        android:layout_height="@dimen/screenrecord_logo_size"
        android:layout_width="@dimen/connected_display_dialog_logo_size"
        android:layout_height="@dimen/connected_display_dialog_logo_size"
        android:background="@drawable/circular_background"
        android:backgroundTint="?androidprv:attr/materialColorPrimary"
        android:importantForAccessibility="no"
        android:padding="6dp"
        android:src="@drawable/stat_sys_connected_display"
        android:tint="?androidprv:attr/materialColorPrimary" />
        android:tint="?androidprv:attr/materialColorOnPrimary" />

    <TextView
        android:id="@+id/connected_display_dialog_title"
+3 −0
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@

    <bool name="config_use_large_screen_shade_header">true</bool>

    <!-- Whether to show bottom sheets edge to edge -->
    <bool name="config_edgeToEdgeBottomSheetDialog">false</bool>

    <!-- A collection of defaults for the quick affordances on the lock screen. Each item must be a
    string with two parts: the ID of the slot and the comma-delimited list of affordance IDs,
    separated by a colon ':' character. For example: <item>bottom_end:home,wallet</item>. The
+3 −0
Original line number Diff line number Diff line
@@ -947,6 +947,9 @@
    <!-- Flag controlling whether visual query attention detection has been enabled. -->
    <bool name="config_enableVisualQueryAttentionDetection">false</bool>

    <!-- Whether to show bottom sheets edge to edge -->
    <bool name="config_edgeToEdgeBottomSheetDialog">true</bool>

    <!--
    Whether the scene container framework is enabled.

+3 −0
Original line number Diff line number Diff line
@@ -1355,6 +1355,9 @@
    <dimen name="screenrecord_options_padding_bottom">16dp</dimen>
    <dimen name="screenrecord_buttons_margin_top">20dp</dimen>

    <!-- Connected display dialog -->
    <dimen name="connected_display_dialog_logo_size">48dp</dimen>

    <!-- Keyguard user switcher -->
    <dimen name="kg_user_switcher_text_size">16sp</dimen>

+3 −10
Original line number Diff line number Diff line
@@ -15,14 +15,12 @@
 */
package com.android.systemui.display.ui.view

import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.Gravity
import android.view.View
import android.view.WindowManager
import android.widget.TextView
import com.android.systemui.res.R
import com.android.systemui.statusbar.phone.SystemUIBottomSheetDialog

/**
 * Dialog used to decide what to do with a connected display.
@@ -35,7 +33,7 @@ class MirroringConfirmationDialog(
    private val onStartMirroringClickListener: View.OnClickListener,
    private val onCancelMirroring: View.OnClickListener,
    theme: Int = R.style.Theme_SystemUI_Dialog,
) : Dialog(context, theme) {
) : SystemUIBottomSheetDialog(context, theme) {

    private lateinit var mirrorButton: TextView
    private lateinit var dismissButton: TextView
@@ -43,13 +41,8 @@ class MirroringConfirmationDialog(

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        window?.apply {
            setType(WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL)
            addPrivateFlags(WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS)
            setGravity(Gravity.BOTTOM)
        }
        setContentView(R.layout.connected_display_dialog)
        setCanceledOnTouchOutside(true)

        mirrorButton =
            requireViewById<TextView>(R.id.enable_display).apply {
                setOnClickListener(onStartMirroringClickListener)
Loading