Merge "[Search] [Race condition] Fix wrong titles showing on BubbleTextHolder" into sc-v2-dev
diff --git a/quickstep/res/drawable/default_sandbox_mock_launcher.xml b/quickstep/res/drawable/default_sandbox_mock_launcher.xml
deleted file mode 100644
index 38fbcf0..0000000
--- a/quickstep/res/drawable/default_sandbox_mock_launcher.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="360dp"
- android:height="146dp"
- android:viewportWidth="360"
- android:viewportHeight="146">
- <path
- android:pathData="M25,96L335,96A25,25 0,0 1,360 121L360,121A25,25 0,0 1,335 146L25,146A25,25 0,0 1,0 121L0,121A25,25 0,0 1,25 96z"
- android:fillColor="#3C4043"/>
- <path
- android:pathData="M30,30m-30,0a30,30 0,1 1,60 0a30,30 0,1 1,-60 0"
- android:fillColor="#8AB4F8"/>
- <path
- android:pathData="M130,30m-30,0a30,30 0,1 1,60 0a30,30 0,1 1,-60 0"
- android:fillColor="#F28B82"/>
- <path
- android:pathData="M230,30m-30,0a30,30 0,1 1,60 0a30,30 0,1 1,-60 0"
- android:fillColor="#FDD663"/>
- <path
- android:pathData="M330,30m-30,0a30,30 0,1 1,60 0a30,30 0,1 1,-60 0"
- android:fillColor="#81C995"/>
-</vector>
diff --git a/quickstep/res/layout/gesture_tutorial_foldable_mock_conversation.xml b/quickstep/res/layout/gesture_tutorial_foldable_mock_conversation.xml
new file mode 100644
index 0000000..34bd4e2
--- /dev/null
+++ b/quickstep/res/layout/gesture_tutorial_foldable_mock_conversation.xml
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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.
+-->
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/top_bar"
+ android:layout_width="match_parent"
+ android:layout_height="101dp"
+ android:background="@color/mock_conversation_top_bar"
+
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent">
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginTop="43dp"
+ android:layout_marginBottom="22dp"
+ android:layout_marginStart="126dp"
+ android:layout_marginEnd="548dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_conversation_top_bar_item"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginTop="43dp"
+ android:layout_marginBottom="22dp"
+ android:layout_marginStart="300dp"
+ android:layout_marginEnd="16dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_conversation_top_bar_item"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/top_bar_button"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/top_bar_button"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginTop="43dp"
+ android:layout_marginBottom="22dp"
+ android:layout_marginStart="300dp"
+ android:layout_marginEnd="126dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_conversation_top_bar_item"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:background="@color/mock_conversation_background"
+ android:paddingBottom="80dp"
+
+ app:layout_constraintTop_toBottomOf="@id/top_bar"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent">
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:paddingBottom="@dimen/gesture_tutorial_message_input_margin_top"
+
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/message_bar"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent">
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/message_1"
+ android:layout_width="0dp"
+ android:layout_height="112dp"
+ android:layout_marginBottom="@dimen/gesture_tutorial_message_large_margin_bottom"
+ android:layout_marginStart="445dp"
+ android:layout_marginEnd="@dimen/gesture_tutorial_foldable_message_padding_start_end"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="18dp"
+ app:cardBackgroundColor="@color/mock_conversation_sent_message"
+ app:layout_constraintBottom_toTopOf="@id/reply_icon_1"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/reply_icon_1"
+ android:layout_width="@dimen/gesture_tutorial_message_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_message_icon_size"
+ android:layout_marginBottom="@dimen/gesture_tutorial_message_large_margin_bottom"
+ android:layout_marginStart="@dimen/gesture_tutorial_foldable_message_padding_start_end"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_message_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_conversation_profile_icon"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintBottom_toTopOf="@id/message_2"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="0dp"
+ android:layout_height="36dp"
+ android:layout_marginStart="17dp"
+ android:layout_marginEnd="441dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="18dp"
+ app:cardBackgroundColor="@color/mock_conversation_received_message"
+ app:layout_constraintTop_toTopOf="@id/reply_icon_1"
+ app:layout_constraintBottom_toBottomOf="@id/reply_icon_1"
+ app:layout_constraintStart_toEndOf="@id/reply_icon_1"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/message_2"
+ android:layout_width="0dp"
+ android:layout_height="36dp"
+ android:layout_marginBottom="@dimen/gesture_tutorial_message_small_margin_bottom"
+ android:layout_marginStart="601dp"
+ android:layout_marginEnd="@dimen/gesture_tutorial_foldable_message_padding_start_end"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="18dp"
+ app:cardBackgroundColor="@color/mock_conversation_sent_message"
+ app:layout_constraintBottom_toTopOf="@id/message_3"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/message_3"
+ android:layout_width="0dp"
+ android:layout_height="74dp"
+ android:layout_marginBottom="@dimen/gesture_tutorial_message_large_margin_bottom"
+ android:layout_marginStart="445dp"
+ android:layout_marginEnd="@dimen/gesture_tutorial_foldable_message_padding_start_end"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="18dp"
+ app:cardBackgroundColor="@color/mock_conversation_sent_message"
+ app:layout_constraintBottom_toTopOf="@id/reply_icon_2"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/reply_icon_2"
+ android:layout_width="@dimen/gesture_tutorial_message_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_message_icon_size"
+ android:layout_marginBottom="32dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_foldable_message_padding_start_end"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_message_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_conversation_profile_icon"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintBottom_toTopOf="@id/message_4"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="0dp"
+ android:layout_height="36dp"
+ android:layout_marginStart="17dp"
+ android:layout_marginEnd="473dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="18dp"
+ app:cardBackgroundColor="@color/mock_conversation_received_message"
+ app:layout_constraintTop_toTopOf="@id/reply_icon_2"
+ app:layout_constraintBottom_toBottomOf="@id/reply_icon_2"
+ app:layout_constraintStart_toEndOf="@id/reply_icon_2"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/message_4"
+ android:layout_width="0dp"
+ android:layout_height="74dp"
+ android:layout_marginStart="445dp"
+ android:layout_marginEnd="@dimen/gesture_tutorial_foldable_message_padding_start_end"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="18dp"
+ app:cardBackgroundColor="@color/mock_conversation_sent_message"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/message_bar"
+ android:layout_width="0dp"
+ android:layout_height="44dp"
+ android:layout_marginTop="36dp"
+ android:layout_marginBottom="24dp"
+ android:layout_marginStart="134dp"
+ android:layout_marginEnd="126dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="164dp"
+ app:cardBackgroundColor="@color/mock_conversation_message_input"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent" />
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/quickstep/res/layout/gesture_tutorial_foldable_mock_conversation_list.xml b/quickstep/res/layout/gesture_tutorial_foldable_mock_conversation_list.xml
new file mode 100644
index 0000000..0309cc3
--- /dev/null
+++ b/quickstep/res/layout/gesture_tutorial_foldable_mock_conversation_list.xml
@@ -0,0 +1,396 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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.
+-->
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/top_bar"
+ android:layout_width="match_parent"
+ android:layout_height="101dp"
+ android:background="@color/mock_list_top_bar"
+
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent">
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginTop="43dp"
+ android:layout_marginBottom="22dp"
+ android:layout_marginStart="126dp"
+ android:layout_marginEnd="126dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_top_bar_item"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:background="@color/mock_list_background"
+ android:paddingBottom="80dp"
+
+ app:layout_constraintTop_toBottomOf="@id/top_bar"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent">
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:paddingTop="@dimen/gesture_tutorial_conversation_list_padding_top"
+ android:paddingStart="126dp"
+
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/mock_button">
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_icon_1"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_list_profile_icon"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_1"
+ android:layout_width="0dp"
+ android:layout_height="18dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="270dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintVertical_chainStyle="packed"
+ app:layout_constraintTop_toTopOf="@id/conversation_icon_1"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_1"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/conversation_line_2"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_2"
+ android:layout_width="0dp"
+ android:layout_height="16dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="110dp"
+ android:layout_marginTop="4dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintTop_toBottomOf="@id/conversation_line_1"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_1"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="@id/conversation_icon_1"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_icon_2"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_marginTop="32dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_list_profile_icon"
+ app:layout_constraintTop_toBottomOf="@id/conversation_icon_1"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_3"
+ android:layout_width="0dp"
+ android:layout_height="18dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="243dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintVertical_chainStyle="packed"
+ app:layout_constraintTop_toTopOf="@id/conversation_icon_2"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_2"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/conversation_line_4"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_4"
+ android:layout_width="0dp"
+ android:layout_height="16dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="154dp"
+ android:layout_marginTop="4dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintTop_toBottomOf="@id/conversation_line_3"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_2"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="@id/conversation_icon_2"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_icon_3"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_marginTop="32dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_list_profile_icon"
+ app:layout_constraintTop_toBottomOf="@id/conversation_icon_2"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_5"
+ android:layout_width="0dp"
+ android:layout_height="18dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="251dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintVertical_chainStyle="packed"
+ app:layout_constraintTop_toTopOf="@id/conversation_icon_3"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_3"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/conversation_line_6"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_6"
+ android:layout_width="0dp"
+ android:layout_height="16dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="15dp"
+ android:layout_marginTop="4dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintTop_toBottomOf="@id/conversation_line_5"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_3"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="@id/conversation_icon_3"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_icon_4"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_marginTop="32dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_list_profile_icon"
+ app:layout_constraintTop_toBottomOf="@id/conversation_icon_3"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_7"
+ android:layout_width="0dp"
+ android:layout_height="18dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="227dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintVertical_chainStyle="packed"
+ app:layout_constraintTop_toTopOf="@id/conversation_icon_4"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_4"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/conversation_line_8"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_8"
+ android:layout_width="0dp"
+ android:layout_height="16dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="72dp"
+ android:layout_marginTop="4dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintTop_toBottomOf="@id/conversation_line_7"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_4"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="@id/conversation_icon_4"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_icon_5"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_marginTop="32dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_list_profile_icon"
+ app:layout_constraintTop_toBottomOf="@id/conversation_icon_4"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_9"
+ android:layout_width="0dp"
+ android:layout_height="18dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="297dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintVertical_chainStyle="packed"
+ app:layout_constraintTop_toTopOf="@id/conversation_icon_5"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_5"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/conversation_line_10"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_10"
+ android:layout_width="0dp"
+ android:layout_height="16dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="111dp"
+ android:layout_marginTop="4dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintTop_toBottomOf="@id/conversation_line_9"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_5"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="@id/conversation_icon_5"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_icon_6"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_marginTop="32dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_list_profile_icon"
+ app:layout_constraintTop_toBottomOf="@id/conversation_icon_5"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_11"
+ android:layout_width="0dp"
+ android:layout_height="18dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="230dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintVertical_chainStyle="packed"
+ app:layout_constraintTop_toTopOf="@id/conversation_icon_6"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_6"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/conversation_line_12"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_12"
+ android:layout_width="0dp"
+ android:layout_height="16dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="72dp"
+ android:layout_marginTop="4dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintTop_toBottomOf="@id/conversation_line_11"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_6"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="@id/conversation_icon_6"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_icon_7"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_marginTop="32dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_list_profile_icon"
+ app:layout_constraintTop_toBottomOf="@id/conversation_icon_6"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_13"
+ android:layout_width="0dp"
+ android:layout_height="18dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="242dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintVertical_chainStyle="packed"
+ app:layout_constraintTop_toTopOf="@id/conversation_icon_7"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_7"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/conversation_line_14"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/conversation_line_14"
+ android:layout_width="0dp"
+ android:layout_height="16dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
+ android:layout_marginEnd="219dp"
+ android:layout_marginTop="4dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="4dp"
+ app:cardBackgroundColor="@color/mock_list_preview_message"
+ app:layout_constraintTop_toBottomOf="@id/conversation_line_13"
+ app:layout_constraintStart_toEndOf="@id/conversation_icon_7"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="@id/conversation_icon_7"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/mock_button"
+ android:layout_width="149dp"
+ android:layout_height="56dp"
+ android:layout_marginEnd="126dp"
+ android:layout_marginBottom="24dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="164dp"
+ app:cardBackgroundColor="@color/mock_list_button"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/quickstep/res/layout/gesture_tutorial_foldable_mock_hotseat.xml b/quickstep/res/layout/gesture_tutorial_foldable_mock_hotseat.xml
new file mode 100644
index 0000000..5612666
--- /dev/null
+++ b/quickstep/res/layout/gesture_tutorial_foldable_mock_hotseat.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="32dp"
+ android:paddingStart="170dp"
+ android:paddingEnd="170dp">
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/hotseat_search_bar"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_search_height"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_search_corner_radius"
+ app:cardBackgroundColor="@color/mock_search_bar"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/hotseat_icon_1"
+ android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_marginTop="@dimen/gesture_tutorial_hotseat_icon_search_margin"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_app_icon_1"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintHorizontal_chainStyle="spread_inside"
+ app:layout_constraintTop_toBottomOf="@id/hotseat_search_bar"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/hotseat_icon_2"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/hotseat_icon_2"
+ android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_marginTop="@dimen/gesture_tutorial_hotseat_icon_search_margin"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_app_icon_2"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintTop_toBottomOf="@id/hotseat_search_bar"
+ app:layout_constraintStart_toEndOf="@id/hotseat_icon_1"
+ app:layout_constraintEnd_toStartOf="@id/hotseat_icon_3"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/hotseat_icon_3"
+ android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_marginTop="@dimen/gesture_tutorial_hotseat_icon_search_margin"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_app_icon_3"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintTop_toBottomOf="@id/hotseat_search_bar"
+ app:layout_constraintStart_toEndOf="@id/hotseat_icon_2"
+ app:layout_constraintEnd_toStartOf="@id/hotseat_icon_4"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/hotseat_icon_4"
+ android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_marginTop="@dimen/gesture_tutorial_hotseat_icon_search_margin"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_app_icon_1"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintTop_toBottomOf="@id/hotseat_search_bar"
+ app:layout_constraintStart_toEndOf="@id/hotseat_icon_3"
+ app:layout_constraintEnd_toStartOf="@id/hotseat_icon_5"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/hotseat_icon_5"
+ android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_marginTop="@dimen/gesture_tutorial_hotseat_icon_search_margin"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_app_icon_4"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintTop_toBottomOf="@id/hotseat_search_bar"
+ app:layout_constraintStart_toEndOf="@id/hotseat_icon_4"
+ app:layout_constraintEnd_toStartOf="@id/hotseat_icon_6"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/hotseat_icon_6"
+ android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_marginTop="@dimen/gesture_tutorial_hotseat_icon_search_margin"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_app_icon_2"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintTop_toBottomOf="@id/hotseat_search_bar"
+ app:layout_constraintStart_toEndOf="@id/hotseat_icon_5"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/quickstep/res/layout/gesture_tutorial_foldable_mock_webpage.xml b/quickstep/res/layout/gesture_tutorial_foldable_mock_webpage.xml
new file mode 100644
index 0000000..67e9b02
--- /dev/null
+++ b/quickstep/res/layout/gesture_tutorial_foldable_mock_webpage.xml
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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.
+-->
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/mock_webpage_background">
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/url_bar"
+ android:layout_width="match_parent"
+ android:layout_height="101dp"
+ android:background="@color/mock_webpage_url_bar"
+
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent">
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginTop="48dp"
+ android:layout_marginBottom="16dp"
+ android:layout_marginStart="100dp"
+ android:layout_marginEnd="100dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="100dp"
+ app:cardBackgroundColor="@color/mock_webpage_url_bar_item"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/top_bar"
+ android:layout_width="match_parent"
+ android:layout_height="88dp"
+ android:layout_marginStart="100dp"
+ android:layout_marginEnd="100dp"
+ android:background="@color/mock_webpage_top_bar"
+
+ app:layout_constraintTop_toBottomOf="@id/url_bar"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent">
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/top_bar_button"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginTop="22dp"
+ android:layout_marginBottom="22dp"
+ android:layout_marginStart="24dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="8dp"
+ app:cardBackgroundColor="@color/mock_webpage_top_bar_item"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginTop="28dp"
+ android:layout_marginBottom="28dp"
+ android:layout_marginStart="97dp"
+ android:layout_marginEnd="325dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="2dp"
+ app:cardBackgroundColor="@color/mock_webpage_top_bar_item"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:background="@color/mock_webpage_background"
+ android:paddingTop="@dimen/gesture_tutorial_webpage_padding_top"
+ android:paddingStart="124dp"
+ android:paddingEnd="100dp"
+
+ app:layout_constraintTop_toBottomOf="@id/top_bar"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent">
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/mock_line_1"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_large_line_height"
+ android:layout_marginEnd="126dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_small_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/mock_line_2"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_large_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
+ android:layout_marginEnd="64dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_small_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toBottomOf="@id/mock_line_1"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/mock_line_3"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_large_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
+ android:layout_marginEnd="151dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_small_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toBottomOf="@id/mock_line_2"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/mock_button"
+ android:layout_width="47dp"
+ android:layout_height="12dp"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_small_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toBottomOf="@id/mock_line_3"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="47dp"
+ android:layout_height="12dp"
+ android:background="@color/mock_webpage_page_text"
+ android:layout_marginStart="11dp"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_small_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toBottomOf="@id/mock_line_3"
+ app:layout_constraintStart_toEndOf="@id/mock_button"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/mock_block"
+ android:layout_width="0dp"
+ android:layout_height="240dp"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_large_margin_top"
+ android:layout_marginEnd="24dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_large_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toBottomOf="@id/mock_button"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/mock_line_4"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_large_margin_top"
+ android:layout_marginEnd="52dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toBottomOf="@id/mock_block"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/mock_line_5"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
+ android:layout_marginEnd="41dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toBottomOf="@id/mock_line_4"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/mock_line_6"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
+ android:layout_marginEnd="71dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toBottomOf="@id/mock_line_5"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/mock_line_7"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
+ android:layout_marginEnd="198dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toBottomOf="@id/mock_line_6"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/mock_line_8"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_large_margin_top"
+ android:layout_marginEnd="64dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toBottomOf="@id/mock_line_7"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="0dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
+ android:layout_marginEnd="71dp"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
+ app:cardBackgroundColor="@color/mock_webpage_page_text"
+ app:layout_constraintTop_toBottomOf="@id/mock_line_8"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/quickstep/res/layout/gesture_tutorial_fragment.xml b/quickstep/res/layout/gesture_tutorial_fragment.xml
index 0f01190..41d0a1d 100644
--- a/quickstep/res/layout/gesture_tutorial_fragment.xml
+++ b/quickstep/res/layout/gesture_tutorial_fragment.xml
@@ -25,13 +25,12 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <ImageView
+ <FrameLayout
android:id="@+id/gesture_tutorial_fake_hotseat_view"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="70dp"/>
+ android:layout_alignParentBottom="true"/>
</RelativeLayout>
@@ -128,8 +127,6 @@
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
- android:layout_marginStart="@dimen/gesture_tutorial_feedback_margin_start_end"
- android:layout_marginEnd="@dimen/gesture_tutorial_feedback_margin_start_end"
android:layout_marginTop="24dp"
android:paddingTop="24dp"
android:paddingBottom="16dp"
diff --git a/quickstep/res/layout/gesture_tutorial_mock_conversation.xml b/quickstep/res/layout/gesture_tutorial_mock_conversation.xml
index 9951663..e8d5d79 100644
--- a/quickstep/res/layout/gesture_tutorial_mock_conversation.xml
+++ b/quickstep/res/layout/gesture_tutorial_mock_conversation.xml
@@ -94,7 +94,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
- android:paddingBottom="36dp"
+ android:paddingBottom="@dimen/gesture_tutorial_message_input_margin_top"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/message_bar"
@@ -105,9 +105,9 @@
android:id="@+id/message_1"
android:layout_width="0dp"
android:layout_height="112dp"
- android:layout_marginBottom="32dp"
+ android:layout_marginBottom="@dimen/gesture_tutorial_message_large_margin_bottom"
android:layout_marginStart="124dp"
- android:layout_marginEnd="18dp"
+ android:layout_marginEnd="@dimen/gesture_tutorial_message_padding_end"
app:cardElevation="0dp"
app:cardCornerRadius="18dp"
@@ -118,13 +118,13 @@
<androidx.cardview.widget.CardView
android:id="@+id/reply_icon_1"
- android:layout_width="44dp"
- android:layout_height="44dp"
- android:layout_marginBottom="32dp"
- android:layout_marginStart="26dp"
+ android:layout_width="@dimen/gesture_tutorial_message_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_message_icon_size"
+ android:layout_marginBottom="@dimen/gesture_tutorial_message_large_margin_bottom"
+ android:layout_marginStart="@dimen/gesture_tutorial_message_padding_start"
app:cardElevation="0dp"
- app:cardCornerRadius="100dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_message_icon_corner_radius"
app:cardBackgroundColor="@color/mock_conversation_profile_icon"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintBottom_toTopOf="@id/message_2"
@@ -148,9 +148,9 @@
android:id="@+id/message_2"
android:layout_width="0dp"
android:layout_height="36dp"
- android:layout_marginBottom="4dp"
+ android:layout_marginBottom="@dimen/gesture_tutorial_message_small_margin_bottom"
android:layout_marginStart="280dp"
- android:layout_marginEnd="18dp"
+ android:layout_marginEnd="@dimen/gesture_tutorial_message_padding_end"
app:cardElevation="0dp"
app:cardCornerRadius="18dp"
@@ -163,9 +163,9 @@
android:id="@+id/message_3"
android:layout_width="0dp"
android:layout_height="74dp"
- android:layout_marginBottom="32dp"
+ android:layout_marginBottom="@dimen/gesture_tutorial_message_large_margin_bottom"
android:layout_marginStart="124dp"
- android:layout_marginEnd="18dp"
+ android:layout_marginEnd="@dimen/gesture_tutorial_message_padding_end"
app:cardElevation="0dp"
app:cardCornerRadius="18dp"
@@ -176,13 +176,13 @@
<androidx.cardview.widget.CardView
android:id="@+id/reply_icon_2"
- android:layout_width="44dp"
- android:layout_height="44dp"
- android:layout_marginBottom="32dp"
- android:layout_marginStart="26dp"
+ android:layout_width="@dimen/gesture_tutorial_message_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_message_icon_size"
+ android:layout_marginBottom="@dimen/gesture_tutorial_message_large_margin_bottom"
+ android:layout_marginStart="@dimen/gesture_tutorial_message_padding_start"
app:cardElevation="0dp"
- app:cardCornerRadius="100dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_message_icon_corner_radius"
app:cardBackgroundColor="@color/mock_conversation_profile_icon"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintBottom_toTopOf="@id/message_4"
@@ -207,7 +207,7 @@
android:layout_width="0dp"
android:layout_height="74dp"
android:layout_marginStart="124dp"
- android:layout_marginEnd="18dp"
+ android:layout_marginEnd="@dimen/gesture_tutorial_message_padding_end"
app:cardElevation="0dp"
app:cardCornerRadius="18dp"
diff --git a/quickstep/res/layout/gesture_tutorial_mock_conversation_list.xml b/quickstep/res/layout/gesture_tutorial_mock_conversation_list.xml
index ad6b165..364ad6d 100644
--- a/quickstep/res/layout/gesture_tutorial_mock_conversation_list.xml
+++ b/quickstep/res/layout/gesture_tutorial_mock_conversation_list.xml
@@ -61,7 +61,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
- android:paddingTop="28dp"
+ android:paddingTop="@dimen/gesture_tutorial_conversation_list_padding_top"
android:paddingStart="26dp"
android:paddingBottom="14dp"
@@ -70,11 +70,11 @@
<androidx.cardview.widget.CardView
android:id="@+id/conversation_icon_1"
- android:layout_width="56dp"
- android:layout_height="56dp"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
app:cardElevation="0dp"
- app:cardCornerRadius="100dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
app:cardBackgroundColor="@color/mock_list_profile_icon"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
@@ -83,7 +83,7 @@
android:id="@+id/conversation_line_1"
android:layout_width="0dp"
android:layout_height="18dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="217dp"
app:cardElevation="0dp"
@@ -99,7 +99,7 @@
android:id="@+id/conversation_line_2"
android:layout_width="0dp"
android:layout_height="16dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="142dp"
android:layout_marginTop="4dp"
@@ -113,12 +113,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/conversation_icon_2"
- android:layout_width="56dp"
- android:layout_height="56dp"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
android:layout_marginTop="32dp"
app:cardElevation="0dp"
- app:cardCornerRadius="100dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
app:cardBackgroundColor="@color/mock_list_profile_icon"
app:layout_constraintTop_toBottomOf="@id/conversation_icon_1"
app:layout_constraintStart_toStartOf="parent"/>
@@ -127,7 +127,7 @@
android:id="@+id/conversation_line_3"
android:layout_width="0dp"
android:layout_height="18dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="190dp"
app:cardElevation="0dp"
@@ -143,7 +143,7 @@
android:id="@+id/conversation_line_4"
android:layout_width="0dp"
android:layout_height="16dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="171dp"
android:layout_marginTop="4dp"
@@ -157,12 +157,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/conversation_icon_3"
- android:layout_width="56dp"
- android:layout_height="56dp"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
android:layout_marginTop="32dp"
app:cardElevation="0dp"
- app:cardCornerRadius="100dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
app:cardBackgroundColor="@color/mock_list_profile_icon"
app:layout_constraintTop_toBottomOf="@id/conversation_icon_2"
app:layout_constraintStart_toStartOf="parent"/>
@@ -171,7 +171,7 @@
android:id="@+id/conversation_line_5"
android:layout_width="0dp"
android:layout_height="18dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="198dp"
app:cardElevation="0dp"
@@ -187,7 +187,7 @@
android:id="@+id/conversation_line_6"
android:layout_width="0dp"
android:layout_height="16dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="79dp"
android:layout_marginTop="4dp"
@@ -201,12 +201,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/conversation_icon_4"
- android:layout_width="56dp"
- android:layout_height="56dp"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
android:layout_marginTop="32dp"
app:cardElevation="0dp"
- app:cardCornerRadius="100dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
app:cardBackgroundColor="@color/mock_list_profile_icon"
app:layout_constraintTop_toBottomOf="@id/conversation_icon_3"
app:layout_constraintStart_toStartOf="parent"/>
@@ -215,7 +215,7 @@
android:id="@+id/conversation_line_7"
android:layout_width="0dp"
android:layout_height="18dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="174dp"
app:cardElevation="0dp"
@@ -231,7 +231,7 @@
android:id="@+id/conversation_line_8"
android:layout_width="0dp"
android:layout_height="16dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="117dp"
android:layout_marginTop="4dp"
@@ -245,12 +245,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/conversation_icon_5"
- android:layout_width="56dp"
- android:layout_height="56dp"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
android:layout_marginTop="32dp"
app:cardElevation="0dp"
- app:cardCornerRadius="100dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
app:cardBackgroundColor="@color/mock_list_profile_icon"
app:layout_constraintTop_toBottomOf="@id/conversation_icon_4"
app:layout_constraintStart_toStartOf="parent"/>
@@ -259,7 +259,7 @@
android:id="@+id/conversation_line_9"
android:layout_width="0dp"
android:layout_height="18dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="244dp"
app:cardElevation="0dp"
@@ -275,7 +275,7 @@
android:id="@+id/conversation_line_10"
android:layout_width="0dp"
android:layout_height="16dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="143dp"
android:layout_marginTop="4dp"
@@ -289,12 +289,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/conversation_icon_6"
- android:layout_width="56dp"
- android:layout_height="56dp"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
android:layout_marginTop="32dp"
app:cardElevation="0dp"
- app:cardCornerRadius="100dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
app:cardBackgroundColor="@color/mock_list_profile_icon"
app:layout_constraintTop_toBottomOf="@id/conversation_icon_5"
app:layout_constraintStart_toStartOf="parent"/>
@@ -303,7 +303,7 @@
android:id="@+id/conversation_line_11"
android:layout_width="0dp"
android:layout_height="18dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="177dp"
app:cardElevation="0dp"
@@ -319,7 +319,7 @@
android:id="@+id/conversation_line_12"
android:layout_width="0dp"
android:layout_height="16dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="117dp"
android:layout_marginTop="4dp"
@@ -333,12 +333,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/conversation_icon_7"
- android:layout_width="56dp"
- android:layout_height="56dp"
+ android:layout_width="@dimen/gesture_tutorial_conversation_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_conversation_icon_size"
android:layout_marginTop="32dp"
app:cardElevation="0dp"
- app:cardCornerRadius="100dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_conversation_icon_corner_radius"
app:cardBackgroundColor="@color/mock_list_profile_icon"
app:layout_constraintTop_toBottomOf="@id/conversation_icon_6"
app:layout_constraintStart_toStartOf="parent"/>
@@ -347,7 +347,7 @@
android:id="@+id/conversation_line_13"
android:layout_width="0dp"
android:layout_height="18dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="189dp"
app:cardElevation="0dp"
@@ -363,7 +363,7 @@
android:id="@+id/conversation_line_14"
android:layout_width="0dp"
android:layout_height="16dp"
- android:layout_marginStart="20dp"
+ android:layout_marginStart="@dimen/gesture_tutorial_conversation_line_padding_start"
android:layout_marginEnd="166dp"
android:layout_marginTop="4dp"
diff --git a/quickstep/res/layout/gesture_tutorial_mock_hotseat.xml b/quickstep/res/layout/gesture_tutorial_mock_hotseat.xml
new file mode 100644
index 0000000..b3e86cf
--- /dev/null
+++ b/quickstep/res/layout/gesture_tutorial_mock_hotseat.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="70dp"
+ android:paddingStart="26dp"
+ android:paddingEnd="26dp">
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/hotseat_icon_1"
+ android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_app_icon_1"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintHorizontal_chainStyle="spread_inside"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/hotseat_icon_2"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/hotseat_icon_2"
+ android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_app_icon_2"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toEndOf="@id/hotseat_icon_1"
+ app:layout_constraintEnd_toStartOf="@id/hotseat_icon_3"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/hotseat_icon_3"
+ android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_app_icon_3"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toEndOf="@id/hotseat_icon_2"
+ app:layout_constraintEnd_toStartOf="@id/hotseat_icon_4"/>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/hotseat_icon_4"
+ android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
+ app:cardBackgroundColor="@color/mock_app_icon_4"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toEndOf="@id/hotseat_icon_3"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="0dp"
+ android:layout_height="@dimen/gesture_tutorial_hotseat_search_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_hotseat_icon_search_margin"
+
+ app:cardElevation="0dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_search_corner_radius"
+ app:cardBackgroundColor="@color/mock_search_bar"
+ app:layout_constraintTop_toBottomOf="@id/hotseat_icon_1"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/quickstep/res/layout/gesture_tutorial_mock_webpage.xml b/quickstep/res/layout/gesture_tutorial_mock_webpage.xml
index ab00a11..bb20968 100644
--- a/quickstep/res/layout/gesture_tutorial_mock_webpage.xml
+++ b/quickstep/res/layout/gesture_tutorial_mock_webpage.xml
@@ -64,7 +64,6 @@
android:layout_marginTop="22dp"
android:layout_marginBottom="22dp"
android:layout_marginStart="24dp"
- android:layout_marginEnd="344dp"
app:cardElevation="0dp"
app:cardCornerRadius="8dp"
@@ -72,8 +71,7 @@
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintEnd_toEndOf="parent"/>
+ app:layout_constraintStart_toStartOf="parent"/>
<androidx.cardview.widget.CardView
android:layout_width="0dp"
@@ -97,9 +95,8 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/mock_webpage_background"
- android:paddingTop="32dp"
+ android:paddingTop="@dimen/gesture_tutorial_webpage_padding_top"
android:paddingStart="24dp"
- android:paddingBottom="50dp"
app:layout_constraintTop_toBottomOf="@id/top_bar"
app:layout_constraintBottom_toBottomOf="parent"
@@ -109,11 +106,11 @@
<androidx.cardview.widget.CardView
android:id="@+id/mock_line_1"
android:layout_width="0dp"
- android:layout_height="36dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_large_line_height"
android:layout_marginEnd="126dp"
app:cardElevation="0dp"
- app:cardCornerRadius="4dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_small_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -122,12 +119,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/mock_line_2"
android:layout_width="0dp"
- android:layout_height="36dp"
- android:layout_marginTop="8dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_large_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
android:layout_marginEnd="64dp"
app:cardElevation="0dp"
- app:cardCornerRadius="4dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_small_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toBottomOf="@id/mock_line_1"
app:layout_constraintStart_toStartOf="parent"
@@ -136,12 +133,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/mock_line_3"
android:layout_width="0dp"
- android:layout_height="36dp"
- android:layout_marginTop="8dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_large_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
android:layout_marginEnd="151dp"
app:cardElevation="0dp"
- app:cardCornerRadius="4dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_small_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toBottomOf="@id/mock_line_2"
app:layout_constraintStart_toStartOf="parent"
@@ -151,10 +148,10 @@
android:id="@+id/mock_button"
android:layout_width="47dp"
android:layout_height="12dp"
- android:layout_marginTop="8dp"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
app:cardElevation="0dp"
- app:cardCornerRadius="4dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_small_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toBottomOf="@id/mock_line_3"
app:layout_constraintStart_toStartOf="parent"/>
@@ -164,10 +161,10 @@
android:layout_height="12dp"
android:background="@color/mock_webpage_page_text"
android:layout_marginStart="11dp"
- android:layout_marginTop="8dp"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
app:cardElevation="0dp"
- app:cardCornerRadius="4dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_small_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toBottomOf="@id/mock_line_3"
app:layout_constraintStart_toEndOf="@id/mock_button"/>
@@ -176,11 +173,11 @@
android:id="@+id/mock_block"
android:layout_width="0dp"
android:layout_height="240dp"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_large_margin_top"
android:layout_marginEnd="24dp"
app:cardElevation="0dp"
- app:cardCornerRadius="22dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_large_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toBottomOf="@id/mock_button"
app:layout_constraintStart_toStartOf="parent"
@@ -189,12 +186,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/mock_line_4"
android:layout_width="0dp"
- android:layout_height="22dp"
- android:layout_marginTop="24dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_large_margin_top"
android:layout_marginEnd="52dp"
app:cardElevation="0dp"
- app:cardCornerRadius="8dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toBottomOf="@id/mock_block"
app:layout_constraintStart_toStartOf="parent"
@@ -203,12 +200,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/mock_line_5"
android:layout_width="0dp"
- android:layout_height="22dp"
- android:layout_marginTop="8dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
android:layout_marginEnd="41dp"
app:cardElevation="0dp"
- app:cardCornerRadius="8dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toBottomOf="@id/mock_line_4"
app:layout_constraintStart_toStartOf="parent"
@@ -217,12 +214,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/mock_line_6"
android:layout_width="0dp"
- android:layout_height="22dp"
- android:layout_marginTop="8dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
android:layout_marginEnd="71dp"
app:cardElevation="0dp"
- app:cardCornerRadius="8dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toBottomOf="@id/mock_line_5"
app:layout_constraintStart_toStartOf="parent"
@@ -231,12 +228,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/mock_line_7"
android:layout_width="0dp"
- android:layout_height="22dp"
- android:layout_marginTop="8dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
android:layout_marginEnd="198dp"
app:cardElevation="0dp"
- app:cardCornerRadius="8dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toBottomOf="@id/mock_line_6"
app:layout_constraintStart_toStartOf="parent"
@@ -245,12 +242,12 @@
<androidx.cardview.widget.CardView
android:id="@+id/mock_line_8"
android:layout_width="0dp"
- android:layout_height="22dp"
- android:layout_marginTop="24dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_large_margin_top"
android:layout_marginEnd="64dp"
app:cardElevation="0dp"
- app:cardCornerRadius="8dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toBottomOf="@id/mock_line_7"
app:layout_constraintStart_toStartOf="parent"
@@ -258,12 +255,12 @@
<androidx.cardview.widget.CardView
android:layout_width="0dp"
- android:layout_height="22dp"
- android:layout_marginTop="8dp"
+ android:layout_height="@dimen/gesture_tutorial_webpage_small_line_height"
+ android:layout_marginTop="@dimen/gesture_tutorial_webpage_small_margin_top"
android:layout_marginEnd="71dp"
app:cardElevation="0dp"
- app:cardCornerRadius="8dp"
+ app:cardCornerRadius="@dimen/gesture_tutorial_webpage_medium_corner_radius"
app:cardBackgroundColor="@color/mock_webpage_page_text"
app:layout_constraintTop_toBottomOf="@id/mock_line_8"
app:layout_constraintStart_toStartOf="parent"
diff --git a/quickstep/res/values/colors.xml b/quickstep/res/values/colors.xml
index 4755292..5edcc9d 100644
--- a/quickstep/res/values/colors.xml
+++ b/quickstep/res/values/colors.xml
@@ -41,6 +41,13 @@
<color name="gesture_tutorial_action_button_label_color">#FF000000</color>
<color name="gesture_tutorial_primary_color">#B7F29F</color> <!-- Light Green -->
+ <!-- Mock hotseat -->
+ <color name="mock_app_icon_1">#8AB4F8</color>
+ <color name="mock_app_icon_2">#F28B82</color>
+ <color name="mock_app_icon_3">#FDD663</color>
+ <color name="mock_app_icon_4">#81C995</color>
+ <color name="mock_search_bar">#3C4043</color>
+
<!-- Mock conversation -->
<color name="mock_conversation_background">#f1f3f4</color>
<color name="mock_conversation_top_bar">#e8eaed</color>
diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml
index a6a6bbd..e08eda8 100644
--- a/quickstep/res/values/dimens.xml
+++ b/quickstep/res/values/dimens.xml
@@ -117,13 +117,44 @@
<dimen name="gestures_overscroll_finish_threshold">136dp</dimen>
<!-- Tips Gesture Tutorial -->
- <dimen name="gesture_tutorial_title_margin_start_end">40dp</dimen>
- <dimen name="gesture_tutorial_subtitle_margin_start_end">16dp</dimen>
<dimen name="gesture_tutorial_feedback_margin_start_end">24dp</dimen>
- <dimen name="gesture_tutorial_button_margin_start_end">18dp</dimen>
+ <dimen name="gesture_tutorial_foldable_feedback_margin_start_end">140dp</dimen>
<dimen name="gesture_tutorial_multi_row_task_view_spacing">72dp</dimen>
<dimen name="gesture_tutorial_small_task_view_corner_radius">18dp</dimen>
+ <!-- Gesture Tutorial mock conversations -->
+ <dimen name="gesture_tutorial_message_icon_size">44dp</dimen>
+ <dimen name="gesture_tutorial_message_icon_corner_radius">100dp</dimen>
+ <dimen name="gesture_tutorial_message_input_margin_top">36dp</dimen>
+ <dimen name="gesture_tutorial_message_large_margin_bottom">32dp</dimen>
+ <dimen name="gesture_tutorial_message_small_margin_bottom">4dp</dimen>
+ <dimen name="gesture_tutorial_message_padding_start">26dp</dimen>
+ <dimen name="gesture_tutorial_message_padding_end">18dp</dimen>
+ <dimen name="gesture_tutorial_foldable_message_padding_start_end">126dp</dimen>
+
+ <!-- Gesture Tutorial mock conversation lists -->
+ <dimen name="gesture_tutorial_conversation_icon_size">56dp</dimen>
+ <dimen name="gesture_tutorial_conversation_icon_corner_radius">100dp</dimen>
+ <dimen name="gesture_tutorial_conversation_list_padding_top">28dp</dimen>
+ <dimen name="gesture_tutorial_conversation_line_padding_start">20dp</dimen>
+
+ <!-- Gesture Tutorial mock hotseats -->
+ <dimen name="gesture_tutorial_hotseat_icon_size">60dp</dimen>
+ <dimen name="gesture_tutorial_hotseat_icon_corner_radius">100dp</dimen>
+ <dimen name="gesture_tutorial_hotseat_search_height">50dp</dimen>
+ <dimen name="gesture_tutorial_hotseat_search_corner_radius">100dp</dimen>
+ <dimen name="gesture_tutorial_hotseat_icon_search_margin">36dp</dimen>
+
+ <!-- Gesture Tutorial mock webpages -->
+ <dimen name="gesture_tutorial_webpage_padding_top">32dp</dimen>
+ <dimen name="gesture_tutorial_webpage_large_margin_top">24dp</dimen>
+ <dimen name="gesture_tutorial_webpage_small_margin_top">8dp</dimen>
+ <dimen name="gesture_tutorial_webpage_large_corner_radius">22dp</dimen>
+ <dimen name="gesture_tutorial_webpage_medium_corner_radius">8dp</dimen>
+ <dimen name="gesture_tutorial_webpage_small_corner_radius">4dp</dimen>
+ <dimen name="gesture_tutorial_webpage_large_line_height">36dp</dimen>
+ <dimen name="gesture_tutorial_webpage_small_line_height">22dp</dimen>
+
<!-- All Set page -->
<dimen name="allset_page_margin_horizontal">40dp</dimen>
<dimen name="allset_title_margin_top">24dp</dimen>
diff --git a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
index 088009a..216e79b 100644
--- a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
@@ -31,19 +31,14 @@
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
import android.app.ActivityOptions;
-import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
-import android.content.ServiceConnection;
import android.graphics.Insets;
import android.hardware.SensorManager;
import android.hardware.devicestate.DeviceStateManager;
import android.os.Bundle;
import android.os.CancellationSignal;
-import android.os.Handler;
-import android.os.IBinder;
-import android.util.Log;
import android.view.View;
import android.view.WindowInsets;
import android.window.SplashScreen;
@@ -76,13 +71,13 @@
import com.android.quickstep.SysUINavigationMode.NavigationModeChangeListener;
import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.TaskUtils;
-import com.android.quickstep.TouchInteractionService;
import com.android.quickstep.TouchInteractionService.TISBinder;
import com.android.quickstep.util.LauncherUnfoldAnimationController;
import com.android.quickstep.util.ProxyScreenStatusProvider;
import com.android.quickstep.util.RemoteAnimationProvider;
import com.android.quickstep.util.RemoteFadeOutAnimationListener;
import com.android.quickstep.util.SplitSelectStateController;
+import com.android.quickstep.util.TISBindHelper;
import com.android.quickstep.views.OverviewActionsView;
import com.android.quickstep.views.RecentsView;
import com.android.systemui.shared.system.ActivityManagerWrapper;
@@ -103,11 +98,6 @@
public abstract class BaseQuickstepLauncher extends Launcher
implements NavigationModeChangeListener {
- private static final long BACKOFF_MILLIS = 1000;
-
- // Max backoff caps at 5 mins
- private static final long MAX_BACKOFF_MILLIS = 10 * 60 * 1000;
-
private DepthController mDepthController = new DepthController(this);
private QuickstepTransitionManager mAppTransitionManager;
@@ -120,45 +110,12 @@
private OverviewActionsView mActionsView;
+ private TISBindHelper mTISBindHelper;
private @Nullable TaskbarManager mTaskbarManager;
private @Nullable OverviewCommandHelper mOverviewCommandHelper;
private @Nullable LauncherTaskbarUIController mTaskbarUIController;
- private final ServiceConnection mTisBinderConnection = new ServiceConnection() {
- @Override
- public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
- if (!(iBinder instanceof TISBinder)) {
- // Seems like there can be a race condition when user unlocks, which kills the TIS
- // process and re-starts it. I guess in the meantime service can be connected to
- // a killed TIS? Either way, unbind and try to re-connect in that case.
- internalUnbindToTIS();
- mHandler.postDelayed(mConnectionRunnable, BACKOFF_MILLIS);
- return;
- }
- mTaskbarManager = ((TISBinder) iBinder).getTaskbarManager();
- mTaskbarManager.setLauncher(BaseQuickstepLauncher.this);
-
- Log.d(TAG, "TIS service connected");
- resetServiceBindRetryState();
-
- mOverviewCommandHelper = ((TISBinder) iBinder).getOverviewCommandHelper();
- }
-
- @Override
- public void onServiceDisconnected(ComponentName componentName) { }
-
- @Override
- public void onBindingDied(ComponentName name) {
- Log.w(TAG, "TIS binding died");
- internalBindToTIS();
- }
- };
-
- private final Runnable mConnectionRunnable = this::internalBindToTIS;
- private short mConnectionAttempts;
private final TaskbarStateHandler mTaskbarStateHandler = new TaskbarStateHandler(this);
- private final Handler mHandler = new Handler();
- private boolean mTisServiceBound;
// Will be updated when dragging from taskbar.
private @Nullable DragOptions mNextWorkspaceDragOptions = null;
@@ -201,11 +158,10 @@
SysUINavigationMode.INSTANCE.get(this).removeModeChangeListener(this);
- internalUnbindToTIS();
+ mTISBindHelper.onDestroy();
if (mTaskbarManager != null) {
mTaskbarManager.clearLauncher(this);
}
- resetServiceBindRetryState();
if (mLauncherUnfoldAnimationController != null) {
mLauncherUnfoldAnimationController.onDestroy();
@@ -357,42 +313,13 @@
mAppTransitionManager.registerRemoteAnimations();
mAppTransitionManager.registerRemoteTransitions();
- internalBindToTIS();
+ mTISBindHelper = new TISBindHelper(this, this::onTISConnected);
}
- /**
- * Binds {@link #mTisBinderConnection} to {@link TouchInteractionService}. If the binding fails,
- * attempts to retry via {@link #mConnectionRunnable}.
- * Unbind via {@link #internalUnbindToTIS()}
- */
- private void internalBindToTIS() {
- mTisServiceBound = bindService(new Intent(this, TouchInteractionService.class),
- mTisBinderConnection, 0);
- if (mTisServiceBound) {
- resetServiceBindRetryState();
- return;
- }
-
- Log.w(TAG, "Retrying TIS Binder connection attempt: " + mConnectionAttempts);
- final long timeoutMs = (long) Math.min(
- Math.scalb(BACKOFF_MILLIS, mConnectionAttempts), MAX_BACKOFF_MILLIS);
- mHandler.postDelayed(mConnectionRunnable, timeoutMs);
- mConnectionAttempts++;
- }
-
- /** See {@link #internalBindToTIS()} */
- private void internalUnbindToTIS() {
- if (mTisServiceBound) {
- unbindService(mTisBinderConnection);
- mTisServiceBound = false;
- }
- }
-
- private void resetServiceBindRetryState() {
- if (mHandler.hasCallbacks(mConnectionRunnable)) {
- mHandler.removeCallbacks(mConnectionRunnable);
- }
- mConnectionAttempts = 0;
+ private void onTISConnected(TISBinder binder) {
+ mTaskbarManager = binder.getTaskbarManager();
+ mTaskbarManager.setLauncher(BaseQuickstepLauncher.this);
+ mOverviewCommandHelper = binder.getOverviewCommandHelper();
}
private void initUnfoldTransitionProgressProvider() {
diff --git a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
index 9d10e1e..71a93d1 100644
--- a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
@@ -19,7 +19,6 @@
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_APP;
import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_STASHED_LAUNCHER_STATE;
-import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_STASHED_IN_APP_SETUP;
import static com.android.launcher3.taskbar.TaskbarStashController.TASKBAR_STASH_DURATION;
import static com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_HOME;
@@ -255,10 +254,6 @@
TaskbarStashController stashController = mControllers.taskbarStashController;
stashController.updateStateForFlag(FLAG_IN_APP, !isResumed);
- if (isResumed) {
- // Launcher is resumed, meaning setup must be finished.
- stashController.updateStateForFlag(FLAG_STASHED_IN_APP_SETUP, false);
- }
stashController.applyState(duration);
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java
index f2ca711..b768d60 100644
--- a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java
@@ -41,7 +41,6 @@
import android.graphics.Region;
import android.graphics.Region.Op;
import android.graphics.drawable.AnimatedVectorDrawable;
-import android.provider.Settings;
import android.util.Property;
import android.view.Gravity;
import android.view.View;
@@ -59,7 +58,6 @@
import com.android.launcher3.taskbar.contextual.RotationButton;
import com.android.launcher3.taskbar.contextual.RotationButtonController;
import com.android.launcher3.util.MultiValueAlpha;
-import com.android.launcher3.util.SettingsCache;
import com.android.launcher3.util.Themes;
import com.android.quickstep.AnimatedFloat;
@@ -118,9 +116,10 @@
/**
* Initializes the controller
*/
- public void init(TaskbarControllers controllers) {
+ public void init(TaskbarControllers controllers, TaskbarSharedState sharedState) {
mControllers = controllers;
mNavButtonsView.getLayoutParams().height = mContext.getDeviceProfile().taskbarSize;
+ parseSystemUiFlags(sharedState.sysuiStateFlags);
mA11yLongClickListener = view -> {
mControllers.navButtonController.onButtonClick(BUTTON_A11Y_LONG_CLICK);
@@ -151,8 +150,7 @@
flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0, AnimatedFloat.VALUE, 1, 0));
// Force nav buttons (specifically back button) to be visible during setup wizard.
- boolean isInSetup = !SettingsCache.INSTANCE.get(mContext).getValue(
- Settings.Secure.getUriFor(Settings.Secure.USER_SETUP_COMPLETE), 0);
+ boolean isInSetup = !mContext.isUserSetupComplete();
if (isThreeButtonNav || isInSetup) {
initButtons(mNavButtonContainer, mEndContextualContainer,
mControllers.navButtonController);
@@ -252,23 +250,14 @@
mA11yButton.setOnLongClickListener(mA11yLongClickListener);
}
- public void updateStateForSysuiFlags(int systemUiStateFlags, boolean forceUpdate) {
- boolean isImeVisible = (systemUiStateFlags & SYSUI_STATE_IME_SHOWING) != 0;
- boolean isImeSwitcherShowing = (systemUiStateFlags & SYSUI_STATE_IME_SWITCHER_SHOWING) != 0;
- boolean a11yVisible = (systemUiStateFlags & SYSUI_STATE_A11Y_BUTTON_CLICKABLE) != 0;
- boolean a11yLongClickable =
- (systemUiStateFlags & SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE) != 0;
- boolean isHomeDisabled =
- (systemUiStateFlags & SYSUI_STATE_HOME_DISABLED) != 0;
- boolean isRecentsDisabled =
- (systemUiStateFlags & SYSUI_STATE_OVERVIEW_DISABLED) != 0;
- boolean isBackDisabled =
- (systemUiStateFlags & SYSUI_STATE_BACK_DISABLED) != 0;
-
- if (!forceUpdate && systemUiStateFlags == mSysuiStateFlags) {
- return;
- }
- mSysuiStateFlags = systemUiStateFlags;
+ private void parseSystemUiFlags(int sysUiStateFlags) {
+ mSysuiStateFlags = sysUiStateFlags;
+ boolean isImeVisible = (sysUiStateFlags & SYSUI_STATE_IME_SHOWING) != 0;
+ boolean isImeSwitcherShowing = (sysUiStateFlags & SYSUI_STATE_IME_SWITCHER_SHOWING) != 0;
+ boolean a11yVisible = (sysUiStateFlags & SYSUI_STATE_A11Y_BUTTON_CLICKABLE) != 0;
+ boolean isHomeDisabled = (sysUiStateFlags & SYSUI_STATE_HOME_DISABLED) != 0;
+ boolean isRecentsDisabled = (sysUiStateFlags & SYSUI_STATE_OVERVIEW_DISABLED) != 0;
+ boolean isBackDisabled = (sysUiStateFlags & SYSUI_STATE_BACK_DISABLED) != 0;
// TODO(b/202218289) we're getting IME as not visible on lockscreen from system
updateStateForFlag(FLAG_IME_VISIBLE, isImeVisible);
@@ -280,8 +269,17 @@
if (mA11yButton != null) {
// Only used in 3 button
+ boolean a11yLongClickable =
+ (sysUiStateFlags & SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE) != 0;
mA11yButton.setLongClickable(a11yLongClickable);
}
+ }
+
+ public void updateStateForSysuiFlags(int systemUiStateFlags) {
+ if (systemUiStateFlags == mSysuiStateFlags) {
+ return;
+ }
+ parseSystemUiFlags(systemUiStateFlags);
applyState();
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
index 973c52b..f1d7d41 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
@@ -35,6 +35,7 @@
import android.graphics.Rect;
import android.os.Process;
import android.os.SystemProperties;
+import android.provider.Settings;
import android.util.Log;
import android.view.ContextThemeWrapper;
import android.view.Display;
@@ -61,6 +62,7 @@
import com.android.launcher3.taskbar.contextual.RotationButtonController;
import com.android.launcher3.touch.ItemClickHandler;
import com.android.launcher3.util.PackageManagerHelper;
+import com.android.launcher3.util.SettingsCache;
import com.android.launcher3.util.Themes;
import com.android.launcher3.util.TraceHelper;
import com.android.launcher3.util.ViewCache;
@@ -102,6 +104,7 @@
private final ViewCache mViewCache = new ViewCache();
private final boolean mIsSafeModeEnabled;
+ private final boolean mIsUserSetupComplete;
private boolean mIsDestroyed = false;
public TaskbarActivityContext(Context windowContext, DeviceProfile dp,
@@ -113,6 +116,8 @@
mNavMode = SysUINavigationMode.getMode(windowContext);
mIsSafeModeEnabled = TraceHelper.allowIpcs("isSafeMode",
() -> getPackageManager().isSafeMode());
+ mIsUserSetupComplete = SettingsCache.INSTANCE.get(this).getValue(
+ Settings.Secure.getUriFor(Settings.Secure.USER_SETUP_COMPLETE), 0);
float taskbarIconSize = getResources().getDimension(R.dimen.taskbar_icon_size);
mDeviceProfile.updateIconSize(1, getResources());
@@ -155,7 +160,7 @@
new TaskbarEduController(this));
}
- public void init() {
+ public void init(TaskbarSharedState sharedState) {
mLastRequestedNonFullscreenHeight = getDefaultTaskbarWindowHeight();
mWindowLayoutParams = new WindowManager.LayoutParams(
MATCH_PARENT,
@@ -184,7 +189,7 @@
getDefaultTaskbarWindowHeight() - mDeviceProfile.taskbarSize, 0, 0);
// Initialize controllers after all are constructed.
- mControllers.init();
+ mControllers.init(sharedState);
mWindowManager.addView(mDragLayer, mWindowLayoutParams);
}
@@ -303,6 +308,13 @@
}
/**
+ * Sets the flag indicating setup UI is visible
+ */
+ public void setSetupUIVisible(boolean isVisible) {
+ mControllers.taskbarStashController.setSetupUIVisible(isVisible);
+ }
+
+ /**
* Called when this instance of taskbar is no longer needed
*/
public void onDestroy() {
@@ -312,9 +324,8 @@
mWindowManager.removeViewImmediate(mDragLayer);
}
- public void updateSysuiStateFlags(int systemUiStateFlags, boolean forceUpdate) {
- mControllers.navbarButtonsViewController.updateStateForSysuiFlags(
- systemUiStateFlags, forceUpdate);
+ public void updateSysuiStateFlags(int systemUiStateFlags) {
+ mControllers.navbarButtonsViewController.updateStateForSysuiFlags(systemUiStateFlags);
mControllers.taskbarViewController.setImeIsVisible(
mControllers.navbarButtonsViewController.isImeVisible());
boolean panelExpanded = (systemUiStateFlags & SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) != 0;
@@ -467,4 +478,8 @@
public void startTaskbarUnstashHint(boolean animateForward) {
mControllers.taskbarStashController.startUnstashHint(animateForward);
}
+
+ protected boolean isUserSetupComplete() {
+ return mIsUserSetupComplete;
+ }
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java
index e13f849..8684c29 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java
@@ -74,8 +74,8 @@
* TaskbarControllers instance, but should be careful to only access things that were created
* in constructors for now, as some controllers may still be waiting for init().
*/
- public void init() {
- navbarButtonsViewController.init(this);
+ public void init(TaskbarSharedState sharedState) {
+ navbarButtonsViewController.init(this, sharedState);
if (taskbarActivityContext.isThreeButtonNav()) {
rotationButtonController.init();
}
@@ -85,7 +85,7 @@
taskbarUnfoldAnimationController.init(this);
taskbarKeyguardController.init(navbarButtonsViewController);
stashedHandleViewController.init(this);
- taskbarStashController.init(this);
+ taskbarStashController.init(this, sharedState);
taskbarEduController.init(this);
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
index 9d88956..63d07f3 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
@@ -76,7 +76,7 @@
* Cache a copy here so we can initialize state whenever taskbar is recreated, since
* this class does not get re-initialized w/ new taskbars.
*/
- private int mSysuiStateFlags;
+ private final TaskbarSharedState mSharedState = new TaskbarSharedState();
private static final int CHANGE_FLAGS =
CHANGE_ACTIVE_SCREEN | CHANGE_DENSITY | CHANGE_SUPPORTED_BOUNDS;
@@ -192,22 +192,27 @@
mTaskbarActivityContext = new TaskbarActivityContext(mContext, dp.copy(mContext),
mNavButtonController, mUnfoldProgressProvider);
- mTaskbarActivityContext.init();
+ mTaskbarActivityContext.init(mSharedState);
if (mLauncher != null) {
mTaskbarActivityContext.setUIController(
new LauncherTaskbarUIController(mLauncher, mTaskbarActivityContext));
}
- onSysuiFlagsChangedInternal(mSysuiStateFlags, true /* forceUpdate */);
}
public void onSystemUiFlagsChanged(int systemUiStateFlags) {
- onSysuiFlagsChangedInternal(systemUiStateFlags, false /* forceUpdate */);
+ mSharedState.sysuiStateFlags = systemUiStateFlags;
+ if (mTaskbarActivityContext != null) {
+ mTaskbarActivityContext.updateSysuiStateFlags(systemUiStateFlags);
+ }
}
- private void onSysuiFlagsChangedInternal(int systemUiStateFlags, boolean forceUpdate) {
- mSysuiStateFlags = systemUiStateFlags;
+ /**
+ * Sets the flag indicating setup UI is visible
+ */
+ public void setSetupUIVisible(boolean isVisible) {
+ mSharedState.setupUIVisible = isVisible;
if (mTaskbarActivityContext != null) {
- mTaskbarActivityContext.updateSysuiStateFlags(systemUiStateFlags, forceUpdate);
+ mTaskbarActivityContext.setSetupUIVisible(isVisible);
}
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarSharedState.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarSharedState.java
new file mode 100644
index 0000000..23beef0
--- /dev/null
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarSharedState.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+package com.android.launcher3.taskbar;
+
+/**
+ * State shared across different taskbar instance
+ */
+public class TaskbarSharedState {
+
+ public int sysuiStateFlags;
+
+ public boolean setupUIVisible = false;
+
+}
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
index 7a89224..0dd4ef1 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
@@ -25,21 +25,15 @@
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.annotation.Nullable;
-import android.app.ActivityManager;
-import android.content.ComponentName;
import android.content.SharedPreferences;
import android.content.res.Resources;
-import android.provider.Settings;
import android.view.ViewConfiguration;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
-import com.android.launcher3.util.SettingsCache;
import com.android.quickstep.AnimatedFloat;
import com.android.quickstep.SystemUiProxy;
-import com.android.quickstep.interaction.AllSetActivity;
-import com.android.systemui.shared.system.ActivityManagerWrapper;
import java.util.function.IntPredicate;
@@ -136,7 +130,7 @@
mUnstashedHeight = mActivity.getDeviceProfile().taskbarSize;
}
- public void init(TaskbarControllers controllers) {
+ public void init(TaskbarControllers controllers, TaskbarSharedState sharedState) {
mControllers = controllers;
TaskbarDragLayerController dragLayerController = controllers.taskbarDragLayerController;
@@ -157,7 +151,8 @@
boolean isManuallyStashedInApp = supportsManualStashing()
&& mPrefs.getBoolean(SHARED_PREFS_STASHED_KEY, DEFAULT_STASHED_PREF);
updateStateForFlag(FLAG_STASHED_IN_APP_MANUAL, isManuallyStashedInApp);
- updateStateForFlag(FLAG_STASHED_IN_APP_SETUP, isInSetup());
+ updateStateForFlag(FLAG_STASHED_IN_APP_SETUP,
+ !mActivity.isUserSetupComplete() || sharedState.setupUIVisible);
applyState();
SystemUiProxy.INSTANCE.get(mActivity)
@@ -186,20 +181,12 @@
}
/**
- * Returns whether we are in Setup Wizard or the corresponding AllSetActivity that follows it.
+ * Sets the flag indicating setup UI is visible
*/
- private boolean isInSetup() {
- boolean isInSetup = !SettingsCache.INSTANCE.get(mActivity).getValue(
- Settings.Secure.getUriFor(Settings.Secure.USER_SETUP_COMPLETE), 0);
- if (isInSetup) {
- return true;
- }
- ActivityManager.RunningTaskInfo runningTask =
- ActivityManagerWrapper.getInstance().getRunningTask();
- if (runningTask == null || runningTask.baseActivity == null) {
- return false;
- }
- return runningTask.baseActivity.equals(new ComponentName(mActivity, AllSetActivity.class));
+ protected void setSetupUIVisible(boolean isVisible) {
+ updateStateForFlag(FLAG_STASHED_IN_APP_SETUP,
+ isVisible || !mActivity.isUserSetupComplete());
+ applyState();
}
/**
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
index ff04799..d14622b 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
@@ -88,7 +88,10 @@
mTaskbarIconScaleForStash.updateValue(1f);
mModelCallbacks.init(controllers);
- LauncherAppState.getInstance(mActivity).getModel().addCallbacksAndLoad(mModelCallbacks);
+ if (mActivity.isUserSetupComplete()) {
+ // Only load the callbacks if user setup is completed
+ LauncherAppState.getInstance(mActivity).getModel().addCallbacksAndLoad(mModelCallbacks);
+ }
mTaskbarNavButtonTranslationY =
controllers.navbarButtonsViewController.getTaskbarNavButtonTranslationY();
}
diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
index 8a9bf7c..e2441ed 100644
--- a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
@@ -84,7 +84,6 @@
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
-import java.util.stream.Collectors;
/**
* Manages the state of the system during a swipe up gesture.
@@ -398,14 +397,6 @@
}
/**
- * @return the packages of gesture-blocked activities.
- */
- public List<String> getGestureBlockedActivityPackages() {
- return mGestureBlockedActivities.stream().map(ComponentName::getPackageName)
- .collect(Collectors.toList());
- }
-
- /**
* Updates the system ui state flags from SystemUI.
*/
public void setSystemUiFlags(int stateFlags) {
diff --git a/quickstep/src/com/android/quickstep/RemoteTargetGluer.java b/quickstep/src/com/android/quickstep/RemoteTargetGluer.java
index 7ef4d19..825abed 100644
--- a/quickstep/src/com/android/quickstep/RemoteTargetGluer.java
+++ b/quickstep/src/com/android/quickstep/RemoteTargetGluer.java
@@ -94,6 +94,9 @@
public RemoteTargetHandle[] assignTargetsForSplitScreen(RemoteAnimationTargets targets) {
int[] splitIds = LauncherSplitScreenListener.INSTANCE.getNoCreate()
.getRunningSplitTaskIds();
+ Log.d(TAG, "splitIds length: " + splitIds.length
+ + " targetAppsLength: " + targets.apps.length
+ + " remoteHandlesLength: " + mRemoteTargetHandles.length);
if (splitIds.length == 0 && mRemoteTargetHandles.length > 1) {
// There's a chance that between the creation of this class and assigning targets,
// LauncherSplitScreenListener may have received callback that removes split
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index 46b228e..4844f6b 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -66,7 +66,6 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.UiThread;
-import androidx.annotation.WorkerThread;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.R;
@@ -972,22 +971,6 @@
mInputConsumer);
}
- protected boolean shouldNotifyBackGesture() {
- return mBackGestureNotificationCounter > 0 &&
- !mDeviceState.getGestureBlockedActivityPackages().isEmpty();
- }
-
- @WorkerThread
- protected void tryNotifyBackGesture() {
- if (shouldNotifyBackGesture()) {
- mBackGestureNotificationCounter--;
- Utilities.getDevicePrefs(this).edit()
- .putInt(KEY_BACK_NOTIFICATION_COUNT, mBackGestureNotificationCounter).apply();
- mDeviceState.getGestureBlockedActivityPackages().forEach(blockedPackage ->
- sendBroadcast(new Intent(NOTIFY_ACTION_BACK).setPackage(blockedPackage)));
- }
- }
-
@Override
public void writeToProto(LauncherTraceProto.Builder proto) {
TouchInteractionServiceProto.Builder serviceProto =
diff --git a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
index 4472bdc..f731cb3 100644
--- a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
+++ b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
@@ -32,6 +32,8 @@
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
+import com.android.quickstep.TouchInteractionService.TISBinder;
+import com.android.quickstep.util.TISBindHelper;
import java.net.URISyntaxException;
@@ -47,6 +49,9 @@
private static final String EXTRA_ACCENT_COLOR_DARK_MODE = "suwColorAccentDark";
private static final String EXTRA_ACCENT_COLOR_LIGHT_MODE = "suwColorAccentLight";
+ private TISBindHelper mTISBindHelper;
+ private TISBinder mBinder;
+
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -73,6 +78,34 @@
});
findViewById(R.id.hint).setAccessibilityDelegate(new SkipButtonAccessibilityDelegate());
+ mTISBindHelper = new TISBindHelper(this, this::onTISConnected);
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ if (mBinder != null) {
+ mBinder.getTaskbarManager().setSetupUIVisible(true);
+ }
+ }
+
+ private void onTISConnected(TISBinder binder) {
+ mBinder = binder;
+ mBinder.getTaskbarManager().setSetupUIVisible(isResumed());
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+ if (mBinder != null) {
+ mBinder.getTaskbarManager().setSetupUIVisible(false);
+ }
+ }
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ mTISBindHelper.onDestroy();
}
/**
diff --git a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
index 30f9008..fb6cd8a 100644
--- a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
@@ -49,12 +49,16 @@
@LayoutRes
int getMockAppTaskCurrentPageLayoutResId() {
- return R.layout.gesture_tutorial_mock_conversation;
+ return mTutorialFragment.isLargeScreen()
+ ? R.layout.gesture_tutorial_foldable_mock_conversation
+ : R.layout.gesture_tutorial_mock_conversation;
}
@LayoutRes
int getMockAppTaskPreviousPageLayoutResId() {
- return R.layout.gesture_tutorial_mock_conversation_list;
+ return mTutorialFragment.isLargeScreen()
+ ? R.layout.gesture_tutorial_foldable_mock_conversation_list
+ : R.layout.gesture_tutorial_mock_conversation_list;
}
@Override
diff --git a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java
index 3ad84f0..a45f273 100644
--- a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java
@@ -43,7 +43,9 @@
@Override
protected int getMockAppTaskLayoutResId() {
- return R.layout.gesture_tutorial_mock_webpage;
+ return mTutorialFragment.isLargeScreen()
+ ? R.layout.gesture_tutorial_foldable_mock_webpage
+ : R.layout.gesture_tutorial_mock_webpage;
}
@Override
diff --git a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java
index 9d60e1b..24ef1fa 100644
--- a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java
@@ -53,7 +53,9 @@
@Override
protected int getMockAppTaskLayoutResId() {
- return R.layout.gesture_tutorial_mock_conversation_list;
+ return mTutorialFragment.isLargeScreen()
+ ? R.layout.gesture_tutorial_foldable_mock_conversation_list
+ : R.layout.gesture_tutorial_mock_conversation_list;
}
@Override
diff --git a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialFragment.java b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialFragment.java
index 968412b..57a76ca 100644
--- a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialFragment.java
+++ b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialFragment.java
@@ -57,17 +57,6 @@
}
});
- Animator swipeAnimator =
- controller.createFingerDotOverviewSwipeAnimator(fingerDotStartTranslationY);
- swipeAnimator.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- mFakePreviousTaskView.setVisibility(View.VISIBLE);
- controller.onMotionPaused(true /*arbitrary value*/);
- }
- });
-
AnimatorSet fingerDotDisappearanceAnimator =
controller.createFingerDotDisappearanceAnimatorSet();
fingerDotDisappearanceAnimator.addListener(new AnimatorListenerAdapter() {
@@ -89,7 +78,7 @@
ArrayList<Animator> animators = new ArrayList<>();
animators.add(fingerDotAppearanceAnimator);
- animators.add(swipeAnimator);
+ animators.add(controller.createFingerDotOverviewSwipeAnimator(fingerDotStartTranslationY));
animators.add(controller.createAnimationPause());
animators.add(fingerDotDisappearanceAnimator);
animators.add(animationPause);
diff --git a/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java
index 0c7b35b..a923519 100644
--- a/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java
@@ -320,8 +320,8 @@
@Override
public RectF getWindowTargetRect() {
int fakeHomeIconSizePx = Utilities.dpToPx(60);
- int fakeHomeIconLeft = mFakeHotseatView.getLeft();
- int fakeHomeIconTop = mFakeHotseatView.getTop();
+ int fakeHomeIconLeft = getHotseatIconLeft();
+ int fakeHomeIconTop = getHotseatIconTop();
return new RectF(fakeHomeIconLeft, fakeHomeIconTop,
fakeHomeIconLeft + fakeHomeIconSizePx,
fakeHomeIconTop + fakeHomeIconSizePx);
@@ -374,8 +374,19 @@
}
protected Animator createFingerDotOverviewSwipeAnimator(float fingerDotStartTranslationY) {
- return createFingerDotSwipeUpAnimator(fingerDotStartTranslationY)
+ Animator overviewSwipeAnimator = createFingerDotSwipeUpAnimator(fingerDotStartTranslationY)
.setDuration(OVERVIEW_SWIPE_ANIMATION_DURATION_MILLIS);
+
+ overviewSwipeAnimator.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ super.onAnimationEnd(animation);
+ mFakePreviousTaskView.setVisibility(View.VISIBLE);
+ onMotionPaused(true /*arbitrary value*/);
+ }
+ });
+
+ return overviewSwipeAnimator;
}
diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
index 94fb556..9c1ff4d 100644
--- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
@@ -85,7 +85,8 @@
final TextView mFeedbackTitleView;
final ImageView mEdgeGestureVideoView;
final RelativeLayout mFakeLauncherView;
- final ImageView mFakeHotseatView;
+ final FrameLayout mFakeHotseatView;
+ @Nullable View mHotseatIconView;
final ClipIconView mFakeIconView;
final FrameLayout mFakeTaskView;
final AnimatedTaskView mFakePreviousTaskView;
@@ -164,13 +165,25 @@
}
}
+ public int getHotseatIconTop() {
+ return mHotseatIconView == null
+ ? 0 : mFakeHotseatView.getTop() + mHotseatIconView.getTop();
+ }
+
+ public int getHotseatIconLeft() {
+ return mHotseatIconView == null
+ ? 0 : mFakeHotseatView.getLeft() + mHotseatIconView.getLeft();
+ }
+
void setTutorialType(TutorialType tutorialType) {
mTutorialType = tutorialType;
}
- @DrawableRes
+ @LayoutRes
protected int getMockHotseatResId() {
- return R.drawable.default_sandbox_mock_launcher;
+ return mTutorialFragment.isLargeScreen()
+ ? R.layout.gesture_tutorial_foldable_mock_hotseat
+ : R.layout.gesture_tutorial_mock_hotseat;
}
@LayoutRes
@@ -384,6 +397,7 @@
hideActionButton();
updateSubtext();
updateDrawables();
+ updateLayout();
mGestureCompleted = false;
if (mFakeHotseatView != null) {
@@ -416,10 +430,14 @@
}
void updateFakeAppTaskViewLayout(@LayoutRes int mockAppTaskLayoutResId) {
- mFakeTaskView.removeAllViews();
- if (mockAppTaskLayoutResId != NO_ID) {
- mFakeTaskView.addView(
- inflate(mContext, mockAppTaskLayoutResId, null),
+ updateFakeViewLayout(mFakeTaskView, mockAppTaskLayoutResId);
+ }
+
+ void updateFakeViewLayout(ViewGroup view, @LayoutRes int mockLayoutResId) {
+ view.removeAllViews();
+ if (mockLayoutResId != NO_ID) {
+ view.addView(
+ inflate(mContext, mockLayoutResId, null),
new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
@@ -438,9 +456,9 @@
mTutorialFragment.updateFeedbackAnimation();
mFakeLauncherView.setBackgroundColor(
mContext.getColor(R.color.gesture_tutorial_fake_wallpaper_color));
- mFakeHotseatView.setImageDrawable(AppCompatResources.getDrawable(
- mContext, getMockHotseatResId()));
- updateFakeAppTaskViewLayout(getMockAppTaskLayoutResId());
+ updateFakeViewLayout(mFakeHotseatView, getMockHotseatResId());
+ mHotseatIconView = mFakeHotseatView.findViewById(R.id.hotseat_icon_1);
+ updateFakeViewLayout(mFakeTaskView, getMockAppTaskLayoutResId());
mFakeTaskView.animate().alpha(1).setListener(
AnimatorListeners.forSuccessCallback(() -> mFakeTaskView.animate().cancel()));
mFakePreviousTaskView.setFakeTaskViewFillColor(mContext.getResources().getColor(
@@ -450,6 +468,21 @@
}
}
+ private void updateLayout() {
+ if (mContext != null) {
+ RelativeLayout.LayoutParams feedbackLayoutParams =
+ (RelativeLayout.LayoutParams) mFeedbackView.getLayoutParams();
+ feedbackLayoutParams.setMarginStart(mContext.getResources().getDimensionPixelSize(
+ mTutorialFragment.isLargeScreen()
+ ? R.dimen.gesture_tutorial_foldable_feedback_margin_start_end
+ : R.dimen.gesture_tutorial_feedback_margin_start_end));
+ feedbackLayoutParams.setMarginEnd(mContext.getResources().getDimensionPixelSize(
+ mTutorialFragment.isLargeScreen()
+ ? R.dimen.gesture_tutorial_foldable_feedback_margin_start_end
+ : R.dimen.gesture_tutorial_feedback_margin_start_end));
+ }
+ }
+
private AlertDialog createSkipTutorialDialog() {
if (mContext instanceof GestureSandboxActivity) {
GestureSandboxActivity sandboxActivity = (GestureSandboxActivity) mContext;
diff --git a/quickstep/src/com/android/quickstep/util/TISBindHelper.java b/quickstep/src/com/android/quickstep/util/TISBindHelper.java
new file mode 100644
index 0000000..92c60c8
--- /dev/null
+++ b/quickstep/src/com/android/quickstep/util/TISBindHelper.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+package com.android.quickstep.util;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.Handler;
+import android.os.IBinder;
+import android.util.Log;
+
+import com.android.quickstep.TouchInteractionService;
+import com.android.quickstep.TouchInteractionService.TISBinder;
+
+import java.util.function.Consumer;
+
+/**
+ * Utility class to simplify binding to {@link TouchInteractionService}
+ */
+public class TISBindHelper implements ServiceConnection {
+
+ private static final String TAG = "TISBindHelper";
+
+ private static final long BACKOFF_MILLIS = 1000;
+
+ // Max backoff caps at 5 mins
+ private static final long MAX_BACKOFF_MILLIS = 10 * 60 * 1000;
+
+ private final Handler mHandler = new Handler();
+ private final Runnable mConnectionRunnable = this::internalBindToTIS;
+ private final Context mContext;
+ private final Consumer<TISBinder> mConnectionCallback;
+
+ private short mConnectionAttempts;
+ private boolean mTisServiceBound;
+
+ public TISBindHelper(Context context, Consumer<TISBinder> connectionCallback) {
+ mContext = context;
+ mConnectionCallback = connectionCallback;
+ internalBindToTIS();
+ }
+
+ @Override
+ public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
+ if (!(iBinder instanceof TISBinder)) {
+ // Seems like there can be a race condition when user unlocks, which kills the TIS
+ // process and re-starts it. I guess in the meantime service can be connected to
+ // a killed TIS? Either way, unbind and try to re-connect in that case.
+ internalUnbindToTIS();
+ mHandler.postDelayed(mConnectionRunnable, BACKOFF_MILLIS);
+ return;
+ }
+
+ Log.d(TAG, "TIS service connected");
+ mConnectionCallback.accept((TISBinder) iBinder);
+ resetServiceBindRetryState();
+ }
+
+ @Override
+ public void onServiceDisconnected(ComponentName componentName) { }
+
+ @Override
+ public void onBindingDied(ComponentName name) {
+ Log.w(TAG, "TIS binding died");
+ internalBindToTIS();
+ }
+
+
+ /**
+ * Binds to {@link TouchInteractionService}. If the binding fails, attempts to retry via
+ * {@link #mConnectionRunnable}. Unbind via {@link #internalUnbindToTIS()}
+ */
+ private void internalBindToTIS() {
+ mTisServiceBound = mContext.bindService(new Intent(mContext, TouchInteractionService.class),
+ this, 0);
+ if (mTisServiceBound) {
+ resetServiceBindRetryState();
+ return;
+ }
+
+ Log.w(TAG, "Retrying TIS Binder connection attempt: " + mConnectionAttempts);
+ final long timeoutMs = (long) Math.min(
+ Math.scalb(BACKOFF_MILLIS, mConnectionAttempts), MAX_BACKOFF_MILLIS);
+ mHandler.postDelayed(mConnectionRunnable, timeoutMs);
+ mConnectionAttempts++;
+ }
+
+ /** See {@link #internalBindToTIS()} */
+ private void internalUnbindToTIS() {
+ if (mTisServiceBound) {
+ mContext.unbindService(this);
+ mTisServiceBound = false;
+ }
+ }
+
+ private void resetServiceBindRetryState() {
+ if (mHandler.hasCallbacks(mConnectionRunnable)) {
+ mHandler.removeCallbacks(mConnectionRunnable);
+ }
+ mConnectionAttempts = 0;
+ }
+
+ /**
+ * Called when the activity is destroyed to clear the binding
+ */
+ public void onDestroy() {
+ internalUnbindToTIS();
+ resetServiceBindRetryState();
+ }
+}
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 0d01343..7811047 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -16,6 +16,7 @@
package com.android.launcher3;
+import static com.android.launcher3.config.FeatureFlags.ENABLE_ICON_LABEL_AUTO_SCALING;
import static com.android.launcher3.graphics.PreloadIconDrawable.newPendingIcon;
import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
@@ -33,6 +34,7 @@
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.icu.text.MessageFormat;
+import android.text.TextPaint;
import android.text.TextUtils.TruncateAt;
import android.util.AttributeSet;
import android.util.Property;
@@ -88,6 +90,9 @@
private static final int DISPLAY_SEARCH_RESULT = 6;
private static final int DISPLAY_SEARCH_RESULT_SMALL = 7;
+ private static final float MIN_LETTER_SPACING = -0.5f;
+ private static final int MAX_SEARCH_LOOP_COUNT = 20;
+
private static final int[] STATE_PRESSED = new int[]{android.R.attr.state_pressed};
private static final float HIGHLIGHT_SCALE = 1.16f;
@@ -460,6 +465,75 @@
return result;
}
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ super.onSizeChanged(w, h, oldw, oldh);
+ checkForEllipsis();
+ }
+
+ @Override
+ protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) {
+ super.onTextChanged(text, start, lengthBefore, lengthAfter);
+ checkForEllipsis();
+ }
+
+ private void checkForEllipsis() {
+ if (!ENABLE_ICON_LABEL_AUTO_SCALING.get()) {
+ return;
+ }
+ float width = getWidth() - getCompoundPaddingLeft() - getCompoundPaddingRight();
+ if (width <= 0) {
+ return;
+ }
+ setLetterSpacing(0);
+
+ String text = getText().toString();
+ TextPaint paint = getPaint();
+ if (paint.measureText(text) < width) {
+ return;
+ }
+
+ float spacing = findBestSpacingValue(paint, text, width, MIN_LETTER_SPACING);
+ // Reset the paint value so that the call to TextView does appropriate diff.
+ paint.setLetterSpacing(0);
+ setLetterSpacing(spacing);
+ }
+
+ /**
+ * Find the appropriate text spacing to display the provided text
+ * @param paint the paint used by the text view
+ * @param text the text to display
+ * @param allowedWidthPx available space to render the text
+ * @param minSpacingEm minimum spacing allowed between characters
+ * @return the final textSpacing value
+ *
+ * @see #setLetterSpacing(float)
+ */
+ private float findBestSpacingValue(TextPaint paint, String text, float allowedWidthPx,
+ float minSpacingEm) {
+ paint.setLetterSpacing(minSpacingEm);
+ if (paint.measureText(text) > allowedWidthPx) {
+ // If there is no result at high limit, we can do anything more
+ return minSpacingEm;
+ }
+
+ float lowLimit = 0;
+ float highLimit = minSpacingEm;
+
+ for (int i = 0; i < MAX_SEARCH_LOOP_COUNT; i++) {
+ float value = (lowLimit + highLimit) / 2;
+ paint.setLetterSpacing(value);
+ if (paint.measureText(text) < allowedWidthPx) {
+ highLimit = value;
+ } else {
+ lowLimit = value;
+ }
+ }
+
+ // At the end error on the higher side
+ return highLimit;
+ }
+
@SuppressWarnings("wrongcall")
protected void drawWithoutDot(Canvas canvas) {
super.onDraw(canvas);
diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java
index 7ba9935..df09f29 100644
--- a/src/com/android/launcher3/LauncherProvider.java
+++ b/src/com/android/launcher3/LauncherProvider.java
@@ -461,13 +461,6 @@
app.getModel().forceReload();
return null;
}
- case LauncherSettings.Settings.METHOD_CLEAR_WORKSPACE:
- {
- Bundle result = new Bundle();
- result.putIntArray(LauncherSettings.Settings.EXTRA_VALUE, clearWorkspace()
- .toArray());
- return result;
- }
}
return null;
}
@@ -504,30 +497,6 @@
}
}
- /**
- * Deletes any items from the DB apart from hotseat.
- * @return Ids of deleted items.
- */
- private IntArray clearWorkspace() {
- SQLiteDatabase db = mOpenHelper.getWritableDatabase();
- try (SQLiteTransaction t = new SQLiteTransaction(db)) {
- String selection = LauncherSettings.Favorites.CONTAINER + " <> "
- + LauncherSettings.Favorites.CONTAINER_HOTSEAT;
-
- IntArray itemIds = LauncherDbUtils.queryIntArray(db, Favorites.TABLE_NAME,
- Favorites._ID, selection, null, null);
- if (!itemIds.isEmpty()) {
- db.delete(Favorites.TABLE_NAME, Utilities.createDbSelectionQuery(
- LauncherSettings.Favorites._ID, itemIds), null);
- }
- t.commit();
- return itemIds;
- } catch (SQLException ex) {
- Log.e(TAG, ex.getMessage(), ex);
- return new IntArray();
- }
- }
-
@Thunk static void addModifiedTime(ContentValues values) {
values.put(LauncherSettings.Favorites.MODIFIED, System.currentTimeMillis());
}
diff --git a/src/com/android/launcher3/LauncherSettings.java b/src/com/android/launcher3/LauncherSettings.java
index bf9cd92..048aaaa 100644
--- a/src/com/android/launcher3/LauncherSettings.java
+++ b/src/com/android/launcher3/LauncherSettings.java
@@ -392,8 +392,6 @@
public static final String METHOD_SWITCH_DATABASE = "switch_database";
- public static final String METHOD_CLEAR_WORKSPACE = "clear_workspace";
-
public static final String EXTRA_VALUE = "value";
public static final String EXTRA_DB_NAME = "db_name";
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index f154dd4..3ba6ea4 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -485,8 +485,9 @@
mViewPager = (AllAppsPagedView) newView;
mViewPager.initParentViews(this);
mViewPager.getPageIndicator().setOnActivePageChangedListener(this);
- mWorkManager.attachWorkModeSwitch();
- mWorkManager.getWorkModeSwitch().post(() -> mAH[AdapterHolder.WORK].applyPadding());
+ if (mWorkManager.attachWorkModeSwitch()) {
+ mWorkManager.getWorkModeSwitch().post(() -> mAH[AdapterHolder.WORK].applyPadding());
+ }
} else {
mWorkManager.detachWorkModeSwitch();
mViewPager = null;
diff --git a/src/com/android/launcher3/allapps/WorkProfileManager.java b/src/com/android/launcher3/allapps/WorkProfileManager.java
index 54a5c51..e223248 100644
--- a/src/com/android/launcher3/allapps/WorkProfileManager.java
+++ b/src/com/android/launcher3/allapps/WorkProfileManager.java
@@ -28,6 +28,7 @@
import android.util.Log;
import androidx.annotation.IntDef;
+import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import com.android.launcher3.R;
@@ -127,11 +128,11 @@
/**
* Creates and attaches for profile toggle button to {@link AllAppsContainerView}
*/
- public void attachWorkModeSwitch() {
+ public boolean attachWorkModeSwitch() {
if (!mAllApps.getAppsStore().hasModelFlag(
FLAG_HAS_SHORTCUT_PERMISSION | FLAG_QUIET_MODE_CHANGE_PERMISSION)) {
- Log.e(TAG, "Unable to attach widget; Missing required permissions");
- return;
+ Log.e(TAG, "unable to attach work mode switch; Missing required permissions");
+ return false;
}
if (mWorkModeSwitch == null) {
mWorkModeSwitch = (WorkModeSwitch) mAllApps.getLayoutInflater().inflate(
@@ -144,6 +145,7 @@
getAH().applyPadding();
}
mWorkModeSwitch.updateCurrentState(mCurrentState == STATE_ENABLED);
+ return true;
}
/**
@@ -165,6 +167,7 @@
return mMatcher;
}
+ @Nullable
public WorkModeSwitch getWorkModeSwitch() {
return mWorkModeSwitch;
}
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index a3d9ba7..796c912 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -252,6 +252,10 @@
"ENABLE_BACK_SWIPE_HOME_ANIMATION", true,
"Enables home animation to icon when user swipes back.");
+ public static final BooleanFlag ENABLE_ICON_LABEL_AUTO_SCALING = getDebugFlag(
+ "ENABLE_ICON_LABEL_AUTO_SCALING", true,
+ "Enables scaling/spacing for icon labels to make more characters visible");
+
public static void initialize(Context context) {
synchronized (sDebugFlags) {
for (DebugFlag flag : sDebugFlags) {
diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
index da6551c..0ffbeeb 100644
--- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
+++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
@@ -288,14 +288,13 @@
}
/**
- * Removes all items from workspace and populate default hotseat.
+ * Removes all icons from homescreen and hotseat.
*/
- public void clearWorkspace() {
- // First clear data to ensure hotseat is populated.
- clearLauncherData();
- // Next make provider call to clear everything apart from hotseat.
+ public void clearHomescreen() throws Throwable {
LauncherSettings.Settings.call(mTargetContext.getContentResolver(),
- LauncherSettings.Settings.METHOD_CLEAR_WORKSPACE);
+ LauncherSettings.Settings.METHOD_CREATE_EMPTY_DB);
+ LauncherSettings.Settings.call(mTargetContext.getContentResolver(),
+ LauncherSettings.Settings.METHOD_CLEAR_EMPTY_DB_FLAG);
resetLoaderState();
}
diff --git a/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
index 34dddf5..5ea5d65 100644
--- a/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
+++ b/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
@@ -85,7 +85,7 @@
* @param acceptConfig accept the config activity
*/
private void runTest(boolean acceptConfig) throws Throwable {
- clearWorkspace();
+ clearHomescreen();
mDevice.pressHome();
final Widgets widgets = mLauncher.getWorkspace().openAllWidgets();
diff --git a/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java
index 3696755..dad4f2b 100644
--- a/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java
+++ b/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java
@@ -47,7 +47,7 @@
@Test
@PortraitLandscape
public void testDragIcon() throws Throwable {
- clearWorkspace();
+ clearHomescreen();
mDevice.pressHome();
final LauncherAppWidgetProviderInfo widgetInfo =
@@ -81,7 +81,7 @@
@Test
@PortraitLandscape
public void testDragCustomShortcut() throws Throwable {
- clearWorkspace();
+ clearHomescreen();
mDevice.pressHome();
mLauncher.getWorkspace().openAllWidgets()
.getWidget("com.android.launcher3.testcomponent.CustomShortcutConfigActivity")
diff --git a/tests/src/com/android/launcher3/ui/widget/RequestPinItemTest.java b/tests/src/com/android/launcher3/ui/widget/RequestPinItemTest.java
index 270c2ec..ccbb662 100644
--- a/tests/src/com/android/launcher3/ui/widget/RequestPinItemTest.java
+++ b/tests/src/com/android/launcher3/ui/widget/RequestPinItemTest.java
@@ -125,7 +125,7 @@
private void runTest(String activityMethod, boolean isWidget, ItemOperator itemMatcher,
Intent... commandIntents) throws Throwable {
- clearWorkspace();
+ clearHomescreen();
mDevice.pressHome();
// Open Pin item activity