Merge "Don't set enabled on TaskMenu view if shortcut not available" into sc-dev
diff --git a/go/quickstep/res/values-kk/strings.xml b/go/quickstep/res/values-kk/strings.xml
index ed59c9c..c897dd8 100644
--- a/go/quickstep/res/values-kk/strings.xml
+++ b/go/quickstep/res/values-kk/strings.xml
@@ -4,5 +4,5 @@
<string name="app_share_drop_target_label" msgid="5804774105974539508">"Қолданбаны бөлісу"</string>
<string name="action_listen" msgid="2370304050784689486">"Тыңдау"</string>
<string name="action_translate" msgid="8028378961867277746">"Аудару"</string>
- <string name="action_search" msgid="6269564710943755464">"Lens"</string>
+ <string name="action_search" msgid="6269564710943755464">"Объектив"</string>
</resources>
diff --git a/go/quickstep/res/values-sq/strings.xml b/go/quickstep/res/values-sq/strings.xml
new file mode 100644
index 0000000..56b6ec6
--- /dev/null
+++ b/go/quickstep/res/values-sq/strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_share_drop_target_label" msgid="5804774105974539508">"Ndaj aplikacionin"</string>
+ <string name="action_listen" msgid="2370304050784689486">"Dëgjo"</string>
+ <string name="action_translate" msgid="8028378961867277746">"Përkthe"</string>
+ <string name="action_search" msgid="6269564710943755464">"Lentja"</string>
+</resources>
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_back_left.xml b/quickstep/res/drawable/gesture_tutorial_loop_back_left.xml
index 8bf305c..d2909ff 100644
--- a/quickstep/res/drawable/gesture_tutorial_loop_back_left.xml
+++ b/quickstep/res/drawable/gesture_tutorial_loop_back_left.xml
@@ -85,7 +85,7 @@
<path
android:name="_R_G_L_0_G_D_0_P_0"
android:fillAlpha="0.25"
- android:fillColor="#84ba69"
+ android:fillColor="@color/gesture_tutorial_primary_color"
android:fillType="nonZero"
android:pathData=" M12.5 -446 C12.5,-446 12.5,446 12.5,446 C12.5,446 -12.5,446 -12.5,446 C-12.5,446 -12.5,-446 -12.5,-446 C-12.5,-446 12.5,-446 12.5,-446c " />
</group>
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_back_right.xml b/quickstep/res/drawable/gesture_tutorial_loop_back_right.xml
index 812c54c..c20b252 100644
--- a/quickstep/res/drawable/gesture_tutorial_loop_back_right.xml
+++ b/quickstep/res/drawable/gesture_tutorial_loop_back_right.xml
@@ -81,7 +81,7 @@
<path
android:name="_R_G_L_1_G_D_0_P_0"
android:fillAlpha="0.25"
- android:fillColor="#84ba69"
+ android:fillColor="@color/gesture_tutorial_primary_color"
android:fillType="nonZero"
android:pathData=" M12.5 -446 C12.5,-446 12.5,446 12.5,446 C12.5,446 -12.5,446 -12.5,446 C-12.5,446 -12.5,-446 -12.5,-446 C-12.5,-446 12.5,-446 12.5,-446c " />
</group>
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_bottom_edge.xml b/quickstep/res/drawable/gesture_tutorial_loop_bottom_edge.xml
deleted file mode 100644
index 3efb52d..0000000
--- a/quickstep/res/drawable/gesture_tutorial_loop_bottom_edge.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <target android:name="time_group">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="2000"
- android:propertyName="translateX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <aapt:attr name="android:drawable">
- <vector
- android:width="412dp"
- android:height="892dp"
- android:viewportHeight="892"
- android:viewportWidth="412">
- <group android:name="_R_G">
- <group
- android:name="_R_G_L_0_G"
- android:translateX="206"
- android:translateY="874.5">
- <path
- android:name="_R_G_L_0_G_D_0_P_0"
- android:fillAlpha="1"
- android:fillColor="#84ba69"
- android:fillType="nonZero"
- android:pathData=" M206 -17.5 C206,-17.5 206,17.5 206,17.5 C206,17.5 -206,17.5 -206,17.5 C-206,17.5 -206,-17.5 -206,-17.5 C-206,-17.5 206,-17.5 206,-17.5c " />
- </group>
- </group>
- <group android:name="time_group" />
- </vector>
- </aapt:attr>
-</animated-vector>
\ No newline at end of file
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_gesture_back_right.xml b/quickstep/res/drawable/gesture_tutorial_loop_gesture_back_right.xml
deleted file mode 100644
index c41d077..0000000
--- a/quickstep/res/drawable/gesture_tutorial_loop_gesture_back_right.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <target android:name="_R_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="783"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="time_group">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="2000"
- android:propertyName="translateX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <aapt:attr name="android:drawable">
- <vector
- android:width="412dp"
- android:height="892dp"
- android:viewportHeight="892"
- android:viewportWidth="412">
- <group android:name="_R_G">
- <group
- android:name="_R_G_L_0_G"
- android:translateX="206"
- android:translateY="446" />
- </group>
- <group android:name="time_group" />
- </vector>
- </aapt:attr>
-</animated-vector>
\ No newline at end of file
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_gesture_home.xml b/quickstep/res/drawable/gesture_tutorial_loop_gesture_home.xml
deleted file mode 100644
index c5dd41b..0000000
--- a/quickstep/res/drawable/gesture_tutorial_loop_gesture_home.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <target android:name="_R_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="850"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="time_group">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="2000"
- android:propertyName="translateX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <aapt:attr name="android:drawable">
- <vector
- android:width="412dp"
- android:height="892dp"
- android:viewportHeight="892"
- android:viewportWidth="412">
- <group android:name="_R_G">
- <group
- android:name="_R_G_L_0_G"
- android:translateX="206"
- android:translateY="446" />
- </group>
- <group android:name="time_group" />
- </vector>
- </aapt:attr>
-</animated-vector>
\ No newline at end of file
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_gesture_left_edge.xml b/quickstep/res/drawable/gesture_tutorial_loop_gesture_left_edge.xml
deleted file mode 100644
index c41d077..0000000
--- a/quickstep/res/drawable/gesture_tutorial_loop_gesture_left_edge.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <target android:name="_R_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="783"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="time_group">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="2000"
- android:propertyName="translateX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <aapt:attr name="android:drawable">
- <vector
- android:width="412dp"
- android:height="892dp"
- android:viewportHeight="892"
- android:viewportWidth="412">
- <group android:name="_R_G">
- <group
- android:name="_R_G_L_0_G"
- android:translateX="206"
- android:translateY="446" />
- </group>
- <group android:name="time_group" />
- </vector>
- </aapt:attr>
-</animated-vector>
\ No newline at end of file
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_gesture_overview.xml b/quickstep/res/drawable/gesture_tutorial_loop_gesture_overview.xml
deleted file mode 100644
index 5d87805..0000000
--- a/quickstep/res/drawable/gesture_tutorial_loop_gesture_overview.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <target android:name="_R_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="1500"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="time_group">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="2000"
- android:propertyName="translateX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <aapt:attr name="android:drawable">
- <vector
- android:width="412dp"
- android:height="892dp"
- android:viewportHeight="892"
- android:viewportWidth="412">
- <group android:name="_R_G">
- <group
- android:name="_R_G_L_0_G"
- android:translateX="206"
- android:translateY="446" />
- </group>
- <group android:name="time_group" />
- </vector>
- </aapt:attr>
-</animated-vector>
\ No newline at end of file
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_home.xml b/quickstep/res/drawable/gesture_tutorial_loop_home.xml
index ed072a9..931f8c0 100644
--- a/quickstep/res/drawable/gesture_tutorial_loop_home.xml
+++ b/quickstep/res/drawable/gesture_tutorial_loop_home.xml
@@ -1 +1,96 @@
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="892dp" android:width="412dp" android:viewportHeight="892" android:viewportWidth="412"><group android:name="_R_G"><group android:name="_R_G_L_1_G" android:translateX="206" android:translateY="879.5"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#84ba69" android:fillAlpha="0.25" android:fillType="nonZero" android:pathData=" M206 -12.5 C206,-12.5 206,12.5 206,12.5 C206,12.5 -206,12.5 -206,12.5 C-206,12.5 -206,-12.5 -206,-12.5 C-206,-12.5 206,-12.5 206,-12.5c "/></group><group android:name="_R_G_L_0_G" android:translateX="206" android:translateY="446"/></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_1_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="fillAlpha" android:duration="1000" android:startOffset="0" android:valueFrom="0.25" android:valueTo="0.75" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="1000" android:startOffset="1000" android:valueFrom="0.75" android:valueTo="0.25" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleY" android:duration="0" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target><target android:name="_R_G_L_0_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleY" android:duration="0" android:startOffset="850" android:valueFrom="1" android:valueTo="0" android:valueType="floatType"/></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="2000" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector>
\ No newline at end of file
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt">
+ <target android:name="_R_G_L_1_G_D_0_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="1000"
+ android:propertyName="fillAlpha"
+ android:startOffset="0"
+ android:valueFrom="0.25"
+ android:valueTo="0.75"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="1000"
+ android:propertyName="fillAlpha"
+ android:startOffset="1000"
+ android:valueFrom="0.75"
+ android:valueTo="0.25"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="0"
+ android:propertyName="scaleY"
+ android:startOffset="0"
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="0"
+ android:propertyName="scaleY"
+ android:startOffset="850"
+ android:valueFrom="1"
+ android:valueTo="0"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="time_group">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="2000"
+ android:propertyName="translateX"
+ android:startOffset="0"
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+ <aapt:attr name="android:drawable">
+ <vector
+ android:width="412dp"
+ android:height="892dp"
+ android:viewportHeight="892"
+ android:viewportWidth="412">
+ <group android:name="_R_G">
+ <group
+ android:name="_R_G_L_1_G"
+ android:translateX="206"
+ android:translateY="879.5">
+ <path
+ android:name="_R_G_L_1_G_D_0_P_0"
+ android:fillAlpha="0.25"
+ android:fillColor="@color/gesture_tutorial_primary_color"
+ android:fillType="nonZero"
+ android:pathData=" M206 -12.5 C206,-12.5 206,12.5 206,12.5 C206,12.5 -206,12.5 -206,12.5 C-206,12.5 -206,-12.5 -206,-12.5 C-206,-12.5 206,-12.5 206,-12.5c " />
+ </group>
+ <group
+ android:name="_R_G_L_0_G"
+ android:translateX="206"
+ android:translateY="446" />
+ </group>
+ <group android:name="time_group" />
+ </vector>
+ </aapt:attr>
+</animated-vector>
\ No newline at end of file
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_left_edge.xml b/quickstep/res/drawable/gesture_tutorial_loop_left_edge.xml
deleted file mode 100644
index 07caaea..0000000
--- a/quickstep/res/drawable/gesture_tutorial_loop_left_edge.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <target android:name="time_group">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="2000"
- android:propertyName="translateX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <aapt:attr name="android:drawable">
- <vector
- android:width="412dp"
- android:height="892dp"
- android:viewportHeight="892"
- android:viewportWidth="412">
- <group android:name="_R_G">
- <group
- android:name="_R_G_L_0_G"
- android:translateX="17.5"
- android:translateY="446">
- <path
- android:name="_R_G_L_0_G_D_0_P_0"
- android:fillAlpha="1"
- android:fillColor="#84ba69"
- android:fillType="nonZero"
- android:pathData=" M17.5 -446 C17.5,-446 17.5,446 17.5,446 C17.5,446 -17.5,446 -17.5,446 C-17.5,446 -17.5,-446 -17.5,-446 C-17.5,-446 17.5,-446 17.5,-446c " />
- </group>
- </group>
- <group android:name="time_group" />
- </vector>
- </aapt:attr>
-</animated-vector>
\ No newline at end of file
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_overview.xml b/quickstep/res/drawable/gesture_tutorial_loop_overview.xml
index acf0c4c..a4c532b 100644
--- a/quickstep/res/drawable/gesture_tutorial_loop_overview.xml
+++ b/quickstep/res/drawable/gesture_tutorial_loop_overview.xml
@@ -1 +1,96 @@
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="892dp" android:width="412dp" android:viewportHeight="892" android:viewportWidth="412"><group android:name="_R_G"><group android:name="_R_G_L_1_G" android:translateX="206" android:translateY="879.5"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#84ba69" android:fillAlpha="0.25" android:fillType="nonZero" android:pathData=" M206 -12.5 C206,-12.5 206,12.5 206,12.5 C206,12.5 -206,12.5 -206,12.5 C-206,12.5 -206,-12.5 -206,-12.5 C-206,-12.5 206,-12.5 206,-12.5c "/></group><group android:name="_R_G_L_0_G" android:translateX="206" android:translateY="446"/></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_1_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="fillAlpha" android:duration="1000" android:startOffset="0" android:valueFrom="0.25" android:valueTo="0.75" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="1000" android:startOffset="1000" android:valueFrom="0.75" android:valueTo="0.25" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleY" android:duration="0" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target><target android:name="_R_G_L_0_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleY" android:duration="0" android:startOffset="1500" android:valueFrom="1" android:valueTo="0" android:valueType="floatType"/></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="2000" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector>
\ No newline at end of file
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt">
+ <target android:name="_R_G_L_1_G_D_0_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="1000"
+ android:propertyName="fillAlpha"
+ android:startOffset="0"
+ android:valueFrom="0.25"
+ android:valueTo="0.75"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="1000"
+ android:propertyName="fillAlpha"
+ android:startOffset="1000"
+ android:valueFrom="0.75"
+ android:valueTo="0.25"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="0"
+ android:propertyName="scaleY"
+ android:startOffset="0"
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="0"
+ android:propertyName="scaleY"
+ android:startOffset="1500"
+ android:valueFrom="1"
+ android:valueTo="0"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="time_group">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="2000"
+ android:propertyName="translateX"
+ android:startOffset="0"
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+ <aapt:attr name="android:drawable">
+ <vector
+ android:width="412dp"
+ android:height="892dp"
+ android:viewportHeight="892"
+ android:viewportWidth="412">
+ <group android:name="_R_G">
+ <group
+ android:name="_R_G_L_1_G"
+ android:translateX="206"
+ android:translateY="879.5">
+ <path
+ android:name="_R_G_L_1_G_D_0_P_0"
+ android:fillAlpha="0.25"
+ android:fillColor="@color/gesture_tutorial_primary_color"
+ android:fillType="nonZero"
+ android:pathData=" M206 -12.5 C206,-12.5 206,12.5 206,12.5 C206,12.5 -206,12.5 -206,12.5 C-206,12.5 -206,-12.5 -206,-12.5 C-206,-12.5 206,-12.5 206,-12.5c " />
+ </group>
+ <group
+ android:name="_R_G_L_0_G"
+ android:translateX="206"
+ android:translateY="446" />
+ </group>
+ <group android:name="time_group" />
+ </vector>
+ </aapt:attr>
+</animated-vector>
\ No newline at end of file
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_right_edge.xml b/quickstep/res/drawable/gesture_tutorial_loop_right_edge.xml
deleted file mode 100644
index d86b653..0000000
--- a/quickstep/res/drawable/gesture_tutorial_loop_right_edge.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <target android:name="time_group">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="2000"
- android:propertyName="translateX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <aapt:attr name="android:drawable">
- <vector
- android:width="412dp"
- android:height="892dp"
- android:viewportHeight="892"
- android:viewportWidth="412">
- <group android:name="_R_G">
- <group
- android:name="_R_G_L_0_G"
- android:translateX="394.5"
- android:translateY="446">
- <path
- android:name="_R_G_L_0_G_D_0_P_0"
- android:fillAlpha="1"
- android:fillColor="#84ba69"
- android:fillType="nonZero"
- android:pathData=" M17.5 -446 C17.5,-446 17.5,446 17.5,446 C17.5,446 -17.5,446 -17.5,446 C-17.5,446 -17.5,-446 -17.5,-446 C-17.5,-446 17.5,-446 17.5,-446c " />
- </group>
- </group>
- <group android:name="time_group" />
- </vector>
- </aapt:attr>
-</animated-vector>
\ No newline at end of file
diff --git a/quickstep/res/drawable/gesture_tutorial_motion_back_left.xml b/quickstep/res/drawable/gesture_tutorial_motion_back_left.xml
index e944c0e..f5ad569 100644
--- a/quickstep/res/drawable/gesture_tutorial_motion_back_left.xml
+++ b/quickstep/res/drawable/gesture_tutorial_motion_back_left.xml
@@ -1401,7 +1401,7 @@
<path
android:name="_R_G_L_0_G_D_0_P_0"
android:fillAlpha="0"
- android:fillColor="#84ba69"
+ android:fillColor="@color/gesture_tutorial_primary_color"
android:fillType="nonZero"
android:pathData=" M-206.5 13.5 C-186.34,13.5 -170,29.84 -170,50 C-170,70.16 -186.34,86.5 -206.5,86.5 C-226.66,86.5 -243,70.16 -243,50 C-243,29.84 -226.66,13.5 -206.5,13.5c " />
</group>
diff --git a/quickstep/res/drawable/gesture_tutorial_motion_back_right.xml b/quickstep/res/drawable/gesture_tutorial_motion_back_right.xml
index f8d649a..b898dc1 100644
--- a/quickstep/res/drawable/gesture_tutorial_motion_back_right.xml
+++ b/quickstep/res/drawable/gesture_tutorial_motion_back_right.xml
@@ -1402,7 +1402,7 @@
<path
android:name="_R_G_L_0_G_D_0_P_0"
android:fillAlpha="0"
- android:fillColor="#84ba69"
+ android:fillColor="@color/gesture_tutorial_primary_color"
android:fillType="nonZero"
android:pathData=" M205 13.5 C225.16,13.5 241.5,29.84 241.5,50 C241.5,70.16 225.16,86.5 205,86.5 C184.84,86.5 168.5,70.16 168.5,50 C168.5,29.84 184.84,13.5 205,13.5c " />
</group>
diff --git a/quickstep/res/drawable/gesture_tutorial_motion_home.xml b/quickstep/res/drawable/gesture_tutorial_motion_home.xml
index 9dbaee6..87b8857 100644
--- a/quickstep/res/drawable/gesture_tutorial_motion_home.xml
+++ b/quickstep/res/drawable/gesture_tutorial_motion_home.xml
@@ -1243,7 +1243,7 @@
<path
android:name="_R_G_L_0_G_D_0_P_0"
android:fillAlpha="0"
- android:fillColor="#84ba69"
+ android:fillColor="@color/gesture_tutorial_primary_color"
android:fillType="nonZero"
android:pathData=" M0 411 C19.33,411 35,426.67 35,446 C35,465.33 19.33,481 0,481 C-19.33,481 -35,465.33 -35,446 C-35,426.67 -19.33,411 0,411c " />
</group>
diff --git a/quickstep/res/drawable/gesture_tutorial_motion_overview.xml b/quickstep/res/drawable/gesture_tutorial_motion_overview.xml
index 4751fa9..058bee2 100644
--- a/quickstep/res/drawable/gesture_tutorial_motion_overview.xml
+++ b/quickstep/res/drawable/gesture_tutorial_motion_overview.xml
@@ -1612,7 +1612,7 @@
<path
android:name="_R_G_L_0_G_D_0_P_0"
android:fillAlpha="0"
- android:fillColor="#84ba69"
+ android:fillColor="@color/gesture_tutorial_primary_color"
android:fillType="nonZero"
android:pathData=" M0 406 C21.54,406 39,423.46 39,445 C39,466.54 21.54,484 0,484 C-21.54,484 -39,466.54 -39,445 C-39,423.46 -21.54,406 0,406c " />
</group>
diff --git a/quickstep/res/drawable/tutorial_step_indicator_pill.xml b/quickstep/res/drawable/tutorial_step_indicator_pill.xml
new file mode 100644
index 0000000..94a8748
--- /dev/null
+++ b/quickstep/res/drawable/tutorial_step_indicator_pill.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <corners android:radius="10dp"/>
+ <size android:width="16dp" android:height="6dp"/>
+</shape>
\ 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 5f82730..a884e74 100644
--- a/quickstep/res/layout/gesture_tutorial_fragment.xml
+++ b/quickstep/res/layout/gesture_tutorial_fragment.xml
@@ -88,27 +88,15 @@
android:padding="24dp"
android:background="@drawable/bg_sandbox_feedback">
- <ImageButton
- android:id="@+id/gesture_tutorial_fragment_close_button"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:src="@drawable/close_icon"
- android:background="@drawable/bg_sandbox_close_button"
- android:contentDescription="@string/gesture_tutorial_close_button_content_description"
-
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"/>
-
<TextView
android:id="@+id/gesture_tutorial_fragment_feedback_title"
style="@style/TextAppearance.GestureTutorial.Feedback.Title"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_fragment_close_button"/>
+ app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/gesture_tutorial_fragment_feedback_subtitle"
@@ -121,14 +109,13 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_fragment_feedback_title"/>
- <TextView
+ <com.android.quickstep.interaction.TutorialStepIndicator
android:id="@+id/gesture_tutorial_fragment_feedback_tutorial_step"
- style="@style/TextAppearance.GestureTutorial.Feedback.Subtext"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintEnd_toStartOf="@id/gesture_tutorial_fragment_action_button"
+ app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/gesture_tutorial_fragment_action_button"
app:layout_constraintBottom_toBottomOf="@id/gesture_tutorial_fragment_action_button"/>
@@ -144,6 +131,7 @@
android:paddingBottom="8dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
+ android:text="@string/gesture_tutorial_action_button_label_next"
android:background="@drawable/gesture_tutorial_action_button_background"
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:stateListAnimator="@null"
@@ -152,6 +140,19 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_fragment_feedback_subtitle"/>
+ <Button
+ style="@style/TextAppearance.GestureTutorial.Feedback.Subtext"
+ android:id="@+id/gesture_tutorial_fragment_close_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/gesture_tutorial_action_button_label_skip"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
+
+ app:layout_constraintTop_toTopOf="@id/gesture_tutorial_fragment_action_button"
+ app:layout_constraintBottom_toBottomOf="@id/gesture_tutorial_fragment_action_button"
+ app:layout_constraintStart_toStartOf="@id/gesture_tutorial_fragment_action_button"
+ app:layout_constraintEnd_toEndOf="@id/gesture_tutorial_fragment_action_button"/>
+
</androidx.constraintlayout.widget.ConstraintLayout>
</com.android.quickstep.interaction.RootSandboxLayout>
\ No newline at end of file
diff --git a/quickstep/res/values/strings.xml b/quickstep/res/values/strings.xml
index 2c8687c..3f75d32 100644
--- a/quickstep/res/values/strings.xml
+++ b/quickstep/res/values/strings.xml
@@ -97,7 +97,7 @@
<string name="back_gesture_feedback_cancelled_left_edge">Make sure you swipe from the left edge to the middle of the screen and let go.</string>
<!-- Feedback title shown after completing the left back gesture before continuing on to the right edge. [CHAR LIMIT=60] -->
<string name="back_gesture_feedback_title_complete_left_edge">Nice! Now swipe from the right to go back</string>
- <!-- Feedback subtitle shown after completing the left back gesture before continuing on to the right edge. [CHAR LIMIT=60] -->
+ <!-- Feedback subtitle shown after completing the left back gesture before continuing on to the right edge. [CHAR LIMIT=200] -->
<string name="back_gesture_feedback_subtitle_complete_left_edge">You can also go back to the last screen by swiping from the right edge to the middle of the screen.</string>
<!-- Feedback shown during interactive parts of Back gesture tutorial for right edge when the gesture is too far from the edge. [CHAR LIMIT=100] -->
<string name="back_gesture_feedback_swipe_too_far_from_right_edge">Make sure you swipe from the far-right edge.</string>
@@ -176,8 +176,6 @@
<string name="gesture_tutorial_confirm_title">All set</string>
<!-- Button text shown on a button on the feedback popup to proceed to the next tutorial step. [CHAR LIMIT=14] -->
<string name="gesture_tutorial_action_button_label_next">Next</string>
- <!-- Button text shown on a button on the feedback popup to complete the tutorial. [CHAR LIMIT=14] -->
- <string name="gesture_tutorial_action_button_label_done">Done</string>
<!-- Button text shown on a button to go to Settings. [CHAR LIMIT=14] -->
<string name="gesture_tutorial_action_button_label_settings">Settings</string>
<!-- Feedback title to try again. [CHAR LIMIT=30] -->
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
index 0a8ecb8..cfca124 100644
--- a/quickstep/res/values/styles.xml
+++ b/quickstep/res/values/styles.xml
@@ -77,7 +77,13 @@
<style name="TextAppearance.GestureTutorial.Feedback.Subtext"
parent="TextAppearance.GestureTutorial.Feedback.Subtitle">
<item name="android:textSize">16sp</item>
- <item name="android:textColor">#909090</item>
+ <item name="android:textColor">@color/gesture_tutorial_primary_color</item>
+ <item name="android:gravity">center</item>
+ </style>
+
+ <style name="TextAppearance.GestureTutorial.Feedback.Subtext.Dark"
+ parent="TextAppearance.GestureTutorial.Feedback.Subtext">
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="TextAppearance.GestureTutorial.ButtonLabel"
diff --git a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
index bc2c125..de62e93 100644
--- a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
@@ -49,7 +49,7 @@
import com.android.launcher3.statehandlers.BackButtonAlphaHandler;
import com.android.launcher3.statehandlers.DepthController;
import com.android.launcher3.statemanager.StateManager.StateHandler;
-import com.android.launcher3.taskbar.TaskbarController;
+import com.android.launcher3.taskbar.LauncherTaskbarUIController;
import com.android.launcher3.taskbar.TaskbarManager;
import com.android.launcher3.taskbar.TaskbarStateHandler;
import com.android.launcher3.uioverrides.RecentsViewStateController;
@@ -96,7 +96,7 @@
private OverviewActionsView mActionsView;
private @Nullable TaskbarManager mTaskbarManager;
- private @Nullable TaskbarController mTaskbarController;
+ private @Nullable LauncherTaskbarUIController mTaskbarUIController;
private final ServiceConnection mTisBinderConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
@@ -261,8 +261,8 @@
}
- public void setTaskbarController(TaskbarController taskbarController) {
- mTaskbarController = taskbarController;
+ public void setTaskbarUIController(LauncherTaskbarUIController taskbarUIController) {
+ mTaskbarUIController = taskbarUIController;
}
public <T extends OverviewActionsView> T getActionsView() {
@@ -292,8 +292,8 @@
return mDepthController;
}
- public @Nullable TaskbarController getTaskbarController() {
- return mTaskbarController;
+ public @Nullable LauncherTaskbarUIController getTaskbarUIController() {
+ return mTaskbarUIController;
}
public TaskbarStateHandler getTaskbarStateHandler() {
@@ -349,8 +349,8 @@
@Override
public float getNormalTaskbarScale() {
- if (mTaskbarController != null) {
- return mTaskbarController.getTaskbarScaleOnHome();
+ if (mTaskbarUIController != null) {
+ return mTaskbarUIController.getTaskbarScaleOnHome();
}
return super.getNormalTaskbarScale();
}
@@ -372,8 +372,8 @@
}
if ((changeBits & ACTIVITY_STATE_RESUMED) != 0) {
- if (mTaskbarController != null) {
- mTaskbarController.onLauncherResumedOrPaused(hasBeenResumed());
+ if (mTaskbarUIController != null) {
+ mTaskbarUIController.onLauncherResumedOrPaused(hasBeenResumed());
}
}
diff --git a/quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java b/quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java
index 5dcf84c..85e5ab0 100644
--- a/quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java
+++ b/quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java
@@ -263,8 +263,8 @@
removeOutlineDrawings();
}
- if (mLauncher.getTaskbarController() != null) {
- mLauncher.getTaskbarController().onHotseatUpdated();
+ if (mLauncher.getTaskbarUIController() != null) {
+ mLauncher.getTaskbarUIController().onHotseatUpdated();
}
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
similarity index 96%
rename from quickstep/src/com/android/launcher3/taskbar/TaskbarController.java
rename to quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
index cdae5be..6726419 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
@@ -38,7 +38,7 @@
* TODO: Rename to have Launcher prefix
*/
-public class TaskbarController extends TaskbarUIController {
+public class LauncherTaskbarUIController extends TaskbarUIController {
private final BaseQuickstepLauncher mLauncher;
private final TaskbarStateHandler mTaskbarStateHandler;
@@ -52,7 +52,8 @@
private @Nullable Animator mAnimator;
private boolean mIsAnimatingToLauncher;
- public TaskbarController(BaseQuickstepLauncher launcher, TaskbarActivityContext context) {
+ public LauncherTaskbarUIController(
+ BaseQuickstepLauncher launcher, TaskbarActivityContext context) {
mContext = context;
mTaskbarContainerView = context.getDragLayer();
mTaskbarView = mTaskbarContainerView.findViewById(R.id.taskbar_view);
@@ -72,7 +73,7 @@
mHotseatController.init();
setTaskbarViewVisible(!mLauncher.hasBeenResumed());
alignRealHotseatWithTaskbar();
- mLauncher.setTaskbarController(this);
+ mLauncher.setTaskbarUIController(this);
}
@Override
@@ -86,7 +87,7 @@
mHotseatController.cleanup();
setTaskbarViewVisible(true);
mLauncher.getHotseat().setIconsAlpha(1f);
- mLauncher.setTaskbarController(null);
+ mLauncher.setTaskbarUIController(null);
}
@Override
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarAnimationController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarAnimationController.java
index 815efb9..e20ddf8 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarAnimationController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarAnimationController.java
@@ -21,7 +21,7 @@
import com.android.launcher3.BaseQuickstepLauncher;
import com.android.launcher3.Utilities;
-import com.android.launcher3.taskbar.TaskbarController.TaskbarAnimationControllerCallbacks;
+import com.android.launcher3.taskbar.LauncherTaskbarUIController.TaskbarAnimationControllerCallbacks;
import com.android.quickstep.AnimatedFloat;
import com.android.quickstep.SystemUiProxy;
import com.android.systemui.shared.system.QuickStepContract;
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
index b9eec93..65c87bd 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
@@ -97,7 +97,7 @@
if (mTaskbarActivityContext != null) {
mTaskbarActivityContext.setUIController(mLauncher == null
? TaskbarUIController.DEFAULT
- : new TaskbarController(launcher, mTaskbarActivityContext));
+ : new LauncherTaskbarUIController(launcher, mTaskbarActivityContext));
}
}
@@ -115,7 +115,7 @@
mTaskbarActivityContext.init();
if (mLauncher != null) {
mTaskbarActivityContext.setUIController(
- new TaskbarController(mLauncher, mTaskbarActivityContext));
+ new LauncherTaskbarUIController(mLauncher, mTaskbarActivityContext));
}
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
index 45bb521..f0b02b3 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
@@ -165,7 +165,7 @@
@Override
public boolean startActivitySafely(View v, Intent intent, ItemInfo item) {
// Only pause is taskbar controller is not present
- mHotseatPredictionController.setPauseUIUpdate(getTaskbarController() == null);
+ mHotseatPredictionController.setPauseUIUpdate(getTaskbarUIController() == null);
return super.startActivitySafely(v, intent, item);
}
@@ -233,9 +233,9 @@
@Override
public void bindWorkspaceItemsChanged(List<WorkspaceItemInfo> updated) {
super.bindWorkspaceItemsChanged(updated);
- if (getTaskbarController() != null && updated.stream()
+ if (getTaskbarUIController() != null && updated.stream()
.filter(w -> w.container == CONTAINER_HOTSEAT).findFirst().isPresent()) {
- getTaskbarController().onHotseatUpdated();
+ getTaskbarUIController().onHotseatUpdated();
}
}
diff --git a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
index ff69180..9014774 100644
--- a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
@@ -41,7 +41,7 @@
import com.android.launcher3.statehandlers.DepthController;
import com.android.launcher3.statehandlers.DepthController.ClampedDepthProperty;
import com.android.launcher3.statemanager.StateManager;
-import com.android.launcher3.taskbar.TaskbarController;
+import com.android.launcher3.taskbar.LauncherTaskbarUIController;
import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.quickstep.GestureState.GestureEndTarget;
import com.android.quickstep.SysUINavigationMode.Mode;
@@ -163,12 +163,12 @@
}
@Nullable
- private TaskbarController getTaskbarController() {
+ private LauncherTaskbarUIController getTaskbarController() {
BaseQuickstepLauncher launcher = getCreatedActivity();
if (launcher == null) {
return null;
}
- return launcher.getTaskbarController();
+ return launcher.getTaskbarUIController();
}
@Nullable
@@ -276,13 +276,13 @@
@Override
public @Nullable Animator getParallelAnimationToLauncher(GestureEndTarget endTarget,
long duration) {
- TaskbarController taskbarController = getTaskbarController();
+ LauncherTaskbarUIController uiController = getTaskbarController();
Animator superAnimator = super.getParallelAnimationToLauncher(endTarget, duration);
- if (taskbarController == null) {
+ if (uiController == null) {
return superAnimator;
}
LauncherState toState = stateFromGestureEndTarget(endTarget);
- Animator taskbarAnimator = taskbarController.createAnimToLauncher(toState, duration);
+ Animator taskbarAnimator = uiController.createAnimToLauncher(toState, duration);
if (superAnimator == null) {
return taskbarAnimator;
} else {
@@ -300,20 +300,20 @@
@Override
public boolean deferStartingActivity(RecentsAnimationDeviceState deviceState, MotionEvent ev) {
- TaskbarController taskbarController = getTaskbarController();
- if (taskbarController == null) {
+ LauncherTaskbarUIController uiController = getTaskbarController();
+ if (uiController == null) {
return super.deferStartingActivity(deviceState, ev);
}
- return taskbarController.isEventOverAnyTaskbarItem(ev);
+ return uiController.isEventOverAnyTaskbarItem(ev);
}
@Override
public boolean shouldCancelCurrentGesture() {
- TaskbarController taskbarController = getTaskbarController();
- if (taskbarController == null) {
+ LauncherTaskbarUIController uiController = getTaskbarController();
+ if (uiController == null) {
return super.shouldCancelCurrentGesture();
}
- return taskbarController.isDraggingItem();
+ return uiController.isDraggingItem();
}
@Override
diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationController.java b/quickstep/src/com/android/quickstep/RecentsAnimationController.java
index f2bd916..462f714 100644
--- a/quickstep/src/com/android/quickstep/RecentsAnimationController.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationController.java
@@ -16,7 +16,6 @@
package com.android.quickstep;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
-import static com.android.launcher3.util.Executors.THREAD_POOL_EXECUTOR;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import android.view.SurfaceControl;
@@ -102,7 +101,7 @@
*/
@UiThread
public void removeTaskTarget(@NonNull RemoteAnimationTargetCompat target) {
- THREAD_POOL_EXECUTOR.execute(() -> mController.removeTask(target.taskId));
+ UI_HELPER_EXECUTOR.execute(() -> mController.removeTask(target.taskId));
}
@UiThread
diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
index f9d5c94..a03e37e 100644
--- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
@@ -15,6 +15,8 @@
*/
package com.android.quickstep.interaction;
+import static android.view.View.GONE;
+
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.drawable.Animatable2;
@@ -26,7 +28,6 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
-import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
@@ -38,6 +39,7 @@
import androidx.appcompat.content.res.AppCompatResources;
import com.android.launcher3.R;
+import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatorListeners;
import com.android.launcher3.views.ClipIconView;
import com.android.quickstep.interaction.EdgeBackGestureHandler.BackGestureAttemptCallback;
@@ -51,7 +53,7 @@
private static final String PIXEL_TIPS_APP_PACKAGE_NAME = "com.google.android.apps.tips";
private static final CharSequence DEFAULT_PIXEL_TIPS_APP_NAME = "Pixel Tips";
- private static final int FEEDBACK_VISIBLE_MS = 2500;
+ private static final int FEEDBACK_VISIBLE_MS = 5000;
private static final int FEEDBACK_ANIMATION_MS = 250;
private static final int RIPPLE_VISIBLE_MS = 300;
@@ -59,7 +61,7 @@
TutorialType mTutorialType;
final Context mContext;
- final ImageButton mCloseButton;
+ final TextView mCloseButton;
final ViewGroup mFeedbackView;
final ImageView mFeedbackVideoView;
final ImageView mGestureVideoView;
@@ -70,7 +72,7 @@
final View mRippleView;
final RippleDrawable mRippleDrawable;
final Button mActionButton;
- final TextView mTutorialStepView;
+ final TutorialStepIndicator mTutorialStepView;
private final Runnable mHideFeedbackRunnable;
Runnable mHideFeedbackEndAction;
private final AlertDialog mSkipTutorialDialog;
@@ -226,7 +228,7 @@
public void onAnimationStart(Drawable drawable) {
super.onAnimationStart(drawable);
- mGestureVideoView.setVisibility(View.GONE);
+ mGestureVideoView.setVisibility(GONE);
if (gestureAnimation.isRunning()) {
gestureAnimation.stop();
}
@@ -238,6 +240,8 @@
.setDuration(FEEDBACK_ANIMATION_MS)
.translationY(0)
.start();
+ mFeedbackView.removeCallbacks(mHideFeedbackRunnable);
+ mFeedbackView.postDelayed(mHideFeedbackRunnable, FEEDBACK_VISIBLE_MS);
}
@Override
@@ -247,9 +251,6 @@
mGestureVideoView.setVisibility(View.VISIBLE);
gestureAnimation.start();
- mFeedbackView.removeCallbacks(mHideFeedbackRunnable);
- mFeedbackView.post(mHideFeedbackRunnable);
-
tutorialAnimation.unregisterAnimationCallback(this);
}
});
@@ -322,32 +323,25 @@
}
void hideActionButton() {
+ mCloseButton.setVisibility(View.VISIBLE);
+ mCloseButton.setTextAppearance(Utilities.isDarkTheme(mContext)
+ ? R.style.TextAppearance_GestureTutorial_Feedback_Subtext
+ : R.style.TextAppearance_GestureTutorial_Feedback_Subtext_Dark);
+
// Invisible to maintain the layout.
mActionButton.setVisibility(View.INVISIBLE);
mActionButton.setOnClickListener(null);
}
void showActionButton() {
- int stringResId = -1;
-
- if (mContext instanceof GestureSandboxActivity) {
- GestureSandboxActivity sandboxActivity = (GestureSandboxActivity) mContext;
-
- stringResId = sandboxActivity.isTutorialComplete()
- ? R.string.gesture_tutorial_action_button_label_done
- : R.string.gesture_tutorial_action_button_label_next;
- }
-
- mActionButton.setText(stringResId == -1 ? null : mContext.getString(stringResId));
+ mCloseButton.setVisibility(GONE);
mActionButton.setVisibility(View.VISIBLE);
mActionButton.setOnClickListener(this::onActionButtonClicked);
}
private void updateSubtext() {
- mTutorialStepView.setText(mContext.getString(
- R.string.gesture_tutorial_step,
- mTutorialFragment.getCurrentStep(),
- mTutorialFragment.getNumSteps()));
+ mTutorialStepView.setTutorialProgress(
+ mTutorialFragment.getCurrentStep(), mTutorialFragment.getNumSteps());
}
private void updateDrawables() {
diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialStepIndicator.java b/quickstep/src/com/android/quickstep/interaction/TutorialStepIndicator.java
new file mode 100644
index 0000000..eda6158
--- /dev/null
+++ b/quickstep/src/com/android/quickstep/interaction/TutorialStepIndicator.java
@@ -0,0 +1,118 @@
+/*
+ * 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.interaction;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+
+import androidx.appcompat.content.res.AppCompatResources;
+
+import com.android.launcher3.R;
+import com.android.launcher3.Utilities;
+import com.android.launcher3.icons.GraphicsUtils;
+
+/** Indicator displaying the current progress through the gesture navigation tutorial. */
+public class TutorialStepIndicator extends LinearLayout {
+
+ private static final String LOG_TAG = "TutorialStepIndicator";
+
+ private int mCurrentStep = -1;
+ private int mTotalSteps = -1;
+
+ public TutorialStepIndicator(Context context) {
+ super(context);
+ }
+
+ public TutorialStepIndicator(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public TutorialStepIndicator(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ }
+
+ public TutorialStepIndicator(Context context, AttributeSet attrs, int defStyleAttr,
+ int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+ }
+
+ /**
+ * Updates this indicator to display totalSteps indicator pills, with the first currentStep
+ * pills highlighted.
+ */
+ public void setTutorialProgress(int currentStep, int totalSteps) {
+ if (currentStep <= 0) {
+ Log.w(LOG_TAG, "Current step number invalid: " + currentStep + ". Assuming step 1.");
+ currentStep = 1;
+ }
+ if (totalSteps <= 0) {
+ Log.w(LOG_TAG, "Total number of steps invalid: " + totalSteps + ". Assuming 1 step.");
+ totalSteps = 1;
+ }
+ if (currentStep > totalSteps) {
+ Log.w(LOG_TAG, "Current step number greater than the total number of steps. Assuming"
+ + " final step.");
+ currentStep = totalSteps;
+ }
+ if (totalSteps < 2) {
+ setVisibility(GONE);
+ return;
+ }
+ setVisibility(VISIBLE);
+ mCurrentStep = currentStep;
+ mTotalSteps = totalSteps;
+
+ initializeStepIndicators();
+ }
+
+ private void initializeStepIndicators() {
+ for (int i = mTotalSteps; i < getChildCount(); i++) {
+ removeViewAt(i);
+ }
+ for (int i = 0; i < mTotalSteps; i++) {
+ Drawable pageIndicatorPillDrawable = AppCompatResources.getDrawable(
+ getContext(), R.drawable.tutorial_step_indicator_pill);
+
+ if (i >= getChildCount()) {
+ ImageView pageIndicatorPill = new ImageView(getContext());
+ pageIndicatorPill.setImageDrawable(pageIndicatorPillDrawable);
+
+ LinearLayout.LayoutParams lp = new LayoutParams(
+ LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
+
+ lp.setMarginStart(Utilities.dpToPx(3));
+ lp.setMarginEnd(Utilities.dpToPx(3));
+
+ addView(pageIndicatorPill, lp);
+ }
+ if (pageIndicatorPillDrawable != null) {
+ if (i < mCurrentStep) {
+ pageIndicatorPillDrawable.setTint(
+ GraphicsUtils.getAttrColor(getContext(),
+ android.R.attr.textColorPrimary));
+ } else {
+ pageIndicatorPillDrawable.setTint(
+ GraphicsUtils.getAttrColor(getContext(),
+ android.R.attr.textColorPrimaryInverse));
+ }
+ }
+ }
+ }
+}
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 64c3174..376cb31 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -388,6 +388,8 @@
private final TaskOverlayFactory mTaskOverlayFactory;
+ private int mOrientation;
+
protected boolean mDisallowScrollToClearAll;
private boolean mOverlayEnabled;
protected boolean mFreezeViewVisibility;
@@ -581,6 +583,7 @@
.getDimensionPixelSize(R.dimen.recents_fast_fling_velocity);
mModel = RecentsModel.INSTANCE.get(context);
mIdp = InvariantDeviceProfile.INSTANCE.get(context);
+ mOrientation = getResources().getConfiguration().orientation;
mClearAllButton = (ClearAllButton) LayoutInflater.from(context)
.inflate(R.layout.overview_clear_all_button, this, false);
@@ -2612,6 +2615,18 @@
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
+ if (LIVE_TILE.get() && mEnableDrawingLiveTile && newConfig.orientation != mOrientation) {
+ switchToScreenshot(
+ () -> finishRecentsAnimation(true /* toRecents */,
+ this::onConfigurationChangedInternal));
+ mEnableDrawingLiveTile = false;
+ } else {
+ onConfigurationChangedInternal();
+ }
+ mOrientation = newConfig.orientation;
+ }
+
+ private void onConfigurationChangedInternal() {
final int rotation = mActivity.getDisplay().getRotation();
if (mOrientationState.setRecentsRotation(rotation)) {
updateOrientationHandler();
diff --git a/res/drawable/all_apps_tabs_background.xml b/res/drawable/all_apps_tabs_background.xml
index 377b653..f882522 100644
--- a/res/drawable/all_apps_tabs_background.xml
+++ b/res/drawable/all_apps_tabs_background.xml
@@ -13,9 +13,14 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<shape android:shape="rectangle"
- 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">
- <solid android:color="?androidprv:attr/colorSurface" />
- <corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
-</shape>
\ No newline at end of file
+ <item
+ android:top="6dp"
+ android:bottom="6dp">
+ <shape android:shape="rectangle">
+ <solid android:color="?androidprv:attr/colorSurface" />
+ <corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
+ </shape>
+ </item>
+</layer-list>
\ No newline at end of file
diff --git a/res/layout/all_apps_personal_work_tabs.xml b/res/layout/all_apps_personal_work_tabs.xml
index f089f83..686dda8 100644
--- a/res/layout/all_apps_personal_work_tabs.xml
+++ b/res/layout/all_apps_personal_work_tabs.xml
@@ -16,11 +16,10 @@
<com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabs"
- android:layout_width="match_parent"
+ android:layout_width="@dimen/all_apps_header_pills_width"
android:layout_height="@dimen/all_apps_header_pill_height"
+ android:layout_gravity="center_horizontal"
android:background="@drawable/all_apps_tabs_background"
- android:layout_marginLeft="@dimen/all_apps_tabs_side_padding"
- android:layout_marginRight="@dimen/all_apps_tabs_side_padding"
android:orientation="horizontal"
android:elevation="2dp"
style="@style/TextHeadline">
diff --git a/res/layout/secondary_launcher.xml b/res/layout/secondary_launcher.xml
index 94fcdb9..b15a320 100644
--- a/res/layout/secondary_launcher.xml
+++ b/res/layout/secondary_launcher.xml
@@ -71,8 +71,6 @@
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="@dimen/all_apps_header_pill_height"
- android:layout_marginLeft="@dimen/all_apps_tabs_side_padding"
- android:layout_marginRight="@dimen/all_apps_tabs_side_padding"
android:orientation="horizontal"
style="@style/TextHeadline">
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 49bc7fd..90c98fb 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -48,8 +48,8 @@
<string name="widgets_full_sheet_cancel_button_description" msgid="5766167035728653605">"Effacer le texte du champ de recherche"</string>
<string name="no_widgets_available" msgid="9140948620298620513">"Aucun widget disponible"</string>
<string name="no_search_results" msgid="6518732304311458580">"Aucun résultat de recherche"</string>
- <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"Widgets personnels"</string>
- <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"Widgets professionnels"</string>
+ <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"Personnels"</string>
+ <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"Professionnels"</string>
<string name="widget_category_conversations" msgid="8894438636213590446">"Conversations"</string>
<string name="all_apps_search_bar_hint" msgid="1390553134053255246">"Rechercher dans les applications"</string>
<string name="all_apps_loading_message" msgid="5813968043155271636">"Chargement des applications…"</string>
diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml
index 68ffed6..2528aed 100644
--- a/res/values-sq/strings.xml
+++ b/res/values-sq/strings.xml
@@ -97,8 +97,7 @@
<string name="folder_name_format_exact" msgid="8626242716117004803">"Dosja: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> artikuj"</string>
<string name="folder_name_format_overflow" msgid="4270108890534995199">"Dosja: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> ose më shumë artikuj"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Imazhet e sfondit"</string>
- <!-- no translation found for styles_wallpaper_button_text (8216961355289236794) -->
- <skip />
+ <string name="styles_wallpaper_button_text" msgid="8216961355289236794">"Imazhi i sfondit dhe stili"</string>
<string name="settings_button_text" msgid="8873672322605444408">"Cilësimet e ekranit bazë"</string>
<string name="msg_disabled_by_admin" msgid="6898038085516271325">"Çaktivizuar nga administratori"</string>
<string name="allow_rotation_title" msgid="7728578836261442095">"Lejo rrotullimin e ekranit bazë"</string>
diff --git a/res/values-v31/colors.xml b/res/values-v31/colors.xml
index 5ade64c..7b37001 100644
--- a/res/values-v31/colors.xml
+++ b/res/values-v31/colors.xml
@@ -28,6 +28,9 @@
<color name="workspace_text_color_light">@android:color/system_neutral1_0</color>
<color name="workspace_text_color_dark">@android:color/system_neutral1_1000</color>
+ <color name="folder_hint_text_color_light">@android:color/system_neutral1_50</color>
+ <color name="folder_hint_text_color_dark">@android:color/system_neutral2_700</color>
+
<color name="text_color_primary_dark">@android:color/system_neutral1_50</color>
<color name="text_color_secondary_dark">@android:color/system_neutral2_200</color>
<color name="text_color_tertiary_dark">@android:color/system_neutral2_400</color>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index e605ca8..dc33ab8 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -19,6 +19,7 @@
<!-- Attributes used for launcher theme -->
<attr name="allAppsScrimColor" format="color" />
+ <attr name="allappsHeaderProtectionColor" format="color" />
<attr name="allAppsNavBarScrimColor" format="color" />
<attr name="allAppsTheme" format="reference" />
<attr name="popupColorPrimary" format="color" />
diff --git a/res/values/colors.xml b/res/values/colors.xml
index e6553a2..2669437 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -17,7 +17,8 @@
** limitations under the License.
*/
-->
-<resources>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
<!-- The color tints to apply to the text and drag view when hovering
over the delete target or the info target -->
<color name="delete_target_hover_tint">#FFC1C1C1</color>
@@ -52,11 +53,13 @@
<color name="workspace_text_color_light">#FFF</color>
<color name="workspace_text_color_dark">#FF000000</color>
+ <color name="folder_hint_text_color_light">#FFF</color>
+ <color name="folder_hint_text_color_dark">#FF000000</color>
+
<color name="text_color_primary_dark">#FFFFFFFF</color>
<color name="text_color_secondary_dark">#FFFFFFFF</color>
<color name="text_color_tertiary_dark">#CCFFFFFF</color>
<color name="wallpaper_popup_scrim">?android:attr/colorAccent</color>
<color name="wallpaper_scrim_color">#0D878787</color>
-
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 451f82b..bfa02c0 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -91,7 +91,7 @@
<dimen name="all_apps_empty_search_bg_top_offset">144dp</dimen>
<dimen name="all_apps_background_canvas_width">700dp</dimen>
<dimen name="all_apps_background_canvas_height">475dp</dimen>
- <dimen name="all_apps_header_pill_height">36dp</dimen>
+ <dimen name="all_apps_header_pill_height">48dp</dimen>
<dimen name="all_apps_header_pill_corner_radius">18dp</dimen>
<dimen name="all_apps_header_pills_width">320dp</dimen>
<dimen name="all_apps_header_tab_height">48dp</dimen>
@@ -99,7 +99,7 @@
<dimen name="all_apps_header_top_padding">36dp</dimen>
<dimen name="all_apps_work_profile_tab_footer_top_padding">16dp</dimen>
<dimen name="all_apps_work_profile_tab_footer_bottom_padding">20dp</dimen>
- <dimen name="all_apps_tabs_side_padding">32dp</dimen>
+ <dimen name="all_apps_tabs_vertical_padding">6dp</dimen>
<dimen name="all_apps_divider_height">1dp</dimen>
<dimen name="all_apps_tip_bottom_margin">8dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 6d22951..df617ea 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -33,6 +33,7 @@
<style name="LauncherTheme" parent="@style/BaseLauncherTheme">
<item name="android:textColorSecondary">#DE000000</item>
<item name="allAppsScrimColor">?android:attr/colorBackgroundFloating</item>
+ <item name="allappsHeaderProtectionColor">@color/popup_color_tertiary_light</item>
<item name="allAppsNavBarScrimColor">#66FFFFFF</item>
<item name="allAppsTheme">@style/AllAppsTheme</item>
<item name="popupColorPrimary">@color/popup_color_primary_light</item>
@@ -51,7 +52,7 @@
<item name="folderIconBorderColor">?android:attr/colorPrimary</item>
<item name="folderTextColor">?android:attr/textColorPrimary</item>
<item name="isFolderDarkText">true</item>
- <item name="folderHintColor">#89616161</item>
+ <item name="folderHintColor">@color/folder_hint_text_color_dark</item>
<item name="loadingIconColor">#CCFFFFFF</item>
<item name="iconOnlyShortcutColor">?android:attr/textColorSecondary</item>
<item name="workProfileOverlayTextColor">#FF212121</item>
@@ -73,6 +74,7 @@
<item name="folderFillColor">#FF3C4043</item> <!-- 100% GM2 800 -->
<item name="folderTextColor">?attr/workspaceTextColor</item>
<item name="isFolderDarkText">?attr/isWorkspaceDarkText</item>
+ <item name="folderHintColor">@color/folder_hint_text_color_dark</item>
<item name="disabledIconAlpha">.254</item>
</style>
@@ -89,6 +91,7 @@
<item name="folderIconBorderColor">#FF80868B</item>
<item name="folderTextColor">?attr/workspaceTextColor</item>
<item name="isFolderDarkText">true</item>
+ <item name="folderHintColor">@color/folder_hint_text_color_dark</item>
</style>
<style name="LauncherTheme.Dark" parent="@style/LauncherTheme">
@@ -110,7 +113,7 @@
<item name="folderIconBorderColor">?android:attr/colorPrimary</item>
<item name="folderTextColor">?android:attr/textColorPrimary</item>
<item name="isFolderDarkText">false</item>
- <item name="folderHintColor">#89CCCCCC</item>
+ <item name="folderHintColor">@color/folder_hint_text_color_light</item>
<item name="isMainColorDark">true</item>
<item name="loadingIconColor">#99FFFFFF</item>
<item name="iconOnlyShortcutColor">#B3FFFFFF</item>
@@ -123,6 +126,7 @@
<item name="folderFillColor">#FF3C4043</item> <!-- 100% GM2 800 -->
<item name="folderTextColor">@android:color/white</item>
<item name="isFolderDarkText">false</item>
+ <item name="folderHintColor">@color/folder_hint_text_color_light</item>
<item name="disabledIconAlpha">.54</item>
</style>
@@ -131,6 +135,7 @@
<item name="folderFillColor">#CDFFFFFF</item>
<item name="folderTextColor">?attr/workspaceTextColor</item>
<item name="isFolderDarkText">?attr/isWorkspaceDarkText</item>
+ <item name="folderHintColor">@color/folder_hint_text_color_dark</item>
<item name="workspaceTextColor">@color/workspace_text_color_dark</item>
<item name="workspaceShadowColor">@android:color/transparent</item>
<item name="workspaceAmbientShadowColor">@android:color/transparent</item>
diff --git a/robolectric_tests/src/com/android/launcher3/model/ModelMultiCallbacksTest.java b/robolectric_tests/src/com/android/launcher3/model/ModelMultiCallbacksTest.java
index aab6c25..a2abfd5 100644
--- a/robolectric_tests/src/com/android/launcher3/model/ModelMultiCallbacksTest.java
+++ b/robolectric_tests/src/com/android/launcher3/model/ModelMultiCallbacksTest.java
@@ -15,7 +15,7 @@
*/
package com.android.launcher3.model;
-import static com.android.launcher3.util.Executors.createAndStartNewForegroundLooper;
+import static com.android.launcher3.util.Executors.createAndStartNewLooper;
import static com.android.launcher3.util.LauncherModelHelper.TEST_PACKAGE;
import static org.junit.Assert.assertEquals;
@@ -74,7 +74,7 @@
// Since robolectric tests run on main thread, we run the loader-UI calls on a temp thread,
// so that we can wait appropriately for the loader to complete.
- mTempMainExecutor = new LooperExecutor(createAndStartNewForegroundLooper("tempMain"));
+ mTempMainExecutor = new LooperExecutor(createAndStartNewLooper("tempMain"));
ShadowLooperExecutor sle = Shadow.extract(Executors.MAIN_EXECUTOR);
sle.setHandler(mTempMainExecutor.getHandler());
}
diff --git a/src/com/android/launcher3/AbstractFloatingView.java b/src/com/android/launcher3/AbstractFloatingView.java
index b3952ca..9100947 100644
--- a/src/com/android/launcher3/AbstractFloatingView.java
+++ b/src/com/android/launcher3/AbstractFloatingView.java
@@ -39,7 +39,6 @@
import com.android.launcher3.util.TouchController;
import com.android.launcher3.views.ActivityContext;
import com.android.launcher3.views.BaseDragLayer;
-import com.android.launcher3.widget.LocalColorExtractor;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -112,21 +111,12 @@
protected boolean mIsOpen;
- // Index used to get background color when using local wallpaper color extraction.
- protected int mColorExtractionIndex;
-
public AbstractFloatingView(Context context, AttributeSet attrs) {
super(context, attrs);
- init(context);
}
public AbstractFloatingView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
- init(context);
- }
-
- private void init(Context context) {
- mColorExtractionIndex = LocalColorExtractor.getColorIndex(context);
}
/**
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index 834b5a7..b6cc6d6 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -24,6 +24,8 @@
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.pm.LauncherApps;
import android.os.UserHandle;
import android.util.Log;
@@ -45,6 +47,7 @@
import com.android.launcher3.util.SafeCloseable;
import com.android.launcher3.util.SettingsCache;
import com.android.launcher3.util.SimpleBroadcastReceiver;
+import com.android.launcher3.util.Themes;
import com.android.launcher3.widget.custom.CustomWidgetManager;
public class LauncherAppState {
@@ -108,6 +111,12 @@
observer, MODEL_EXECUTOR.getHandler());
mOnTerminateCallback.add(iconChangeTracker::close);
MODEL_EXECUTOR.execute(observer::verifyIconChanged);
+ if (ENABLE_THEMED_ICONS.get()) {
+ SharedPreferences prefs = Utilities.getPrefs(mContext);
+ prefs.registerOnSharedPreferenceChangeListener(observer);
+ mOnTerminateCallback.add(
+ () -> prefs.unregisterOnSharedPreferenceChangeListener(observer));
+ }
InstallSessionTracker installSessionTracker =
InstallSessionHelper.INSTANCE.get(context).registerInstallTracker(mModel);
@@ -128,7 +137,7 @@
mContext = context;
mInvariantDeviceProfile = InvariantDeviceProfile.INSTANCE.get(context);
- mIconProvider = new IconProvider(context, ENABLE_THEMED_ICONS.get());
+ mIconProvider = new IconProvider(context, Themes.isThemedIconEnabled(context));
mIconCache = new IconCache(mContext, mInvariantDeviceProfile,
iconCacheFileName, mIconProvider);
mWidgetCache = new WidgetPreviewLoader(mContext, mIconCache);
@@ -187,7 +196,8 @@
return InvariantDeviceProfile.INSTANCE.get(context);
}
- private class IconObserver implements IconProvider.IconChangeListener {
+ private class IconObserver
+ implements IconProvider.IconChangeListener, OnSharedPreferenceChangeListener {
@Override
public void onAppIconChanged(String packageName, UserHandle user) {
@@ -207,5 +217,13 @@
onSystemIconStateChanged(iconState);
}
}
+
+ @Override
+ public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
+ if (Themes.KEY_THEMED_ICONS.equals(key)) {
+ mIconProvider.setIconThemeSupported(Themes.isThemedIconEnabled(mContext));
+ verifyIconChanged();
+ }
+ }
}
}
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index 9df95bf..18de49a 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -127,7 +127,6 @@
private Rect mInsets = new Rect();
private SearchAdapterProvider mSearchAdapterProvider;
- private final int mHeaderTopPadding;
private final int mScrimColor;
private final int mHeaderProtectionColor;
private final float mHeaderThreshold;
@@ -152,9 +151,7 @@
mScrimColor = Themes.getAttrColor(context, R.attr.allAppsScrimColor);
mHeaderThreshold = getResources().getDimensionPixelSize(
R.dimen.dynamic_grid_cell_border_spacing);
- mHeaderTopPadding = context.getResources()
- .getDimensionPixelSize(R.dimen.all_apps_header_top_padding);
- mHeaderProtectionColor = context.getColor(R.color.all_apps_tab_bg);
+ mHeaderProtectionColor = Themes.getAttrColor(context, R.attr.allappsHeaderProtectionColor);
mLauncher.addOnDeviceProfileChangeListener(this);
diff --git a/src/com/android/launcher3/allapps/FloatingHeaderView.java b/src/com/android/launcher3/allapps/FloatingHeaderView.java
index f55ab25..af7896a 100644
--- a/src/com/android/launcher3/allapps/FloatingHeaderView.java
+++ b/src/com/android/launcher3/allapps/FloatingHeaderView.java
@@ -52,6 +52,7 @@
private final Rect mClip = new Rect(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE);
private final ValueAnimator mAnimator = ValueAnimator.ofInt(0, 0);
+ private final ValueAnimator mHeaderAnimator = ValueAnimator.ofInt(0, 1).setDuration(100);
private final Point mTempOffset = new Point();
private final Paint mBGPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
private final RecyclerView.OnScrollListener mOnScrollListener =
@@ -132,6 +133,7 @@
}
mFixedRows = rows.toArray(new FloatingHeaderRow[rows.size()]);
mAllRows = mFixedRows;
+ mHeaderAnimator.addUpdateListener(valueAnimator -> invalidate());
}
@Override
@@ -268,7 +270,6 @@
}
} else {
mHeaderCollapsed = false;
- invalidate();
}
mTranslationY = currentScrollY;
} else if (!mHeaderCollapsed) {
@@ -281,7 +282,8 @@
} else if (mTranslationY <= -mMaxTranslation) { // hide or stay hidden
mHeaderCollapsed = true;
mSnappedScrolledY = -mMaxTranslation;
- invalidate();
+ mHeaderAnimator.setCurrentFraction(0);
+ mHeaderAnimator.start();
}
}
}
@@ -296,8 +298,10 @@
@Override
protected void dispatchDraw(Canvas canvas) {
- if (mHeaderCollapsed && mHeaderColor != Color.TRANSPARENT) {
+ if (mHeaderCollapsed && mTabLayout.getVisibility() == VISIBLE
+ && mHeaderColor != Color.TRANSPARENT) {
mBGPaint.setColor(mHeaderColor);
+ mBGPaint.setAlpha((int) (255 * mHeaderAnimator.getAnimatedFraction()));
canvas.drawRect(0, 0, getWidth(), getHeight() + mTranslationY, mBGPaint);
}
super.dispatchDraw(canvas);
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index f5a8ef6..e387627 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -32,8 +32,10 @@
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
+import android.annotation.TargetApi;
import android.appwidget.AppWidgetHostView;
import android.content.Context;
+import android.content.res.ColorStateList;
import android.graphics.Canvas;
import android.graphics.Insets;
import android.graphics.Path;
@@ -65,6 +67,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
+import androidx.core.graphics.ColorUtils;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.Alarm;
@@ -157,13 +160,18 @@
private static final float ICON_OVERSCROLL_WIDTH_FACTOR = 0.45f;
private static final int FOLDER_NAME_ANIMATION_DURATION = 633;
- private static final int FOLDER_COLOR_ANIMATION_DURATION = 150;
+ private static final int FOLDER_COLOR_ANIMATION_DURATION = 200;
private static final int REORDER_DELAY = 250;
private static final int ON_EXIT_CLOSE_DELAY = 400;
private static final Rect sTempRect = new Rect();
private static final int MIN_FOLDERS_FOR_HARDWARE_OPTIMIZATION = 10;
+ // Index used to get background color when using local wallpaper color extraction,
+ private static final int DARK_COLOR_EXTRACTION_INDEX = android.R.color.system_neutral1_900;
+ private static final int LIGHT_COLOR_EXTRACTION_INDEX = android.R.color.system_neutral2_500;
+ private static final int LIGHT_COLOR_L_STAR = 98;
+
private final Alarm mReorderAlarm = new Alarm();
private final Alarm mOnExitAlarm = new Alarm();
private final Alarm mOnScrollHintAlarm = new Alarm();
@@ -296,8 +304,7 @@
}
if (Utilities.ATLEAST_S) {
- mColorExtractionIndex = LocalColorExtractor.getColorIndex(
- !Themes.getAttrBoolean(getContext(), R.attr.isFolderDarkText));
+ boolean isFolderDarkText = Themes.getAttrBoolean(getContext(), R.attr.isFolderDarkText);
mColorExtractor = LocalColorExtractor.newInstance(getContext());
mColorListener = (RectF rect, SparseIntArray extractedColors) -> {
mColorChangeRunnable = () -> {
@@ -313,11 +320,14 @@
mOpenAnimationColorChangeAnimator = null;
}
- // Start a new animator to the extracted color.
- int newColor = extractedColors.get(mColorExtractionIndex);
+ // Start a new animator to the extracted color. Clamp down on the alpha
+ // to prevent folder from being transparent for too long.
GradientDrawable bg = (GradientDrawable) getBackground();
- mColorChangeAnimator = ObjectAnimator.ofArgb(bg, "color",
- bg.getColor().getDefaultColor(), newColor).setDuration(duration);
+ int currentColor = ColorUtils.setAlphaComponent(bg.getColor().getDefaultColor(),
+ 255);
+ int newColor = getExtractedColor(extractedColors, isFolderDarkText);
+ mColorChangeAnimator = ObjectAnimator.ofArgb(bg, "color", currentColor,
+ newColor).setDuration(duration);
mColorChangeAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
@@ -337,6 +347,21 @@
}
}
+ /**
+ * Returns an index used to query the color of interest from the list of extracted colors.
+ * @param hasDarkText True when dark index is wanted, False when light index is wanted.
+ */
+ @TargetApi(Build.VERSION_CODES.S)
+ private int getExtractedColor(SparseIntArray colors, boolean hasDarkText) {
+ int color = colors.get(hasDarkText
+ ? LIGHT_COLOR_EXTRACTION_INDEX
+ : DARK_COLOR_EXTRACTION_INDEX);
+ if (hasDarkText) {
+ color = ColorStateList.valueOf(color).withLStar(LIGHT_COLOR_L_STAR).getDefaultColor();
+ }
+ return color;
+ }
+
public boolean onLongClick(View v) {
// Return if global dragging is not enabled
if (!mLauncherDelegate.isDraggingEnabled()) return true;
diff --git a/src/com/android/launcher3/graphics/GridCustomizationsProvider.java b/src/com/android/launcher3/graphics/GridCustomizationsProvider.java
index cb42e7a..a03e48d 100644
--- a/src/com/android/launcher3/graphics/GridCustomizationsProvider.java
+++ b/src/com/android/launcher3/graphics/GridCustomizationsProvider.java
@@ -1,5 +1,9 @@
package com.android.launcher3.graphics;
+import static com.android.launcher3.Utilities.getPrefs;
+import static com.android.launcher3.util.Themes.KEY_THEMED_ICONS;
+import static com.android.launcher3.util.Themes.isThemedIconEnabled;
+
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.pm.PackageManager;
@@ -15,6 +19,7 @@
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.InvariantDeviceProfile.GridOption;
import com.android.launcher3.R;
+import com.android.launcher3.config.FeatureFlags;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -55,6 +60,11 @@
private static final String METHOD_GET_PREVIEW = "get_preview";
+ private static final String GET_ICON_THEMED = "/get_icon_themed";
+ private static final String SET_ICON_THEMED = "/set_icon_themed";
+ private static final String ICON_THEMED = "/icon_themed";
+ private static final String BOOLEAN_VALUE = "boolean_value";
+
@Override
public boolean onCreate() {
return true;
@@ -63,22 +73,31 @@
@Override
public Cursor query(Uri uri, String[] projection, String selection,
String[] selectionArgs, String sortOrder) {
- if (!KEY_LIST_OPTIONS.equals(uri.getPath())) {
- return null;
+ switch (uri.getPath()) {
+ case KEY_LIST_OPTIONS: {
+ MatrixCursor cursor = new MatrixCursor(new String[] {
+ KEY_NAME, KEY_ROWS, KEY_COLS, KEY_PREVIEW_COUNT, KEY_IS_DEFAULT});
+ InvariantDeviceProfile idp = InvariantDeviceProfile.INSTANCE.get(getContext());
+ for (GridOption gridOption : parseAllGridOptions()) {
+ cursor.newRow()
+ .add(KEY_NAME, gridOption.name)
+ .add(KEY_ROWS, gridOption.numRows)
+ .add(KEY_COLS, gridOption.numColumns)
+ .add(KEY_PREVIEW_COUNT, 1)
+ .add(KEY_IS_DEFAULT, idp.numColumns == gridOption.numColumns
+ && idp.numRows == gridOption.numRows);
+ }
+ return cursor;
+ }
+ case GET_ICON_THEMED:
+ case ICON_THEMED: {
+ MatrixCursor cursor = new MatrixCursor(new String[] {BOOLEAN_VALUE});
+ cursor.newRow().add(BOOLEAN_VALUE, isThemedIconEnabled(getContext()) ? 1 : 0);
+ return cursor;
+ }
+ default:
+ return null;
}
- MatrixCursor cursor = new MatrixCursor(new String[] {
- KEY_NAME, KEY_ROWS, KEY_COLS, KEY_PREVIEW_COUNT, KEY_IS_DEFAULT});
- InvariantDeviceProfile idp = InvariantDeviceProfile.INSTANCE.get(getContext());
- for (GridOption gridOption : parseAllGridOptions()) {
- cursor.newRow()
- .add(KEY_NAME, gridOption.name)
- .add(KEY_ROWS, gridOption.numRows)
- .add(KEY_COLS, gridOption.numColumns)
- .add(KEY_PREVIEW_COUNT, 1)
- .add(KEY_IS_DEFAULT, idp.numColumns == gridOption.numColumns
- && idp.numRows == gridOption.numRows);
- }
- return cursor;
}
private List<GridOption> parseAllGridOptions() {
@@ -117,25 +136,37 @@
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
- if (!KEY_DEFAULT_GRID.equals(uri.getPath())) {
- return 0;
- }
+ switch (uri.getPath()) {
+ case KEY_DEFAULT_GRID: {
+ String gridName = values.getAsString(KEY_NAME);
+ // Verify that this is a valid grid option
+ GridOption match = null;
+ for (GridOption option : parseAllGridOptions()) {
+ if (option.name.equals(gridName)) {
+ match = option;
+ break;
+ }
+ }
+ if (match == null) {
+ return 0;
+ }
- String gridName = values.getAsString(KEY_NAME);
- // Verify that this is a valid grid option
- GridOption match = null;
- for (GridOption option : parseAllGridOptions()) {
- if (option.name.equals(gridName)) {
- match = option;
- break;
+ InvariantDeviceProfile.INSTANCE.get(getContext())
+ .setCurrentGrid(getContext(), gridName);
+ return 1;
}
+ case ICON_THEMED:
+ case SET_ICON_THEMED: {
+ if (FeatureFlags.ENABLE_THEMED_ICONS.get()) {
+ getPrefs(getContext()).edit()
+ .putBoolean(KEY_THEMED_ICONS, values.getAsBoolean(BOOLEAN_VALUE))
+ .apply();
+ }
+ return 1;
+ }
+ default:
+ return 0;
}
- if (match == null) {
- return 0;
- }
-
- InvariantDeviceProfile.INSTANCE.get(getContext()).setCurrentGrid(getContext(), gridName);
- return 1;
}
@Override
diff --git a/src/com/android/launcher3/util/Executors.java b/src/com/android/launcher3/util/Executors.java
index a85ae45..6329540 100644
--- a/src/com/android/launcher3/util/Executors.java
+++ b/src/com/android/launcher3/util/Executors.java
@@ -30,18 +30,15 @@
*/
public class Executors {
- // These values are same as that in {@link AsyncTask}.
- private static final int CPU_COUNT = Runtime.getRuntime().availableProcessors();
- private static final int CORE_POOL_SIZE = CPU_COUNT + 1;
- private static final int MAXIMUM_POOL_SIZE = CPU_COUNT * 2 + 1;
+ private static final int POOL_SIZE =
+ Math.max(Runtime.getRuntime().availableProcessors(), 2);
private static final int KEEP_ALIVE = 1;
/**
* An {@link ThreadPoolExecutor} to be used with async task with no limit on the queue size.
*/
public static final ThreadPoolExecutor THREAD_POOL_EXECUTOR = new ThreadPoolExecutor(
- CORE_POOL_SIZE, MAXIMUM_POOL_SIZE, KEEP_ALIVE,
- TimeUnit.SECONDS, new LinkedBlockingQueue<>());
+ POOL_SIZE, POOL_SIZE, KEEP_ALIVE, TimeUnit.SECONDS, new LinkedBlockingQueue<>());
/**
* Returns the executor for running tasks on the main thread.
@@ -53,7 +50,8 @@
* A background executor for using time sensitive actions where user is waiting for response.
*/
public static final LooperExecutor UI_HELPER_EXECUTOR =
- new LooperExecutor(createAndStartNewForegroundLooper("UiThreadHelper"));
+ new LooperExecutor(
+ createAndStartNewLooper("UiThreadHelper", Process.THREAD_PRIORITY_FOREGROUND));
/**
* Utility method to get a started handler thread statically
@@ -72,15 +70,6 @@
}
/**
- * Similar to {@link #createAndStartNewLooper(String)}, but starts the thread with
- * foreground priority.
- * Think before using
- */
- public static Looper createAndStartNewForegroundLooper(String name) {
- return createAndStartNewLooper(name, Process.THREAD_PRIORITY_FOREGROUND);
- }
-
- /**
* Executor used for running Launcher model related tasks (eg loading icons or updated db)
*/
public static final LooperExecutor MODEL_EXECUTOR =
diff --git a/src/com/android/launcher3/util/Themes.java b/src/com/android/launcher3/util/Themes.java
index 8243dd4..53a584d 100644
--- a/src/com/android/launcher3/util/Themes.java
+++ b/src/com/android/launcher3/util/Themes.java
@@ -32,6 +32,7 @@
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
+import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.icons.GraphicsUtils;
/**
@@ -40,6 +41,8 @@
@SuppressWarnings("NewApi")
public class Themes {
+ public static final String KEY_THEMED_ICONS = "themed_icons";
+
public static int getActivityThemeRes(Context context) {
final int colorHints;
if (Utilities.ATLEAST_P) {
@@ -67,6 +70,13 @@
}
}
+ /**
+ * Returns true if workspace icon theming is enabled
+ */
+ public static boolean isThemedIconEnabled(Context context) {
+ return FeatureFlags.ENABLE_THEMED_ICONS.get()
+ && Utilities.getPrefs(context).getBoolean(KEY_THEMED_ICONS, false);
+ }
public static String getDefaultBodyFont(Context context) {
TypedArray ta = context.obtainStyledAttributes(android.R.style.TextAppearance_DeviceDefault,
diff --git a/src/com/android/launcher3/widget/LocalColorExtractor.java b/src/com/android/launcher3/widget/LocalColorExtractor.java
index e479b7d..8ae6b2e 100644
--- a/src/com/android/launcher3/widget/LocalColorExtractor.java
+++ b/src/com/android/launcher3/widget/LocalColorExtractor.java
@@ -28,7 +28,6 @@
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
-import com.android.launcher3.Utilities;
import com.android.launcher3.util.ResourceBasedOverride;
import java.util.List;
@@ -36,10 +35,6 @@
/** Extracts the colors we need from the wallpaper at given locations. */
public class LocalColorExtractor implements ResourceBasedOverride {
- // Index used to get background color when using local wallpaper color extraction,
- private static final int LIGHT_COLOR_EXTRACTION_INDEX = android.R.color.system_accent2_50;
- private static final int DARK_COLOR_EXTRACTION_INDEX = android.R.color.system_accent2_800;
-
/** Listener for color changes on a screen location. */
public interface Listener {
/**
@@ -108,19 +103,4 @@
RectF colorExtractionRectOut) {
// no-op
}
-
- /**
- * Returns an index used to query the color of interest from the list of extracted colors.
- */
- public static int getColorIndex(Context context) {
- return getColorIndex(Utilities.isDarkTheme(context));
- }
-
- /**
- * Returns an index used to query the color of interest from the list of extracted colors.
- * @param getDarkIndex True when dark index is wanted, False when light index is wanted.
- */
- public static int getColorIndex(boolean getDarkIndex) {
- return getDarkIndex ? DARK_COLOR_EXTRACTION_INDEX : LIGHT_COLOR_EXTRACTION_INDEX;
- }
}
diff --git a/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java b/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java
index 8039fd1..c7cbde8 100644
--- a/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java
+++ b/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java
@@ -36,7 +36,7 @@
public class PersonalWorkSlidingTabStrip extends LinearLayout implements PageIndicator {
private final Paint mSelectedIndicatorPaint;
- private int mSelectedIndicatorHeight;
+ private int mTabVerticalPadding;
private final int mSelectedIndicatorRadius;
private int mIndicatorLeft = -1;
@@ -52,8 +52,8 @@
super(context, attrs);
setWillNotDraw(false);
- mSelectedIndicatorHeight =
- getResources().getDimensionPixelSize(R.dimen.all_apps_header_pill_height);
+ mTabVerticalPadding =
+ getResources().getDimensionPixelSize(R.dimen.all_apps_tabs_vertical_padding);
mSelectedIndicatorRadius = getResources().getDimensionPixelSize(
R.dimen.all_apps_header_pill_corner_radius);
@@ -112,9 +112,9 @@
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
- canvas.drawRoundRect(mIndicatorLeft, getHeight() - mSelectedIndicatorHeight,
- mIndicatorRight, getHeight(), mSelectedIndicatorRadius, mSelectedIndicatorRadius,
- mSelectedIndicatorPaint);
+ canvas.drawRoundRect(mIndicatorLeft, mTabVerticalPadding, mIndicatorRight,
+ getHeight() - mTabVerticalPadding, mSelectedIndicatorRadius,
+ mSelectedIndicatorRadius, mSelectedIndicatorPaint);
}
@Override