Snap for 10171451 from 6597d5ec3c to udc-release

Change-Id: I774c11f418a39597a14b43e12c30ef9e6d188e4a
This commit is contained in:
Android Build Coastguard Worker
2023-05-20 01:32:07 +00:00
83 changed files with 780 additions and 227 deletions
+2 -1
View File
@@ -135,7 +135,7 @@ message TaskBarContainer {
}
}
// Next value 50
// Next value 51
enum Attribute {
option allow_alias = true;
@@ -186,6 +186,7 @@ enum Attribute {
ALL_APPS_SEARCH_RESULT_VIDEO = 41;
ALL_APPS_SEARCH_RESULT_SYSTEM_POINTER = 42;
ALL_APPS_SEARCH_RESULT_EDUCARD = 43;
ALL_APPS_SEARCH_RESULT_LOCATION = 50;
// Result sources
DATA_SOURCE_APPSEARCH_APP_PREVIEW = 45;
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
<item android:state_hovered="false" android:color="?androidprv:attr/colorSurface" />
<item android:state_hovered="true" android:color="?androidprv:attr/colorSurfaceVariant" />
<item android:state_hovered="false" android:color="?androidprv:attr/materialColorSurfaceBright" />
<item android:state_hovered="true" android:color="?androidprv:attr/materialColorSurfaceVariant" />
</selector>
@@ -19,5 +19,5 @@
android:viewportHeight="208">
<path
android:pathData="M24.53,169.2L32.09,165.56C77.7,143.55 77.7,64.45 32.09,42.35L24.53,38.71C14.55,33.95 6.06,25.56 0,14.92V193.08C6.06,182.44 14.55,174.05 24.53,169.2Z"
android:fillColor="#217500"/>
android:fillColor="?attr/onSurfaceBack"/>
</vector>
@@ -19,5 +19,5 @@
android:viewportHeight="67">
<path
android:pathData="M180.9,0.6H51.1C22.9,0.6 0,23.4 0,51.7V67.6H232V51.7C232,23.4 209.1,0.6 180.9,0.6Z"
android:fillColor="#4B67AE"/>
android:fillColor="?attr/onSurfaceHome"/>
</vector>
@@ -19,5 +19,5 @@
android:viewportHeight="94">
<path
android:pathData="M185.56,76.95C184.79,75.3 184.3,73.56 184.21,71.81L182.85,55.81C182.46,51.34 180.13,47.27 176.45,44.65L163.25,35.44C161.8,34.37 160.54,33.11 159.47,31.65L150.16,18.46C147.54,14.77 143.47,12.45 139,12.06L123,10.6C121.25,10.41 119.51,10.02 117.86,9.24L103.31,2.45C101.27,1.49 99.04,1 96.91,1C94.77,1 92.54,1.49 90.5,2.45L75.95,9.24C74.31,10.02 72.56,10.51 70.81,10.6L54.81,11.96C50.35,12.35 46.27,14.68 43.65,18.36L34.44,31.56C33.37,33.01 32.11,34.27 30.66,35.34L17.27,44.65C13.58,47.27 11.26,51.34 10.87,55.81L9.41,71.81C9.22,73.56 8.83,75.3 8.05,76.95L1.26,91.5C0.78,92.67 0.39,93.83 0.1,94.99H193.52C193.32,93.83 192.94,92.57 192.35,91.5L185.56,76.95Z"
android:fillColor="#7E44AD"/>
android:fillColor="?attr/onSurfaceOverview"/>
</vector>
@@ -19,5 +19,5 @@
android:viewportHeight="303">
<path
android:pathData="M35.65,245.9L46.63,240.61C112.92,208.62 112.92,93.67 46.63,61.54L35.65,56.26C21.15,49.34 8.81,37.14 0,21.69V280.6C8.81,265.15 21.15,252.95 35.65,245.9Z"
android:fillColor="#217500"/>
android:fillColor="?attr/onSurfaceBack"/>
</vector>
@@ -19,5 +19,5 @@
android:viewportHeight="73">
<path
android:pathData="M282.3,0H79.7C38,0 3.7,32.1 0.3,73H361.7C358.3,32.1 324,0 282.3,0Z"
android:fillColor="#4B67AE"/>
android:fillColor="?attr/onSurfaceHome"/>
</vector>
@@ -19,5 +19,5 @@
android:viewportHeight="144">
<path
android:pathData="M284.38,116.48C283.19,113.95 282.45,111.28 282.3,108.61L280.22,84.1C279.63,77.27 276.06,71.03 270.42,67.03L250.22,52.92C247.99,51.28 246.06,49.35 244.43,47.13L230.18,26.93C226.16,21.29 219.93,17.72 213.1,17.13L188.6,14.9C185.92,14.6 183.25,14.01 180.72,12.82L158.45,2.43C155.33,0.94 151.91,0.2 148.65,0.2C145.38,0.2 141.97,0.94 138.85,2.43L116.57,12.82C114.05,14.01 111.38,14.75 108.7,14.9L84.2,16.98C77.37,17.57 71.13,21.14 67.12,26.78L53.01,46.98C51.38,49.21 49.45,51.14 47.22,52.77L26.73,67.03C21.09,71.03 17.52,77.27 16.93,84.1L14.7,108.61C14.4,111.28 13.81,113.95 12.62,116.48L2.23,138.75C1.48,140.53 0.89,142.32 0.45,144.1H296.55C296.26,142.32 295.66,140.38 294.77,138.75L284.38,116.48Z"
android:fillColor="#7E44AD"/>
android:fillColor="?attr/onSurfaceOverview"/>
</vector>
@@ -16,5 +16,4 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="?android:attr/dialogCornerRadius"/>
<solid android:color="?android:attr/colorAccent"/>
</shape>
@@ -21,7 +21,7 @@
<shape android:shape="rectangle"
android:tint="?colorButtonNormal">
<corners android:radius="24dp" />
<solid android:color="?androidprv:attr/colorSurface"/>
<solid android:color="?androidprv:attr/materialColorSurfaceBright"/>
</shape>
</item>
</ripple>
@@ -14,8 +14,8 @@
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:priv-android="http://schemas.android.com/apk/prv/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:shape="rectangle">
<solid android:color="?priv-android:attr/colorAccentPrimary" />
<solid android:color="?androidprv:attr/materialColorSecondaryFixed" />
<corners android:radius="?android:attr/dialogCornerRadius" />
</shape>
@@ -13,7 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
<item>
<shape
android:id="@android:id/mask"
@@ -25,7 +26,7 @@
<shape
android:shape="rectangle">
<corners android:radius="50dp"/>
<solid android:color="?android:attr/colorAccent"/>
<solid android:color="@android:color/white"/>
</shape>
</item>
</layer-list>
@@ -19,5 +19,5 @@
android:viewportHeight="208">
<path
android:pathData="M23.53,169.2L31.09,165.56C76.7,143.55 76.7,64.45 31.09,42.35L23.53,38.71C13.55,33.95 5.06,25.56 -1,14.92V193.08C5.06,182.44 13.55,174.05 23.53,169.2Z"
android:fillColor="#217500"/>
android:fillColor="?attr/onSurfaceBack"/>
</vector>
@@ -19,5 +19,5 @@
android:viewportHeight="66">
<path
android:pathData="M283.8,0H80.2C40.7,0 8,28.5 1.3,66H362.8C356,28.5 323.3,0 283.8,0Z"
android:fillColor="#4B67AE"/>
android:fillColor="?attr/onSurfaceHome"/>
</vector>
@@ -15,5 +15,6 @@
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/surfaceBack" />
<corners android:radius="@dimen/gesture_tutorial_menu_button_radius" />
</shape>
@@ -0,0 +1,20 @@
<!-- Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/surfaceHome" />
<corners android:radius="@dimen/gesture_tutorial_menu_button_radius" />
</shape>
@@ -0,0 +1,20 @@
<!-- Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/surfaceOverview" />
<corners android:radius="@dimen/gesture_tutorial_menu_button_radius" />
</shape>
@@ -19,5 +19,5 @@
android:viewportHeight="76">
<path
android:pathData="M188.6,56.5C188.2,51.9 185.8,47.7 182,45L168.4,35.5C166.9,34.4 165.6,33.1 164.5,31.6L155,18C152.3,14.2 148.1,11.8 143.5,11.4L127,9.9C125.2,9.7 123.4,9.3 121.7,8.5L106.7,1.5C104.6,0.5 102.3,0 100.1,0C97.8,0 95.6,0.5 93.5,1.5L78.5,8.5C76.8,9.3 75,9.8 73.2,9.9L56.7,11.3C52.1,11.7 47.9,14.1 45.2,17.9L35.7,31.5C34.6,33 33.3,34.3 31.8,35.4L18,45C14.2,47.7 11.8,51.9 11.4,56.5L9.9,73C9.8,74 9.6,75 9.3,76H190.6C190.3,75 190.1,74 190,73L188.6,56.5Z"
android:fillColor="#7E44AD"/>
android:fillColor="?attr/onSurfaceOverview"/>
</vector>
+1 -1
View File
@@ -16,6 +16,6 @@
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/gesture_home_tutorial_background" />
<solid android:color="?attr/surfaceHome" />
<corners android:radius="@dimen/gesture_tutorial_hotseat_icon_corner_radius" />
</shape>
@@ -16,6 +16,6 @@
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/quick_switch_view_background" />
<solid android:color="?attr/overviewScrimColor" />
<corners android:radius="@dimen/keyboard_quick_switch_view_radius" />
</shape>
@@ -13,5 +13,5 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/gesture_home_tutorial_background" />
<solid android:color="?attr/surfaceHome" />
</shape>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/surfaceContainer" />
<corners android:radius="@dimen/gesture_tutorial_small_task_view_corner_radius" />
</shape>
@@ -15,13 +15,15 @@
-->
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:theme="@style/GestureTutorialActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/gesture_tutorial_menu_padding_top"
android:paddingBottom="@dimen/gesture_tutorial_menu_padding_bottom"
android:paddingHorizontal="@dimen/gesture_tutorial_menu_padding_horizontal"
android:background="@color/gesture_tutorial_menu_background">
android:background="?androidprv:attr/materialColorSurfaceContainer">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/gesture_tutorial_menu_home_button"
@@ -29,9 +31,8 @@
android:layout_height="@dimen/gesture_tutorial_menu_button_height"
android:layout_marginEnd="@dimen/gesture_tutorial_menu_button_spacing"
android:layout_marginBottom="24dp"
android:background="@drawable/gesture_tutorial_menu_button_background"
android:background="@drawable/gesture_tutorial_menu_home_button_background"
android:clipToOutline="true"
android:backgroundTint="@color/gesture_home_tutorial_background"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/guideline"
@@ -50,7 +51,7 @@
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton"
style="@style/TextAppearance.GestureTutorial.MenuButton.Home"
android:id="@+id/gesture_tutorial_menu_home_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -69,9 +70,8 @@
android:layout_height="@dimen/gesture_tutorial_menu_button_height"
android:layout_marginEnd="@dimen/gesture_tutorial_menu_button_spacing"
android:layout_marginBottom="24dp"
android:background="@drawable/gesture_tutorial_menu_button_background"
android:background="@drawable/gesture_tutorial_menu_back_button_background"
android:clipToOutline="true"
android:backgroundTint="@color/gesture_back_tutorial_exiting_app"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/guideline"
@@ -90,7 +90,7 @@
app:layout_constraintStart_toStartOf="parent"/>
<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton"
style="@style/TextAppearance.GestureTutorial.MenuButton.Back"
android:id="@+id/gesture_tutorial_menu_back_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -108,9 +108,8 @@
android:layout_width="0dp"
android:layout_height="@dimen/gesture_tutorial_menu_button_height"
android:layout_marginBottom="24dp"
android:background="@drawable/gesture_tutorial_menu_button_background"
android:background="@drawable/gesture_tutorial_menu_overview_button_background"
android:clipToOutline="true"
android:backgroundTint="@color/gesture_overview_tutorial_background"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/guideline"
@@ -129,7 +128,7 @@
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton"
style="@style/TextAppearance.GestureTutorial.MenuButton.Overview"
android:id="@+id/gesture_tutorial_menu_overview_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -16,7 +16,7 @@
-->
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:priv-android="http://schemas.android.com/apk/prv/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
style="@style/TextTitle"
android:layout_width="match_parent"
android:layout_height="48dp"
@@ -24,7 +24,7 @@
android:forceHasOverlappingRendering="false"
android:gravity="center"
android:importantForAccessibility="noHideDescendants"
android:textColor="?priv-android:attr/textColorOnAccent"
android:textColor="?androidprv:attr/materialColorOnSecondaryFixed"
android:textSize="14sp"
android:autoSizeTextType="uniform"
android:autoSizeMaxTextSize="14sp"/>
@@ -13,8 +13,9 @@
-->
<View
xmlns:android="http://schemas.android.com/apk/res/android"
android:theme="@style/GestureTutorialActivity"
android:id="@+id/overview_gesture_tutorial_shape"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:background="@color/gesture_overview_tutorial_background" />
android:background="?attr/onSurfaceOverview" />
@@ -15,22 +15,23 @@
-->
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:theme="@style/GestureTutorialActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/gesture_tutorial_menu_padding_top"
android:paddingBottom="@dimen/gesture_tutorial_menu_padding_bottom"
android:paddingHorizontal="@dimen/gesture_tutorial_menu_padding_horizontal"
android:background="@color/gesture_tutorial_menu_background"
android:background="?androidprv:attr/materialColorSurfaceContainer"
android:clipToPadding="false">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/gesture_tutorial_menu_home_button"
android:layout_width="match_parent"
android:layout_height="@dimen/gesture_tutorial_menu_button_height"
android:background="@drawable/gesture_tutorial_menu_button_background"
android:background="@drawable/gesture_tutorial_menu_home_button_background"
android:clipToOutline="true"
android:backgroundTint="@color/gesture_home_tutorial_background"
app:layout_constraintVertical_chainStyle="packed"
app:layout_constraintTop_toTopOf="parent"
@@ -50,7 +51,7 @@
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton"
style="@style/TextAppearance.GestureTutorial.MenuButton.Home"
android:id="@+id/gesture_tutorial_menu_home_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -68,9 +69,8 @@
android:layout_width="match_parent"
android:layout_height="@dimen/gesture_tutorial_menu_button_height"
android:layout_marginTop="@dimen/gesture_tutorial_menu_button_spacing"
android:background="@drawable/gesture_tutorial_menu_button_background"
android:background="@drawable/gesture_tutorial_menu_back_button_background"
android:clipToOutline="true"
android:backgroundTint="@color/gesture_back_tutorial_exiting_app"
app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_menu_home_button"
app:layout_constraintBottom_toTopOf="@id/gesture_tutorial_menu_overview_button"
@@ -89,7 +89,7 @@
app:layout_constraintStart_toStartOf="parent"/>
<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton"
style="@style/TextAppearance.GestureTutorial.MenuButton.Back"
android:id="@+id/gesture_tutorial_menu_back_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -107,9 +107,8 @@
android:layout_width="match_parent"
android:layout_height="@dimen/gesture_tutorial_menu_button_height"
android:layout_marginTop="@dimen/gesture_tutorial_menu_button_spacing"
android:background="@drawable/gesture_tutorial_menu_button_background"
android:background="@drawable/gesture_tutorial_menu_overview_button_background"
android:clipToOutline="true"
android:backgroundTint="@color/gesture_overview_tutorial_background"
app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_menu_back_button"
app:layout_constraintBottom_toTopOf="@id/guideline"
@@ -128,7 +127,7 @@
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton"
style="@style/TextAppearance.GestureTutorial.MenuButton.Overview"
android:id="@+id/gesture_tutorial_menu_overview_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -16,10 +16,11 @@
-->
<com.android.quickstep.views.ClearAllButton
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
style="@style/OverviewClearAllButton"
android:id="@+id/clear_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/recents_clear_all"
android:textColor="?android:attr/textColorPrimary"
android:textColor="?androidprv:attr/materialColorOnSurface"
android:textSize="14sp" />
@@ -61,7 +61,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/gesture_tutorial_multi_row_task_view_spacing"
android:background="@drawable/top_task_view"
android:background="@drawable/redesigned_top_task_view"
android:clipToOutline="true"
android:visibility="invisible"
@@ -74,7 +74,7 @@
android:id="@+id/bottom_task_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@drawable/top_task_view"
android:background="@drawable/redesigned_top_task_view"
android:clipToOutline="true"
android:visibility="invisible"
@@ -121,7 +121,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:background="@color/gesture_back_tutorial_exiting_app"
android:visibility="gone" />
<RelativeLayout
@@ -216,7 +215,6 @@
<Button
android:id="@+id/gesture_tutorial_fragment_action_button"
style="@style/TextAppearance.GestureTutorial.ButtonLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/gesture_tutorial_action_button_background"
@@ -13,7 +13,8 @@
-->
<View
xmlns:android="http://schemas.android.com/apk/res/android"
android:theme="@style/GestureTutorialActivity"
android:id="@+id/swipe_up_gesture_tutorial_shape"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gesture_home_tutorial_background" />
android:background="?attr/surfaceHome" />
@@ -16,6 +16,7 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
@@ -30,7 +31,7 @@
android:layout_height="@dimen/system_shortcut_icon_size"
android:layout_marginStart="@dimen/task_menu_option_start_margin"
android:layout_gravity="center_horizontal"
android:backgroundTint="?android:attr/textColorPrimary"/>
android:backgroundTint="?androidprv:attr/materialColorOnSurface"/>
<TextView
style="@style/BaseIcon"
@@ -39,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/task_menu_option_start_margin"
android:textSize="14sp"
android:textColor="?android:attr/textColorPrimary"
android:textColor="?androidprv:attr/materialColorOnSurface"
android:focusable="false" />
</LinearLayout>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+56 -1
View File
@@ -14,7 +14,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<resources
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
<style name="AllSetTheme" parent="@android:style/Theme.DeviceDefault.NoActionBar">
<item name="android:navigationBarColor">@android:color/transparent</item>
@@ -24,4 +25,58 @@
<item name="android:windowBackground">@android:color/transparent</item>
</style>
<style name="TextAppearance.GestureTutorial.MenuButton.Home"
parent="TextAppearance.GestureTutorial.MenuButton">
<item name="android:textColor">?attr/onSurfaceHome</item>
</style>
<style name="TextAppearance.GestureTutorial.MenuButton.Back"
parent="TextAppearance.GestureTutorial.MenuButton">
<item name="android:textColor">?attr/onSurfaceBack</item>
</style>
<style name="TextAppearance.GestureTutorial.MenuButton.Overview"
parent="TextAppearance.GestureTutorial.MenuButton">
<item name="android:textColor">?attr/onSurfaceOverview</item>
</style>
<style name="TextAppearance.GestureTutorial.ButtonLabel.Home"
parent="TextAppearance.GestureTutorial.ButtonLabel">
<item name="android:textColor">?attr/secondaryHome</item>
</style>
<style name="TextAppearance.GestureTutorial.ButtonLabel.Back"
parent="TextAppearance.GestureTutorial.ButtonLabel">
<item name="android:textColor">?attr/secondaryBack</item>
</style>
<style name="TextAppearance.GestureTutorial.ButtonLabel.Overview"
parent="TextAppearance.GestureTutorial.ButtonLabel">
<item name="android:textColor">?attr/secondaryOverview</item>
</style>
<style name="TextAppearance.GestureTutorial.MainTitle.Success.Home"
parent="TextAppearance.GestureTutorial.MainTitle.Home" />
<style name="TextAppearance.GestureTutorial.MainTitle.Success.Back"
parent="TextAppearance.GestureTutorial.MainTitle.Back" />
<style name="TextAppearance.GestureTutorial.MainTitle.Success.Overview"
parent="TextAppearance.GestureTutorial.MainTitle.Overview" />
<style name="GestureTutorialActivity" parent="@style/AppTheme">
<item name="background">@android:color/transparent</item>
<item name="tutorialSubtitle">@android:color/white</item>
<item name="surfaceContainer">?androidprv:attr/materialColorSurfaceContainer</item>
<item name="onSurfaceHome">?androidprv:attr/materialColorPrimaryFixedDim</item>
<item name="surfaceHome">?androidprv:attr/materialColorOnPrimaryFixedVariant</item>
<item name="secondaryHome">?androidprv:attr/materialColorOnPrimaryFixed</item>
<item name="onSurfaceBack">?androidprv:attr/materialColorTertiaryFixedDim</item>
<item name="surfaceBack">?androidprv:attr/materialColorOnTertiaryFixedVariant</item>
<item name="secondaryBack">?androidprv:attr/materialColorOnTertiaryFixed</item>
<item name="onSurfaceOverview">?androidprv:attr/materialColorPrimaryFixed</item>
<item name="surfaceOverview">?androidprv:attr/materialColorOnSecondaryFixedVariant</item>
<item name="secondaryOverview">?androidprv:attr/materialColorOnSecondaryFixed</item>
</style>
</resources>
+18
View File
@@ -28,4 +28,22 @@
<!-- Border color for a keyboard quick switch task views -->
<attr name="borderColor" format="color" />
</declare-styleable>
<!--
Gesture nav edu specific attributes. These attributes are used to customize Gesture nav edu
view lottie animation colors in XML files.
-->
<declare-styleable name="RootSandboxLayout">
<attr name="tutorialSubtitle" format="color" />
<attr name="surfaceContainer" format="color" />
<attr name="onSurfaceHome" format="color" />
<attr name="surfaceHome" format="color" />
<attr name="secondaryHome" format="color" />
<attr name="onSurfaceBack" format="color" />
<attr name="surfaceBack" format="color" />
<attr name="secondaryBack" format="color" />
<attr name="onSurfaceOverview" format="color" />
<attr name="surfaceOverview" format="color" />
<attr name="secondaryOverview" format="color" />
</declare-styleable>
</resources>
-11
View File
@@ -42,17 +42,6 @@
<color name="gesture_tutorial_fake_previous_task_view_color">#3C4043</color> <!-- Gray -->
<color name="gesture_tutorial_taskbar_color">#E8EAED</color>
<!-- Redesigned gesture navigation tutorial -->
<color name="gesture_home_tutorial_background">#FFAD91</color> <!-- Light Orange -->
<color name="gesture_tutorial_workspace_background">#4B64AE</color> <!-- Indigo Blue -->
<color name="gesture_home_tutorial_arrow">#DBF59E</color> <!-- Lime Green -->
<color name="gesture_back_tutorial_exiting_app">#F9A2B9</color> <!-- Pink -->
<color name="gesture_back_tutorial_instructional_shape">#217500</color> <!-- Green -->
<color name="gesture_overview_tutorial_background">#DFF3AF</color> <!-- Light Green -->
<color name="gesture_overview_tutorial_swipe_rect">#7E44AD</color> <!-- Purple -->
<color name="gesture_overview_background">#CABCD6</color> <!-- Light Purple -->
<color name="gesture_tutorial_menu_background">#1C1B1F</color> <!-- Black -->
<!-- Mock hotseat -->
<color name="mock_app_icon">#BDC1C6</color>
<color name="mock_search_bar">#3C4043</color>
+76 -18
View File
@@ -18,10 +18,10 @@
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
<style name="TextAppearance.GestureTutorial"
parent="android:TextAppearance.Material.Body1" />
parent="@android:style/Theme.DeviceDefault.DayNight" />
<style name="TextAppearance.GestureTutorial.CallToAction"
parent="android:TextAppearance.Material.Body2" />
parent="@android:style/Theme.DeviceDefault.DayNight" />
<style name="TextAppearance.GestureTutorial.Title"
parent="TextAppearance.GestureTutorial">
@@ -51,10 +51,24 @@
<style name="TextAppearance.GestureTutorial.MenuButton"
parent="TextAppearance.GestureTutorial.Feedback.Title">
<item name="android:gravity">center</item>
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="fontWeight">400</item>
</style>
<style name="TextAppearance.GestureTutorial.MenuButton.Home"
parent="TextAppearance.GestureTutorial.MenuButton">
<item name="android:textColor">?attr/secondaryHome</item>
</style>
<style name="TextAppearance.GestureTutorial.MenuButton.Back"
parent="TextAppearance.GestureTutorial.MenuButton">
<item name="android:textColor">?attr/secondaryBack</item>
</style>
<style name="TextAppearance.GestureTutorial.MenuButton.Overview"
parent="TextAppearance.GestureTutorial.MenuButton">
<item name="android:textColor">?attr/secondaryOverview</item>
</style>
<style name="TextAppearance.GestureTutorial.Feedback.Title.AllSet"
parent="TextAppearance.GestureTutorial.Feedback.Title">
<item name="android:letterSpacing">0.03</item>
@@ -110,13 +124,28 @@
<style name="TextAppearance.GestureTutorial.ButtonLabel"
parent="TextAppearance.GestureTutorial.CallToAction">
<item name="android:gravity">center</item>
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textColor">?androidprv:attr/materialColorOnPrimary</item>
<item name="android:letterSpacing">0.02</item>
<item name="android:textSize">16sp</item>
<item name="android:textAllCaps">false</item>
<item name="android:fontFamily">google-sans-text-medium</item>
</style>
<style name="TextAppearance.GestureTutorial.ButtonLabel.Home"
parent="TextAppearance.GestureTutorial.ButtonLabel">
<item name="android:textColor">?attr/onSurfaceHome</item>
</style>
<style name="TextAppearance.GestureTutorial.ButtonLabel.Back"
parent="TextAppearance.GestureTutorial.ButtonLabel">
<item name="android:textColor">?attr/onSurfaceBack</item>
</style>
<style name="TextAppearance.GestureTutorial.ButtonLabel.Overview"
parent="TextAppearance.GestureTutorial.ButtonLabel">
<item name="android:textColor">?attr/onSurfaceOverview</item>
</style>
<style name="TextAppearance.GestureTutorial.CancelButtonLabel"
parent="TextAppearance.GestureTutorial.ButtonLabel">
<item name="android:textColor">?android:attr/colorAccent</item>
@@ -135,26 +164,45 @@
<style name="TextAppearance.GestureTutorial.MainTitle"
parent="TextAppearance.GestureTutorial">
<item name="android:textSize">36sp</item>
<item name="android:textColor">@android:color/black</item>
<item name="android:fontFamily">google-sans</item>
</style>
<style name="TextAppearance.GestureTutorial.MainTitle.Home"
parent="TextAppearance.GestureTutorial.MainTitle">
<item name="android:textColor">?attr/onSurfaceHome</item>
</style>
<style name="TextAppearance.GestureTutorial.MainTitle.Back"
parent="TextAppearance.GestureTutorial.MainTitle">
<item name="android:textColor">?attr/onSurfaceBack</item>
</style>
<style name="TextAppearance.GestureTutorial.MainTitle.Overview"
parent="TextAppearance.GestureTutorial.MainTitle">
<item name="android:textColor">?attr/onSurfaceOverview</item>
</style>
<style name="TextAppearance.GestureTutorial.MainTitle.Success.Home"
parent="TextAppearance.GestureTutorial.MainTitle.Home">
<item name="android:textColor">?attr/secondaryHome</item>
</style>
<style name="TextAppearance.GestureTutorial.MainTitle.Success.Back"
parent="TextAppearance.GestureTutorial.MainTitle.Back">
<item name="android:textColor">?attr/secondaryBack</item>
</style>
<style name="TextAppearance.GestureTutorial.MainTitle.Success.Overview"
parent="TextAppearance.GestureTutorial.MainTitle.Overview">
<item name="android:textColor">?attr/secondaryOverview</item>
</style>
<style name="TextAppearance.GestureTutorial.MainSubtitle"
parent="TextAppearance.GestureTutorial.Subtitle">
<item name="android:textSize">16sp</item>
<item name="android:letterSpacing">0.02</item>
<item name="android:textColor">@android:color/black</item>
<item name="android:fontFamily">google-sans-text</item>
</style>
<style name="TextAppearance.GestureTutorial.SuccessTitle"
parent="TextAppearance.GestureTutorial.MainTitle">
<item name="android:textColor">@android:color/white</item>
</style>
<style name="TextAppearance.GestureTutorial.SuccessSubtitle"
parent="TextAppearance.GestureTutorial.MainSubtitle">
<item name="android:textColor">@android:color/white</item>
<item name="android:textColor">?attr/tutorialSubtitle</item>
</style>
<style name="AllSetTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
@@ -226,8 +274,18 @@
<item name="android:textColor">?androidprv:attr/materialColorOnSurfaceInverse</item>
</style>
<style name="GestureTutorialActivity"
parent="@style/AppTheme">
<style name="GestureTutorialActivity" parent="@style/AppTheme">
<item name="background">@android:color/transparent</item>
<item name="tutorialSubtitle">@android:color/black</item>
<item name="surfaceContainer">?androidprv:attr/materialColorSurfaceContainer</item>
<item name="onSurfaceHome">?androidprv:attr/materialColorPrimaryFixed</item>
<item name="surfaceHome">@android:color/system_accent1_300</item>
<item name="secondaryHome">?androidprv:attr/materialColorOnPrimaryFixedVariant</item>
<item name="onSurfaceBack">?androidprv:attr/materialColorTertiaryFixed</item>
<item name="surfaceBack">@android:color/system_accent3_300</item>
<item name="secondaryBack">?androidprv:attr/materialColorOnTertiaryFixedVariant</item>
<item name="onSurfaceOverview">?androidprv:attr/materialColorPrimaryFixed</item>
<item name="surfaceOverview">@android:color/system_accent2_300</item>
<item name="secondaryOverview">?androidprv:attr/materialColorOnSecondaryFixedVariant</item>
</style>
</resources>
@@ -1282,7 +1282,8 @@ public class QuickstepLauncher extends Launcher {
getActivityLaunchOptions(taskView, null).options));
return;
}
mSplitSelectStateController.launchTasks(
mSplitSelectStateController.launchExistingSplitPair(
null /* launchingTaskView */,
groupTask.task1.key.id,
groupTask.task2.key.id,
SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT,
@@ -2041,8 +2041,9 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
if (!hasTargets() || mRecentsAnimationController == null) {
// If there are no targets or the animation not started, then there is nothing to finish
mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);
maybeAbortSwipePipToHome();
} else {
maybeFinishSwipeToHome();
maybeFinishSwipePipToHome();
finishRecentsControllerToHome(
() -> mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED));
}
@@ -2053,12 +2054,25 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
doLogGesture(HOME, mRecentsView == null ? null : mRecentsView.getCurrentPageTaskView());
}
/**
* Notifies SysUI that transition is aborted if applicable and also pass leash transactions
* from Launcher to WM.
*/
private void maybeAbortSwipePipToHome() {
if (mIsSwipingPipToHome && mSwipePipToHomeAnimators[0] != null) {
SystemUiProxy.INSTANCE.get(mContext).abortSwipePipToHome(
mSwipePipToHomeAnimator.getTaskId(),
mSwipePipToHomeAnimator.getComponentName());
mIsSwipingPipToHome = false;
}
}
/**
* Notifies SysUI that transition is finished if applicable and also pass leash transactions
* from Launcher to WM.
* This should happen before {@link #finishRecentsControllerToHome(Runnable)}.
*/
private void maybeFinishSwipeToHome() {
private void maybeFinishSwipePipToHome() {
if (mIsSwipingPipToHome && mSwipePipToHomeAnimators[0] != null) {
SystemUiProxy.INSTANCE.get(mContext).stopSwipePipToHome(
mSwipePipToHomeAnimator.getTaskId(),
@@ -47,6 +47,7 @@ import com.android.launcher3.views.FloatingView;
import com.android.launcher3.widget.LauncherAppWidgetHostView;
import com.android.quickstep.util.RectFSpringAnim;
import com.android.quickstep.util.StaggeredWorkspaceAnim;
import com.android.quickstep.util.TaskViewSimulator;
import com.android.quickstep.views.FloatingWidgetView;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
@@ -160,13 +161,16 @@ public class LauncherSwipeHandlerV2 extends
Rect crop = new Rect();
// We can assume there is only one remote target here because staged split never animates
// into the app icon, only into the homescreen
mRemoteTargetHandles[0].getTaskViewSimulator().getCurrentCropRect().roundOut(crop);
RemoteTargetGluer.RemoteTargetHandle remoteTargetHandle = mRemoteTargetHandles[0];
TaskViewSimulator tvs = remoteTargetHandle.getTaskViewSimulator();
// This is to set up the inverse matrix in the simulator
tvs.apply(remoteTargetHandle.getTransformParams());
tvs.getCurrentCropRect().roundOut(crop);
Size windowSize = new Size(crop.width(), crop.height());
int fallbackBackgroundColor =
FloatingWidgetView.getDefaultBackgroundColor(mContext, runningTaskTarget);
FloatingWidgetView floatingWidgetView = FloatingWidgetView.getFloatingWidgetView(mActivity,
hostView, backgroundLocation, windowSize,
mRemoteTargetHandles[0].getTaskViewSimulator().getCurrentCornerRadius(),
hostView, backgroundLocation, windowSize, tvs.getCurrentCornerRadius(),
isTargetTranslucent, fallbackBackgroundColor);
return new FloatingViewHomeAnimationFactory(floatingWidgetView) {
@@ -564,6 +564,20 @@ public class SystemUiProxy implements ISystemUiProxy {
}
}
/**
* Notifies WM Shell that launcher has aborted all the animation for swipe to home. WM Shell
* can use this callback to clean up its internal states.
*/
public void abortSwipePipToHome(int taskId, ComponentName componentName) {
if (mPip != null) {
try {
mPip.abortSwipePipToHome(taskId, componentName);
} catch (RemoteException e) {
Log.w(TAG, "Failed call abortSwipePipToHome");
}
}
}
/**
* Sets the next pip animation type to be the alpha animation.
*/
@@ -28,6 +28,9 @@ import com.android.launcher3.Utilities;
import com.android.launcher3.anim.Interpolators;
import com.android.quickstep.interaction.EdgeBackGestureHandler.BackGestureResult;
import com.android.quickstep.interaction.NavBarGestureHandler.NavBarGestureResult;
import com.android.quickstep.util.LottieAnimationColorUtils;
import java.util.Map;
/** A {@link TutorialController} for the Back tutorial. */
final class BackGestureTutorialController extends TutorialController {
@@ -36,6 +39,22 @@ final class BackGestureTutorialController extends TutorialController {
BackGestureTutorialController(BackGestureTutorialFragment fragment, TutorialType tutorialType) {
super(fragment, tutorialType);
// Set the Lottie animation colors specifically for the Back gesture
if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
LottieAnimationColorUtils.updateColors(
mAnimatedGestureDemonstration,
Map.of(".onSurfaceBack", fragment.mRootView.mColorOnSurfaceBack,
".surfaceBack", fragment.mRootView.mColorSurfaceBack,
".secondaryBack", fragment.mRootView.mColorSecondaryBack));
LottieAnimationColorUtils.updateColors(
mCheckmarkAnimation,
Map.of(".checkmark",
Utilities.isDarkTheme(mContext)
? fragment.mRootView.mColorOnSurfaceBack
: fragment.mRootView.mColorSecondaryBack,
".checkmarkBackground", fragment.mRootView.mColorSurfaceBack));
}
}
@Override
@@ -62,6 +81,28 @@ final class BackGestureTutorialController extends TutorialController {
: R.string.back_gesture_feedback_complete_with_overview_follow_up;
}
@Override
public int getTitleTextAppearance() {
return R.style.TextAppearance_GestureTutorial_MainTitle_Back;
}
@Override
public int getSuccessTitleTextAppearance() {
return R.style.TextAppearance_GestureTutorial_MainTitle_Success_Back;
}
@Override
public int getDoneButtonTextAppearance() {
return R.style.TextAppearance_GestureTutorial_ButtonLabel_Back;
}
@Override
public int getDoneButtonColor() {
return Utilities.isDarkTheme(mContext)
? mTutorialFragment.mRootView.mColorOnSurfaceBack
: mTutorialFragment.mRootView.mColorSecondaryBack;
}
@Override
protected int getMockAppTaskLayoutResId() {
return getMockAppTaskCurrentPageLayoutResId();
@@ -95,8 +136,13 @@ final class BackGestureTutorialController extends TutorialController {
}
@Override
protected int getSwipeActionColorResId() {
return R.color.gesture_tutorial_workspace_background;
protected int getSwipeActionColor() {
return mTutorialFragment.mRootView.mColorSurfaceContainer;
}
@Override
protected int getExitingAppColor() {
return mTutorialFragment.mRootView.mColorSurfaceBack;
}
@Override
@@ -22,6 +22,7 @@ import android.graphics.PointF;
import android.os.Build;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.quickstep.interaction.EdgeBackGestureHandler.BackGestureResult;
import com.android.quickstep.interaction.NavBarGestureHandler.NavBarGestureResult;
import com.android.quickstep.util.LottieAnimationColorUtils;
@@ -34,13 +35,22 @@ final class HomeGestureTutorialController extends SwipeUpGestureTutorialControll
HomeGestureTutorialController(HomeGestureTutorialFragment fragment, TutorialType tutorialType) {
super(fragment, tutorialType);
// Set the Lottie animation colors specifically for the Home gesture
if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
LottieAnimationColorUtils.updateColors(
mAnimatedGestureDemonstration,
Map.of(".onSurfaceHome", R.color.gesture_tutorial_workspace_background,
".surfaceHome", R.color.gesture_home_tutorial_background,
".arrow", R.color.gesture_home_tutorial_arrow),
mContext.getTheme());
Map.of(".onSurfaceHome", fragment.mRootView.mColorOnSurfaceHome,
".surfaceHome", fragment.mRootView.mColorSurfaceHome,
".secondaryHome", fragment.mRootView.mColorSecondaryHome));
LottieAnimationColorUtils.updateColors(
mCheckmarkAnimation,
Map.of(".checkmark",
Utilities.isDarkTheme(mContext)
? fragment.mRootView.mColorOnSurfaceHome
: fragment.mRootView.mColorSecondaryHome,
".checkmarkBackground", fragment.mRootView.mColorSurfaceHome));
}
}
@@ -70,6 +80,28 @@ final class HomeGestureTutorialController extends SwipeUpGestureTutorialControll
: R.string.home_gesture_feedback_complete_with_follow_up;
}
@Override
public int getTitleTextAppearance() {
return R.style.TextAppearance_GestureTutorial_MainTitle_Home;
}
@Override
public int getSuccessTitleTextAppearance() {
return R.style.TextAppearance_GestureTutorial_MainTitle_Success_Home;
}
@Override
public int getDoneButtonTextAppearance() {
return R.style.TextAppearance_GestureTutorial_ButtonLabel_Home;
}
@Override
public int getDoneButtonColor() {
return Utilities.isDarkTheme(mContext)
? mTutorialFragment.mRootView.mColorOnSurfaceHome
: mTutorialFragment.mRootView.mColorSecondaryHome;
}
@Override
protected int getMockAppTaskLayoutResId() {
return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
@@ -89,8 +121,13 @@ final class HomeGestureTutorialController extends SwipeUpGestureTutorialControll
}
@Override
protected int getSwipeActionColorResId() {
return R.color.gesture_tutorial_workspace_background;
protected int getSwipeActionColor() {
return mTutorialFragment.mRootView.mColorSurfaceContainer;
}
@Override
protected int getExitingAppColor() {
return mTutorialFragment.mRootView.mColorSurfaceHome;
}
@Override
@@ -28,13 +28,16 @@ import android.os.Handler;
import android.view.View;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatedFloat;
import com.android.launcher3.anim.PendingAnimation;
import com.android.quickstep.SwipeUpAnimationLogic;
import com.android.quickstep.interaction.EdgeBackGestureHandler.BackGestureResult;
import com.android.quickstep.interaction.NavBarGestureHandler.NavBarGestureResult;
import com.android.quickstep.util.LottieAnimationColorUtils;
import java.util.ArrayList;
import java.util.Map;
/** A {@link TutorialController} for the Overview tutorial. */
@TargetApi(Build.VERSION_CODES.R)
@@ -43,6 +46,23 @@ final class OverviewGestureTutorialController extends SwipeUpGestureTutorialCont
OverviewGestureTutorialController(OverviewGestureTutorialFragment fragment,
TutorialType tutorialType) {
super(fragment, tutorialType);
// Set the Lottie animation colors specifically for the Overview gesture
if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
LottieAnimationColorUtils.updateColors(
mAnimatedGestureDemonstration,
Map.of(".onSurfaceOverview", fragment.mRootView.mColorOnSurfaceOverview,
".surfaceOverview", fragment.mRootView.mColorSurfaceOverview,
".secondaryOverview", fragment.mRootView.mColorSecondaryOverview));
LottieAnimationColorUtils.updateColors(
mCheckmarkAnimation,
Map.of(".checkmark",
Utilities.isDarkTheme(mContext)
? fragment.mRootView.mColorOnSurfaceOverview
: fragment.mRootView.mColorSecondaryOverview,
".checkmarkBackground", fragment.mRootView.mColorSurfaceOverview));
}
}
@Override
public int getIntroductionTitle() {
@@ -68,6 +88,28 @@ final class OverviewGestureTutorialController extends SwipeUpGestureTutorialCont
: R.string.overview_gesture_feedback_complete_without_follow_up;
}
@Override
public int getTitleTextAppearance() {
return R.style.TextAppearance_GestureTutorial_MainTitle_Overview;
}
@Override
public int getSuccessTitleTextAppearance() {
return R.style.TextAppearance_GestureTutorial_MainTitle_Success_Overview;
}
@Override
public int getDoneButtonTextAppearance() {
return R.style.TextAppearance_GestureTutorial_ButtonLabel_Overview;
}
@Override
public int getDoneButtonColor() {
return Utilities.isDarkTheme(mContext)
? mTutorialFragment.mRootView.mColorOnSurfaceOverview
: mTutorialFragment.mRootView.mColorSecondaryOverview;
}
@Override
protected int getMockAppTaskLayoutResId() {
return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
@@ -87,15 +129,21 @@ final class OverviewGestureTutorialController extends SwipeUpGestureTutorialCont
}
@Override
protected int getSwipeActionColorResId() {
return R.color.gesture_overview_background;
protected int getSwipeActionColor() {
return mTutorialFragment.mRootView.mColorSurfaceOverview;
}
@Override
protected int getMockPreviousAppTaskThumbnailColorResId() {
protected int getExitingAppColor() {
return mTutorialFragment.mRootView.mColorOnSurfaceOverview;
}
@Override
protected int getMockPreviousAppTaskThumbnailColor() {
return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
? R.color.gesture_overview_tutorial_swipe_rect
: R.color.gesture_tutorial_fake_previous_task_view_color;
? mTutorialFragment.mRootView.mColorSurfaceContainer
: mContext.getResources().getColor(
R.color.gesture_tutorial_fake_previous_task_view_color);
}
@Override
@@ -213,7 +261,7 @@ final class OverviewGestureTutorialController extends SwipeUpGestureTutorialCont
}
private void onSuccessAnimationComplete() {
setLauncherViewColor(R.color.gesture_overview_tutorial_swipe_rect);
mFakeLauncherView.setBackgroundColor(getMockPreviousAppTaskThumbnailColor());
showSuccessFeedback();
}
}
@@ -18,6 +18,8 @@ package com.android.quickstep.interaction;
import static com.android.launcher3.config.FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.Insets;
import android.graphics.Rect;
import android.util.AttributeSet;
@@ -26,7 +28,9 @@ import android.view.View;
import android.view.WindowInsets;
import android.widget.RelativeLayout;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;
import com.android.launcher3.R;
@@ -39,21 +43,70 @@ public class RootSandboxLayout extends RelativeLayout {
private final Rect mTempInclusionBounds = new Rect();
private final Rect mTempExclusionBounds = new Rect();
@ColorInt final int mColorSurfaceContainer;
@ColorInt final int mColorOnSurfaceHome;
@ColorInt final int mColorSurfaceHome;
@ColorInt final int mColorSecondaryHome;
@ColorInt final int mColorOnSurfaceBack;
@ColorInt final int mColorSurfaceBack;
@ColorInt final int mColorSecondaryBack;
@ColorInt final int mColorOnSurfaceOverview;
@ColorInt final int mColorSurfaceOverview;
@ColorInt final int mColorSecondaryOverview;
private View mFeedbackView;
private View mTutorialStepView;
private View mSkipButton;
private View mDoneButton;
public RootSandboxLayout(Context context) {
super(context);
this(context, null);
}
public RootSandboxLayout(Context context, AttributeSet attrs) {
super(context, attrs);
this(context, attrs, 0);
}
public RootSandboxLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
this(context, attrs, defStyleAttr, 0);
}
public RootSandboxLayout(
@NonNull Context context,
@Nullable AttributeSet attrs,
int defStyleAttr,
int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
TypedArray ta = context.obtainStyledAttributes(
attrs,
R.styleable.RootSandboxLayout,
defStyleAttr,
defStyleRes);
boolean isDarkTheme = Utilities.isDarkTheme(context);
int colorSurface = isDarkTheme ? Color.BLACK : Color.WHITE;
int colorOnSurface = isDarkTheme ? Color.WHITE : Color.BLACK;
int colorSecondary = Color.GRAY;
mColorSurfaceContainer = ta.getColor(
R.styleable.RootSandboxLayout_surfaceContainer, colorSurface);
mColorOnSurfaceHome = ta.getColor(
R.styleable.RootSandboxLayout_onSurfaceHome, colorOnSurface);
mColorSurfaceHome = ta.getColor(R.styleable.RootSandboxLayout_surfaceHome, colorSurface);
mColorSecondaryHome = ta.getColor(
R.styleable.RootSandboxLayout_secondaryHome, colorSecondary);
mColorOnSurfaceBack = ta.getColor(
R.styleable.RootSandboxLayout_onSurfaceBack, colorOnSurface);
mColorSurfaceBack = ta.getColor(R.styleable.RootSandboxLayout_surfaceBack, colorSurface);
mColorSecondaryBack = ta.getColor(
R.styleable.RootSandboxLayout_secondaryBack, colorSecondary);
mColorOnSurfaceOverview = ta.getColor(
R.styleable.RootSandboxLayout_onSurfaceOverview, colorOnSurface);
mColorSurfaceOverview = ta.getColor(
R.styleable.RootSandboxLayout_surfaceOverview, colorSurface);
mColorSecondaryOverview = ta.getColor(
R.styleable.RootSandboxLayout_secondaryOverview, colorSecondary);
ta.recycle();
}
@Override
@@ -26,7 +26,6 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.annotation.ColorRes;
import android.annotation.RawRes;
import android.content.Context;
import android.content.pm.PackageManager;
@@ -47,11 +46,13 @@ import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.CallSuper;
import androidx.annotation.ColorInt;
import androidx.annotation.DrawableRes;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.annotation.StyleRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.content.res.AppCompatResources;
@@ -119,7 +120,7 @@ abstract class TutorialController implements BackGestureAttemptCallback,
private boolean mGestureCompleted = false;
protected LottieAnimationView mAnimatedGestureDemonstration;
private LottieAnimationView mCheckmarkAnimation;
protected LottieAnimationView mCheckmarkAnimation;
private RelativeLayout mFullGestureDemonstration;
// These runnables should be used when posting callbacks to their views and cleared from their
@@ -258,15 +259,17 @@ abstract class TutorialController implements BackGestureAttemptCallback,
return NO_ID;
}
@ColorRes
protected int getMockPreviousAppTaskThumbnailColorResId() {
return R.color.gesture_tutorial_fake_previous_task_view_color;
@ColorInt
protected int getMockPreviousAppTaskThumbnailColor() {
return mContext.getResources().getColor(
R.color.gesture_tutorial_fake_previous_task_view_color);
}
@ColorRes
protected int getSwipeActionColorResId() {
return NO_ID;
}
@ColorInt
protected abstract int getSwipeActionColor();
@ColorInt
protected abstract int getExitingAppColor();
@DrawableRes
public int getMockAppIconResId() {
@@ -304,6 +307,24 @@ abstract class TutorialController implements BackGestureAttemptCallback,
return NO_ID;
}
@StyleRes
public int getTitleTextAppearance() {
return NO_ID;
}
@StyleRes
public int getSuccessTitleTextAppearance() {
return NO_ID;
}
@StyleRes
public int getDoneButtonTextAppearance() {
return NO_ID;
}
@ColorInt
public abstract int getDoneButtonColor();
void showFeedback() {
if (mGestureCompleted) {
mFeedbackView.setTranslationY(0);
@@ -417,9 +438,7 @@ abstract class TutorialController implements BackGestureAttemptCallback,
private void showSuccessPage() {
mCheckmarkAnimation.setVisibility(View.VISIBLE);
mCheckmarkAnimation.playAnimation();
mFeedbackTitleView.setTextAppearance(R.style.TextAppearance_GestureTutorial_SuccessTitle);
mFeedbackSubtitleView.setTextAppearance(
R.style.TextAppearance_GestureTutorial_SuccessSubtitle);
mFeedbackTitleView.setTextAppearance(mContext, getSuccessTitleTextAppearance());
}
public boolean isGestureCompleted() {
@@ -536,6 +555,9 @@ abstract class TutorialController implements BackGestureAttemptCallback,
updateLayout();
if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
mFeedbackTitleView.setTextAppearance(mContext, getTitleTextAppearance());
mDoneButton.setTextAppearance(mContext, getDoneButtonTextAppearance());
mDoneButton.getBackground().setTint(getDoneButtonColor());
mCheckmarkAnimation.setAnimation(mTutorialFragment.isAtFinalStep()
? R.raw.checkmark_animation_end
: R.raw.checkmark_animation_in_progress);
@@ -560,8 +582,7 @@ abstract class TutorialController implements BackGestureAttemptCallback,
protected void resetViewsForBackGesture() {
mFakeTaskView.setVisibility(View.VISIBLE);
mFakeTaskView.setBackgroundColor(
mContext.getColor(R.color.gesture_tutorial_workspace_background));
mFakeTaskView.setBackgroundColor(getSwipeActionColor());
mExitingAppView.setVisibility(View.VISIBLE);
// reset the exiting app's dimensions
@@ -649,26 +670,26 @@ abstract class TutorialController implements BackGestureAttemptCallback,
}
}
void setLauncherViewColor(@ColorRes int backgroundColorRes) {
mFakeLauncherView.setBackgroundColor(mContext.getColor(backgroundColorRes));
}
private void updateDrawables() {
if (mContext != null) {
mTutorialFragment.getRootView().setBackground(AppCompatResources.getDrawable(
mContext, getMockWallpaperResId()));
mTutorialFragment.updateFeedbackAnimation();
setLauncherViewColor(ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
? getSwipeActionColorResId() : R.color.gesture_tutorial_fake_wallpaper_color);
mFakeLauncherView.setBackgroundColor(ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
? getSwipeActionColor()
: mContext.getColor(R.color.gesture_tutorial_fake_wallpaper_color));
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(
getMockPreviousAppTaskThumbnailColorResId()));
mFakePreviousTaskView.setFakeTaskViewFillColor(getMockPreviousAppTaskThumbnailColor());
mFakeIconView.setBackground(AppCompatResources.getDrawable(
mContext, getMockAppIconResId()));
if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
mExitingAppView.setBackgroundColor(getExitingAppColor());
}
}
}
@@ -297,36 +297,6 @@ public class SplitSelectStateController {
}
}
/**
* To be called when we want to launch split pairs from an existing GroupedTaskView.
*/
public void launchTasks(GroupedTaskView groupedTaskView, Consumer<Boolean> callback,
boolean freezeTaskList) {
mLaunchingTaskView = groupedTaskView;
TaskView.TaskIdAttributeContainer[] taskIdAttributeContainers =
groupedTaskView.getTaskIdAttributeContainers();
launchTasks(taskIdAttributeContainers[0].getTask().key.id,
taskIdAttributeContainers[1].getTask().key.id,
taskIdAttributeContainers[0].getStagePosition(), callback, freezeTaskList,
groupedTaskView.getSplitRatio());
}
/**
* To be called when we want to launch split pairs from Overview when split is initiated from
* Overview.
*/
public void launchTasks(int taskId1, int taskId2, @StagePosition int stagePosition,
Consumer<Boolean> callback, boolean freezeTaskList, float splitRatio) {
if (FeatureFlags.ENABLE_SPLIT_LAUNCH_DATA_REFACTOR.get()) {
mSplitSelectDataHolder.setInitialTaskSelect(null /*intent*/,
stagePosition, null /*itemInfo*/, null /*splitEvent*/,
taskId1);
mSplitSelectDataHolder.setSecondTask(taskId2);
}
launchTasks(taskId1, null /* intent1 */, taskId2, null /* intent2 */, stagePosition,
callback, freezeTaskList, splitRatio, null);
}
/**
* To be called when we want to launch split pairs from Overview. Split can be initiated from
* either Overview or home, or all apps. Either both taskIds are set, or a pending intent + a
@@ -510,6 +480,47 @@ public class SplitSelectStateController {
}
}
/**
* Used to launch split screen from a split pair that already exists (usually accessible through
* Overview). This is different than
* {@link #launchTasks(int, Intent, int, Intent, int, Consumer, boolean, float, InstanceId)} in
* that this only launches split screen that are existing tasks. This doesn't determine which
* API should be used (i.e. launching split with existing tasks vs intents vs shortcuts, etc).
*
* <p/>
* NOTE: This is not to be used to launch AppPairs.
*/
public void launchExistingSplitPair(@Nullable GroupedTaskView groupedTaskView,
int firstTaskId, int secondTaskId, @StagePosition int stagePosition,
Consumer<Boolean> callback, boolean freezeTaskList, float splitRatio) {
mLaunchingTaskView = groupedTaskView;
final ActivityOptions options1 = ActivityOptions.makeBasic();
if (freezeTaskList) {
options1.setFreezeRecentTasksReordering();
}
Bundle optionsBundle = options1.toBundle();
if (TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) {
final RemoteSplitLaunchTransitionRunner animationRunner =
new RemoteSplitLaunchTransitionRunner(firstTaskId, secondTaskId, callback);
final RemoteTransition remoteTransition = new RemoteTransition(animationRunner,
ActivityThread.currentActivityThread().getApplicationThread(),
"LaunchSplitPair");
mSystemUiProxy.startTasks(firstTaskId, optionsBundle, secondTaskId,
null /* options2 */, stagePosition, splitRatio,
remoteTransition, null /*shellInstanceId*/);
} else {
final RemoteSplitLaunchAnimationRunner animationRunner =
new RemoteSplitLaunchAnimationRunner(firstTaskId, secondTaskId, callback);
final RemoteAnimationAdapter adapter = new RemoteAnimationAdapter(
animationRunner, 300, 150,
ActivityThread.currentActivityThread().getApplicationThread());
mSystemUiProxy.startTasksWithLegacyTransition(firstTaskId, optionsBundle,
secondTaskId, null /* options2 */, stagePosition,
splitRatio, adapter, null /*shellInstanceId*/);
}
}
private void launchIntentOrShortcut(Intent intent, UserHandle user, ActivityOptions options1,
int taskId, @StagePosition int stagePosition, float splitRatio,
RemoteTransition remoteTransition, @Nullable InstanceId shellInstanceId) {
@@ -223,13 +223,11 @@ public class GroupedTaskView extends TaskView {
// Callbacks run from remote animation when recents animation not currently running
InteractionJankMonitorWrapper.begin(this,
InteractionJankMonitorWrapper.CUJ_SPLIT_SCREEN_ENTER, "Enter form GroupedTaskView");
recentsView.getSplitSelectController().launchTasks(this /*groupedTaskView*/,
success -> {
endCallback.executeAllAndDestroy();
InteractionJankMonitorWrapper.end(
InteractionJankMonitorWrapper.CUJ_SPLIT_SCREEN_ENTER);
},
false /* freezeTaskList */);
launchTask(success -> {
endCallback.executeAllAndDestroy();
InteractionJankMonitorWrapper.end(
InteractionJankMonitorWrapper.CUJ_SPLIT_SCREEN_ENTER);
}, false /* freezeTaskList */);
// Callbacks get run from recentsView for case when recents animation already running
recentsView.addSideTaskLaunchCallback(endCallback);
@@ -238,9 +236,9 @@ public class GroupedTaskView extends TaskView {
@Override
public void launchTask(@NonNull Consumer<Boolean> callback, boolean isQuickswitch) {
getRecentsView().getSplitSelectController().launchTasks(mTask.key.id, mSecondaryTask.key.id,
SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT, callback, isQuickswitch,
getSplitRatio());
getRecentsView().getSplitSelectController().launchExistingSplitPair(this, mTask.key.id,
mSecondaryTask.key.id, SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT,
callback, isQuickswitch, getSplitRatio());
}
@Override
@@ -23,7 +23,6 @@ import android.content.Context;
import android.content.Intent;
import com.android.launcher3.tapl.LauncherInstrumentation;
import com.android.launcher3.tapl.Overview;
import com.android.launcher3.tapl.Taskbar;
import com.android.launcher3.ui.AbstractLauncherUiTest;
import com.android.launcher3.ui.TaplTestsLauncher3;
@@ -58,10 +57,6 @@ public class AbstractTaplTestsTaskbar extends AbstractQuickStepTest {
"com.android.launcher3.testcomponent.BaseTestingActivity");
mLauncherLayout = TestUtil.setLauncherDefaultLayout(mTargetContext, layoutBuilder);
TaplTestsLauncher3.initialize(this);
Overview overview = mLauncher.getWorkspace().switchToOverview();
if (overview.hasTasks()) {
overview.dismissAllTasks();
}
startAppFast(CALCULATOR_APP_PACKAGE);
mLauncher.enableBlockTimeout(true);
mLauncher.showTaskbarIfHidden();
@@ -24,7 +24,6 @@ import com.android.launcher3.util.RaceConditionReproducer;
import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -57,7 +56,6 @@ public class StartLauncherViaGestureTests extends AbstractQuickStepTest {
eventProcessor.finishIteration();
}
@Ignore
@Test
@NavigationModeSwitch
public void testStressPressHome() {
@@ -70,7 +68,6 @@ public class StartLauncherViaGestureTests extends AbstractQuickStepTest {
}
}
@Ignore
@Test
@NavigationModeSwitch
public void testStressSwipeToOverview() {
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:color="@android:color/system_neutral1_900"
android:lStar="12" />
</selector>
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:color="@android:color/system_neutral1_50"
android:lStar="94" />
</selector>
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:alpha="0.25"
android:color="?android:attr/colorAccent"/>
<item android:alpha="0.35"
android:color="?attr/workspaceSurfaceColor"/>
</selector>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:alpha="0.3"
android:color="?android:attr/colorAccent"/>
</selector>
+4 -3
View File
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
<item
android:alpha="1"
android:color="?android:attr/textColorPrimary"
android:color="?androidprv:attr/materialColorOnSurface"
android:state_enabled="true" />
<item
android:alpha="?android:disabledAlpha"
android:color="?android:attr/textColorPrimary"
android:color="?androidprv:attr/materialColorOnSurface"
android:state_enabled="false" />
</selector>
+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:color="?attr/popupColorBackground" />
</selector>
+3 -3
View File
@@ -23,15 +23,15 @@
<shape android:shape="rectangle" >
<stroke
android:width="@dimen/spring_loaded_panel_border"
android:color="?android:attr/colorAccent" />
<solid android:color="@color/cell_layout_bg_color_active"/>
android:color="?attr/workspaceAccentColor" />
<solid android:color="@color/cell_layout_bg_color"/>
<corners android:radius="?android:attr/dialogCornerRadius" />
</shape>
</item>
<item>
<shape android:shape="rectangle" >
<solid android:color="@color/cell_layout_bg_color_inactive"/>
<solid android:color="@color/cell_layout_bg_color"/>
<corners android:radius="?android:attr/dialogCornerRadius" />
</shape>
</item>
+3 -3
View File
@@ -23,15 +23,15 @@
<shape android:shape="rectangle" >
<stroke
android:width="@dimen/spring_loaded_panel_border"
android:color="?android:attr/colorAccent" />
<solid android:color="@color/cell_layout_bg_color_active"/>
android:color="?attr/workspaceAccentColor" />
<solid android:color="@color/cell_layout_bg_color"/>
<corners android:radius="@dimen/bg_round_rect_radius" />
</shape>
</item>
<item>
<shape android:shape="rectangle" >
<solid android:color="@color/cell_layout_bg_color_inactive"/>
<solid android:color="@color/cell_layout_bg_color"/>
<corners android:radius="@dimen/bg_round_rect_radius" />
</shape>
</item>
+1 -1
View File
@@ -16,6 +16,6 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/workspaceAccentColor" />
<solid android:color="?attr/dropTargetHoverButtonColor" />
<corners android:radius="@dimen/drop_target_button_frame_radius" />
</shape>
+1 -1
View File
@@ -15,6 +15,6 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/popupColorPrimary"/>
<solid android:color="?attr/popupColorBackground"/>
<corners android:radius="@dimen/dialogCornerRadius"/>
</shape>
+1 -1
View File
@@ -35,7 +35,7 @@
android:singleLine="true"
android:ellipsize="end"
android:textSize="14sp"
android:textColor="?android:attr/textColorPrimary"
android:textColor="?attr/popupTextColor"
launcher:layoutHorizontal="true"
launcher:iconDisplay="shortcut_popup"
launcher:iconSizeOverride="@dimen/deep_shortcut_icon_size" />
+2 -2
View File
@@ -30,7 +30,7 @@
android:lines="1"
android:ellipsize="end"
android:hyphenationFrequency="full"
android:textColor="@color/system_shortcut_text"
android:textColor="?attr/popupTextColor"
launcher:iconDisplay="shortcut_popup"
launcher:layoutHorizontal="true"
android:focusable="false" />
@@ -41,5 +41,5 @@
android:layout_height="@dimen/system_shortcut_icon_size"
android:layout_marginStart="@dimen/system_shortcut_margin_start"
android:layout_gravity="start|center_vertical"
android:backgroundTint="@color/system_shortcut_text"/>
android:backgroundTint="?attr/popupTextColor"/>
</merge>
+1 -1
View File
@@ -18,7 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/system_shortcut_header_icon_touch_size"
android:layout_height="@dimen/system_shortcut_header_icon_touch_size"
android:tint="?attr/iconOnlyShortcutColor"
android:tint="?attr/popupTextColor"
android:tintMode="src_in"
android:padding="@dimen/system_shortcut_header_icon_padding"
android:theme="@style/PopupItemIconOnly" />
+1 -1
View File
@@ -18,7 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/system_shortcut_header_icon_touch_size"
android:layout_height="@dimen/system_shortcut_header_icon_touch_size"
android:tint="?attr/iconOnlyShortcutColor"
android:tint="?attr/popupTextColor"
android:tintMode="src_in"
android:padding="@dimen/system_shortcut_header_icon_padding"
android:paddingStart="@dimen/system_shortcut_header_icon_padding_inner"
@@ -18,7 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/system_shortcut_header_icon_touch_size"
android:layout_height="@dimen/system_shortcut_header_icon_touch_size"
android:tint="?attr/iconOnlyShortcutColor"
android:tint="?attr/popupTextColor"
android:tintMode="src_in"
android:padding="@dimen/system_shortcut_header_icon_padding"
android:paddingStart="@dimen/system_shortcut_header_icon_padding_outer"
+8 -1
View File
@@ -20,10 +20,12 @@
<color name="popup_color_primary_light">@android:color/system_accent2_50</color>
<color name="popup_color_secondary_light">@android:color/system_neutral2_100</color>
<color name="popup_color_tertiary_light">@android:color/system_neutral2_300</color>
<color name="popup_text_color_light">@android:color/system_neutral1_900</color>
<color name="popup_color_neutral_dark">@android:color/system_neutral1_1000</color>
<color name="popup_color_primary_dark">@android:color/system_neutral2_800</color>
<color name="popup_color_secondary_dark">@android:color/system_neutral1_900</color>
<color name="popup_color_tertiary_dark">@android:color/system_neutral2_700</color>
<color name="popup_text_color_dark">@android:color/system_neutral1_100</color>
<color name="popup_notification_dot_light">@android:color/system_accent1_100</color>
<color name="popup_notification_dot_dark">@android:color/system_accent2_600</color>
@@ -59,7 +61,12 @@
<color name="home_settings_track_off_color">@android:color/system_neutral2_600</color>
<color name="workspace_accent_color_light">@android:color/system_accent1_100</color>
<color name="workspace_accent_color_dark">@android:color/system_accent2_600</color>
<color name="workspace_accent_color_dark">@android:color/system_accent1_900</color>
<color name="workspace_surface_color">@android:color/system_accent1_100</color>
<color name="drop_target_hover_text_color_light">@android:color/system_accent1_900</color>
<color name="drop_target_hover_text_color_dark">@android:color/system_accent1_100</color>
<color name="drop_target_hover_button_color_light">@android:color/system_accent1_100</color>
<color name="drop_target_hover_button_color_dark">@android:color/system_accent1_700</color>
<color name="preload_icon_accent_color_light">@android:color/system_accent1_600</color>
<color name="preload_icon_background_color_light">@android:color/system_accent2_200</color>
+4
View File
@@ -25,6 +25,8 @@
<attr name="popupColorPrimary" format="color" />
<attr name="popupColorSecondary" format="color" />
<attr name="popupColorTertiary" format="color" />
<attr name="popupColorBackground" format="color" />
<attr name="popupTextColor" format="color" />
<attr name="popupShadeFirst" format="color" />
<attr name="popupShadeSecond" format="color" />
<attr name="popupShadeThird" format="color" />
@@ -51,7 +53,9 @@
<attr name="folderHintTextColor" format="color" />
<attr name="isFolderDarkText" format="boolean" />
<attr name="workspaceAccentColor" format="color" />
<attr name="workspaceSurfaceColor" format="color" />
<attr name="dropTargetHoverTextColor" format="color" />
<attr name="dropTargetHoverButtonColor" format="color" />
<attr name="preloadIconAccentColor" format="color" />
<attr name="preloadIconBackgroundColor" format="color" />
<attr name="widgetPickerTitleColor" format="color"/>
+9 -2
View File
@@ -39,10 +39,12 @@
<color name="popup_color_primary_light">#FFF</color>
<color name="popup_color_secondary_light">#F1F3F4</color>
<color name="popup_color_tertiary_light">#E0E0E0</color> <!-- Gray 300 -->
<color name="popup_text_color_light">#1F1F1F</color>
<color name="popup_color_neutral_dark">#3C4043</color> <!-- Gray 800 -->
<color name="popup_color_primary_dark">#3C4043</color> <!-- Gray 800 -->
<color name="popup_color_secondary_dark">#202124</color>
<color name="popup_color_tertiary_dark">#757575</color> <!-- Gray 600 -->
<color name="popup_text_color_dark">#E3E3E3</color>
<color name="popup_shade_first_light">#F9F9F9</color>
<color name="popup_shade_second_light">#F1F1F1</color>
@@ -80,8 +82,13 @@
<color name="wallpaper_popup_scrim">?android:attr/colorAccent</color>
<color name="workspace_accent_color_light">#ff8df5e3</color>
<color name="workspace_accent_color_dark">#ff3d665f</color>
<color name="workspace_accent_color_light">#D3E3FD</color>
<color name="workspace_accent_color_dark">#041E49</color>
<color name="workspace_surface_color">#D3E3FD</color>
<color name="drop_target_hover_text_color_light">#041E49</color>
<color name="drop_target_hover_text_color_dark">#D3E3FD</color>
<color name="drop_target_hover_button_color_light">#D3E3FD</color>
<color name="drop_target_hover_button_color_dark">#0842A0</color>
<color name="all_apps_button_color">#40484B</color>
+11 -3
View File
@@ -37,6 +37,8 @@
<item name="popupColorPrimary">@color/popup_color_primary_light</item>
<item name="popupColorSecondary">@color/popup_color_secondary_light</item>
<item name="popupColorTertiary">@color/popup_color_tertiary_light</item>
<item name="popupColorBackground">#EFEDED</item>
<item name="popupTextColor">@color/popup_text_color_light</item>
<item name="popupShadeFirst">@color/popup_shade_first_light</item>
<item name="popupShadeSecond">@color/popup_shade_second_light</item>
<item name="popupShadeThird">@color/popup_shade_third_light</item>
@@ -61,7 +63,9 @@
<item name="iconOnlyShortcutColor">?android:attr/textColorSecondary</item>
<item name="eduHalfSheetBGColor">?android:attr/colorAccent</item>
<item name="workspaceAccentColor">@color/workspace_accent_color_light</item>
<item name="dropTargetHoverTextColor">@color/workspace_text_color_dark</item>
<item name="workspaceSurfaceColor">@color/workspace_surface_color</item>
<item name="dropTargetHoverTextColor">@color/drop_target_hover_text_color_light</item>
<item name="dropTargetHoverButtonColor">@color/drop_target_hover_button_color_light</item>
<item name="overviewScrimColor">@color/overview_scrim</item>
<item name="preloadIconAccentColor">@color/preload_icon_accent_color_light</item>
<item name="preloadIconBackgroundColor">@color/preload_icon_background_color_light</item>
@@ -90,7 +94,8 @@
<item name="isWorkspaceDarkText">true</item>
<item name="workspaceStatusBarScrim">@null</item>
<item name="workspaceAccentColor">@color/workspace_accent_color_dark</item>
<item name="dropTargetHoverTextColor">@color/workspace_text_color_light</item>
<item name="dropTargetHoverTextColor">@color/drop_target_hover_text_color_dark</item>
<item name="dropTargetHoverButtonColor">@color/drop_target_hover_button_color_dark</item>
</style>
<style name="LauncherTheme.Dark" parent="@style/LauncherTheme">
@@ -105,6 +110,8 @@
<item name="popupColorPrimary">@color/popup_color_primary_dark</item>
<item name="popupColorSecondary">@color/popup_color_secondary_dark</item>
<item name="popupColorTertiary">@color/popup_color_tertiary_dark</item>
<item name="popupColorBackground">#1F2020</item>
<item name="popupTextColor">@color/popup_text_color_dark</item>
<item name="popupNotificationDotColor">@color/popup_notification_dot_dark</item>
<item name="popupShadeFirst">@color/popup_shade_first_dark</item>
<item name="popupShadeSecond">@color/popup_shade_second_dark</item>
@@ -138,7 +145,8 @@
<item name="isWorkspaceDarkText">true</item>
<item name="workspaceStatusBarScrim">@null</item>
<item name="workspaceAccentColor">@color/workspace_accent_color_dark</item>
<item name="dropTargetHoverTextColor">@color/workspace_text_color_light</item>
<item name="dropTargetHoverTextColor">@color/drop_target_hover_text_color_dark</item>
<item name="dropTargetHoverButtonColor">@color/drop_target_hover_button_color_dark</item>
</style>
<!-- A derivative project can extend these themes to customize the application theme without
+1 -1
View File
@@ -1272,7 +1272,7 @@ public class CellLayout extends ViewGroup {
* @return The X, Y cell of a vacant area that can contain this object,
* nearest the requested location.
*/
private int[] findNearestArea(int relativeXPos, int relativeYPos, int minSpanX, int minSpanY,
protected int[] findNearestArea(int relativeXPos, int relativeYPos, int minSpanX, int minSpanY,
int spanX, int spanY, boolean ignoreOccupied, int[] result, int[] resultSpan) {
// For items with a spanX / spanY > 1, the passed in point (relativeXPos, relativeYPos)
// corresponds to the center of the item, but we are searching based on the top-left cell,
@@ -24,7 +24,6 @@ import android.view.View;
import com.android.launcher3.celllayout.CellLayoutLayoutParams;
import com.android.launcher3.celllayout.MulticellReorderAlgorithm;
import com.android.launcher3.celllayout.ReorderAlgorithm;
import com.android.launcher3.util.CellAndSpan;
import com.android.launcher3.util.GridOccupancy;
@@ -46,6 +45,33 @@ public class MultipageCellLayout extends CellLayout {
this(context, attrs, 0);
}
@Override
protected int[] findNearestArea(int relativeXPos, int relativeYPos, int minSpanX, int minSpanY,
int spanX, int spanY, boolean ignoreOccupied, int[] result, int[] resultSpan) {
return createReorderAlgorithm().simulateSeam(
() -> super.findNearestArea(relativeXPos, relativeYPos, minSpanX, minSpanY, spanX,
spanY, ignoreOccupied, result, resultSpan));
}
@Override
public void getDirectionVectorForDrop(int dragViewCenterX, int dragViewCenterY, int spanX,
int spanY, View dragView, int[] resultDirection) {
createReorderAlgorithm().simulateSeam(
() -> {
super.getDirectionVectorForDrop(dragViewCenterX, dragViewCenterY, spanX, spanY,
dragView, resultDirection);
return 0;
});
}
@Override
public boolean isNearestDropLocationOccupied(int pixelX, int pixelY, int spanX, int spanY,
View dragView, int[] result) {
return createReorderAlgorithm().simulateSeam(
() -> super.isNearestDropLocationOccupied(pixelX, pixelY, spanX, spanY, dragView,
result));
}
public MultipageCellLayout(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
mLeftBackground = getContext().getDrawable(R.drawable.bg_celllayout);
@@ -71,13 +97,23 @@ public class MultipageCellLayout extends CellLayout {
cellX++;
}
int finalCellX = cellX;
return ((MulticellReorderAlgorithm) createReorderAlgorithm()).simulateSeam(
return createReorderAlgorithm().simulateSeam(
() -> super.createAreaForResize(finalCellX, cellY, spanX, spanY, dragView,
direction, commit));
}
@Override
public ReorderAlgorithm createReorderAlgorithm() {
int[] performReorder(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX, int spanY,
View dragView, int[] result, int[] resultSpan, int mode) {
if (pixelX >= getWidth() / 2) {
pixelX += getCellWidth();
}
return super.performReorder(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, dragView,
result, resultSpan, mode);
}
@Override
public MulticellReorderAlgorithm createReorderAlgorithm() {
return new MulticellReorderAlgorithm(this);
}
@@ -31,6 +31,8 @@ import android.view.Gravity;
import android.view.View;
import android.view.ViewDebug;
import androidx.annotation.Nullable;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.CellLayout;
@@ -46,7 +48,6 @@ import com.android.launcher3.keyboard.ViewGroupFocusHelper;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.pageindicators.PageIndicatorDots;
import com.android.launcher3.touch.ItemClickHandler;
import com.android.launcher3.util.LauncherBindableItemsContainer.ItemOperator;
import com.android.launcher3.util.Thunk;
import com.android.launcher3.util.ViewCache;
@@ -231,11 +232,13 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
return textView;
}
@Nullable
@Override
public CellLayout getPageAt(int index) {
return (CellLayout) getChildAt(index);
}
@Nullable
public CellLayout getCurrentCellLayout() {
return getPageAt(getNextPage());
}
@@ -382,7 +385,7 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
}
private View getViewInCurrentPage(ToIntFunction<ShortcutAndWidgetContainer> rankProvider) {
if (getChildCount() < 1) {
if (getChildCount() < 1 || getCurrentCellLayout() == null) {
return null;
}
ShortcutAndWidgetContainer container = getCurrentCellLayout().getShortcutsAndWidgets();
@@ -421,10 +424,15 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
* Sets the focus on the first visible child.
*/
public void setFocusOnFirstChild() {
View firstChild = getCurrentCellLayout().getChildAt(0, 0);
if (firstChild != null) {
firstChild.requestFocus();
CellLayout currentCellLayout = getCurrentCellLayout();
if (currentCellLayout == null) {
return;
}
View firstChild = currentCellLayout.getChildAt(0, 0);
if (firstChild == null) {
return;
}
firstChild.requestFocus();
}
@Override
@@ -144,7 +144,8 @@ public abstract class ArrowPopup<T extends Context & ActivityContext>
// Initialize arrow view
final Resources resources = getResources();
mArrowColor = getColorStateList(getContext(), R.color.popup_shade_first).getDefaultColor();
mArrowColor = getColorStateList(getContext(), R.color.popup_color_background)
.getDefaultColor();
mChildContainerMargin = resources.getDimensionPixelSize(R.dimen.popup_margin);
mArrowWidth = resources.getDimensionPixelSize(R.dimen.popup_arrow_width);
mArrowHeight = resources.getDimensionPixelSize(R.dimen.popup_arrow_height);
@@ -173,7 +174,7 @@ public abstract class ArrowPopup<T extends Context & ActivityContext>
mColorIds = new int[]{R.color.popup_shade_first, R.color.popup_shade_second,
R.color.popup_shade_third};
} else {
mColorIds = new int[]{R.color.popup_shade_first};
mColorIds = new int[]{R.color.popup_color_background};
}
}