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

Commit 831ffad1 authored by Mady Mellor's avatar Mady Mellor Committed by Android (Google) Code Review
Browse files

Merge changes I60f2bedb,Ie0e3647b,I1c77a810 into sc-v2-dev

* changes:
  Fix up back press with bubbles manage menu or user education
  Fix touches activating TaskView when showing user education
  Updates to user education for large screen
parents 49571aa8 2d886505
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -17,7 +17,7 @@
<com.android.wm.shell.common.AlphaOptimizedButton
<com.android.wm.shell.common.AlphaOptimizedButton
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:android="http://schemas.android.com/apk/res/android"
    style="@android:style/Widget.DeviceDefault.Button.Borderless"
    style="@android:style/Widget.DeviceDefault.Button.Borderless"
    android:id="@+id/settings_button"
    android:id="@+id/manage_button"
    android:layout_gravity="start"
    android:layout_gravity="start"
    android:layout_width="wrap_content"
    android:layout_width="wrap_content"
    android:layout_height="@dimen/bubble_manage_button_height"
    android:layout_height="@dimen/bubble_manage_button_height"
+0 −1
Original line number Original line Diff line number Diff line
@@ -21,7 +21,6 @@
    android:layout_width="wrap_content"
    android:layout_width="wrap_content"
    android:paddingTop="48dp"
    android:paddingTop="48dp"
    android:paddingBottom="48dp"
    android:paddingBottom="48dp"
    android:paddingStart="@dimen/bubble_stack_user_education_side_inset"
    android:paddingEnd="16dp"
    android:paddingEnd="16dp"
    android:layout_marginEnd="24dp"
    android:layout_marginEnd="24dp"
    android:orientation="vertical"
    android:orientation="vertical"
+6 −13
Original line number Original line Diff line number Diff line
@@ -23,7 +23,6 @@
    android:clickable="true"
    android:clickable="true"
    android:paddingTop="28dp"
    android:paddingTop="28dp"
    android:paddingBottom="16dp"
    android:paddingBottom="16dp"
    android:paddingStart="@dimen/bubble_expanded_view_padding"
    android:paddingEnd="48dp"
    android:paddingEnd="48dp"
    android:layout_marginEnd="24dp"
    android:layout_marginEnd="24dp"
    android:orientation="vertical"
    android:orientation="vertical"
@@ -66,27 +65,21 @@
        android:id="@+id/button_layout"
        android:id="@+id/button_layout"
        android:orientation="horizontal" >
        android:orientation="horizontal" >


        <com.android.wm.shell.common.AlphaOptimizedButton
        <include
            style="@android:style/Widget.Material.Button.Borderless"
            layout="@layout/bubble_manage_button"
            android:id="@+id/manage"
            android:layout_gravity="start"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:focusable="true"
            android:clickable="false"
            android:text="@string/manage_bubbles_text"
            android:textColor="@android:color/system_neutral1_900"
            />
            />


        <com.android.wm.shell.common.AlphaOptimizedButton
        <com.android.wm.shell.common.AlphaOptimizedButton
            style="@android:style/Widget.Material.Button.Borderless"
            style="@android:style/Widget.DeviceDefault.Button.Borderless"
            android:id="@+id/got_it"
            android:id="@+id/got_it"
            android:layout_gravity="start"
            android:layout_gravity="start"
            android:layout_width="wrap_content"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_height="@dimen/bubble_manage_button_height"
            android:focusable="true"
            android:focusable="true"
            android:text="@string/bubbles_user_education_got_it"
            android:text="@string/bubbles_user_education_got_it"
            android:textSize="@*android:dimen/text_size_body_2_material"
            android:textColor="@android:color/system_neutral1_900"
            android:textColor="@android:color/system_neutral1_900"
            android:background="@drawable/bubble_manage_btn_bg"
            />
            />
    </LinearLayout>
    </LinearLayout>
</LinearLayout>
</LinearLayout>
+2 −8
Original line number Original line Diff line number Diff line
@@ -184,14 +184,8 @@
    <dimen name="bubble_dismiss_target_padding_x">40dp</dimen>
    <dimen name="bubble_dismiss_target_padding_x">40dp</dimen>
    <dimen name="bubble_dismiss_target_padding_y">20dp</dimen>
    <dimen name="bubble_dismiss_target_padding_y">20dp</dimen>
    <dimen name="bubble_manage_menu_elevation">4dp</dimen>
    <dimen name="bubble_manage_menu_elevation">4dp</dimen>

    <!-- Size of user education views on large screens (phone is just match parent). -->
    <!-- Bubbles user education views -->
    <dimen name="bubbles_user_education_width_large_screen">400dp</dimen>
    <dimen name="bubbles_manage_education_width">160dp</dimen>
    <!-- The inset from the top bound of the manage button to place the user education. -->
    <dimen name="bubbles_manage_education_top_inset">65dp</dimen>
    <!-- Size of padding for the user education cling, this should at minimum be larger than
        individual_bubble_size + some padding. -->
    <dimen name="bubble_stack_user_education_side_inset">72dp</dimen>


    <!-- The width/height of the size compat restart button. -->
    <!-- The width/height of the size compat restart button. -->
    <dimen name="size_compat_button_size">48dp</dimen>
    <dimen name="size_compat_button_size">48dp</dimen>
+9 −3
Original line number Original line Diff line number Diff line
@@ -636,10 +636,16 @@ public class BubbleController {
        }
        }
    }
    }


    /** For the overflow to be focusable & receive key events the flags must be update. **/
    /**
    void updateWindowFlagsForOverflow(boolean showingOverflow) {
     * In some situations bubble's should be able to receive key events for back:
     * - when the bubble overflow is showing
     * - when the user education for the stack is showing.
     *
     * @param interceptBack whether back should be intercepted or not.
     */
    void updateWindowFlagsForBackpress(boolean interceptBack) {
        if (mStackView != null && mAddedToWindowManager) {
        if (mStackView != null && mAddedToWindowManager) {
            mWmLayoutParams.flags = showingOverflow
            mWmLayoutParams.flags = interceptBack
                    ? 0
                    ? 0
                    : WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
                    : WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
                            | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
                            | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
Loading