Merge "Log stacktrace for binder call tracer" into main
diff --git a/quickstep/res/values-mr/strings.xml b/quickstep/res/values-mr/strings.xml
index 7941156..b053a21 100644
--- a/quickstep/res/values-mr/strings.xml
+++ b/quickstep/res/values-mr/strings.xml
@@ -95,7 +95,7 @@
<string name="allset_navigation_settings" msgid="4713404605961476027"><annotation id="link">"सिस्टीम नेव्हिगेशन सेटिंग्ज"</annotation></string>
<string name="action_share" msgid="2648470652637092375">"शेअर करा"</string>
<string name="action_screenshot" msgid="8171125848358142917">"स्क्रीनशॉट"</string>
- <string name="action_split" msgid="2098009717623550676">"स्प्लिट"</string>
+ <string name="action_split" msgid="2098009717623550676">"स्प्लिट करा"</string>
<string name="action_save_app_pair" msgid="5974823919237645229">"ॲपची जोडी सेव्ह करा"</string>
<string name="toast_split_select_app" msgid="8464310533320556058">"स्प्लिट स्क्रीन वापरण्यासाठी दुसऱ्या ॲपवर टॅप करा"</string>
<string name="toast_contextual_split_select_app" msgid="433510957123687090">"स्प्लिट स्क्रीन वापरण्यासाठी दुसरे ॲप निवडा"</string>
diff --git a/quickstep/res/values-night/colors.xml b/quickstep/res/values-night/colors.xml
index 8d03ce6..94100ba 100644
--- a/quickstep/res/values-night/colors.xml
+++ b/quickstep/res/values-night/colors.xml
@@ -22,7 +22,7 @@
<color name="mock_webpage_url_bar">#202124</color>
<color name="mock_webpage_url_bar_item">#3c4043</color>
- <color name="all_set_page_background">#FF000000</color>
+ <color name="all_set_page_background">@android:color/system_neutral1_900</color>
<!-- Turn on work apps button -->
<color name="work_turn_on_stroke">?androidprv:attr/colorAccentSecondaryVariant</color>
diff --git a/quickstep/res/values-pt-rPT/strings.xml b/quickstep/res/values-pt-rPT/strings.xml
index dd00469..47498cc 100644
--- a/quickstep/res/values-pt-rPT/strings.xml
+++ b/quickstep/res/values-pt-rPT/strings.xml
@@ -57,7 +57,7 @@
<string name="back_gesture_intro_title" msgid="19551256430224428">"Deslize rapidamente com o dedo para retroceder"</string>
<string name="back_gesture_intro_subtitle" msgid="7912576483031802797">"Para voltar ao último ecrã, deslize rapidamente do limite esquerdo ou direito até ao centro do ecrã."</string>
<string name="back_gesture_spoken_intro_subtitle" msgid="2162043199263088592">"Para voltar ao último ecrã, deslize rapidamente com 2 dedos a partir da extremidade esquerda ou direita até ao centro do ecrã."</string>
- <string name="back_gesture_tutorial_title" msgid="1944737946101059789">"Voltar"</string>
+ <string name="back_gesture_tutorial_title" msgid="1944737946101059789">"Retroceder"</string>
<string name="back_gesture_tutorial_subtitle" msgid="6639993416000920142">"Deslize rapidamente a partir da extremidade esquerda ou direita para o meio do ecrã"</string>
<string name="home_gesture_feedback_swipe_too_far_from_edge" msgid="4816365433160895458">"Deslize rapidamente com o dedo a partir do limite inferior do ecrã"</string>
<string name="home_gesture_feedback_overview_detected" msgid="5177627157303895077">"Não faça uma pausa antes de soltar"</string>
diff --git a/quickstep/res/values/colors.xml b/quickstep/res/values/colors.xml
index 14a916f..0f997f9 100644
--- a/quickstep/res/values/colors.xml
+++ b/quickstep/res/values/colors.xml
@@ -76,7 +76,7 @@
<color name="mock_webpage_top_bar_item">#80868b</color>
<color name="mock_webpage_page_text">#bdc1c6</color>
- <color name="all_set_page_background">#FFFFFFFF</color>
+ <color name="all_set_page_background">@android:color/system_neutral1_50</color>
<!-- Recents overview -->
<color name="recents_filter_icon">#333333</color>
diff --git a/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarFeatureEvaluator.kt b/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarFeatureEvaluator.kt
index 1ec075f..668a87d 100644
--- a/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarFeatureEvaluator.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarFeatureEvaluator.kt
@@ -19,7 +19,6 @@
import com.android.launcher3.config.FeatureFlags.enableTaskbarPinning
import com.android.launcher3.taskbar.TaskbarActivityContext
import com.android.launcher3.taskbar.TaskbarControllers
-import com.android.launcher3.taskbar.TaskbarRecentAppsController
import com.android.launcher3.util.DisplayController
/** Evaluates all the features taskbar can have. */
@@ -41,4 +40,7 @@
val isTransient: Boolean
get() = DisplayController.isTransientTaskbar(taskbarActivityContext)
+
+ val isLandscape: Boolean
+ get() = taskbarActivityContext.deviceProfile.isLandscape
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarIconSpecs.kt b/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarIconSpecs.kt
index 4cd895d..67bbcce 100644
--- a/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarIconSpecs.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarIconSpecs.kt
@@ -29,13 +29,15 @@
val defaultPersistentIconSize = iconSize40dp
val defaultTransientIconSize = iconSize44dp
- // defined as row, columns
val transientTaskbarIconSizeByGridSize =
mapOf(
- Pair(6, 5) to iconSize52dp,
- Pair(4, 5) to iconSize48dp,
- Pair(5, 4) to iconSize48dp,
- Pair(4, 4) to iconSize48dp,
- Pair(5, 6) to iconSize44dp,
+ TransientTaskbarIconSizeKey(6, 5, false) to iconSize52dp,
+ TransientTaskbarIconSizeKey(6, 5, true) to iconSize52dp,
+ TransientTaskbarIconSizeKey(4, 4, false) to iconSize48dp,
+ TransientTaskbarIconSizeKey(4, 4, true) to iconSize52dp,
+ TransientTaskbarIconSizeKey(4, 5, false) to iconSize48dp,
+ TransientTaskbarIconSizeKey(4, 5, true) to iconSize48dp,
+ TransientTaskbarIconSizeKey(5, 5, false) to iconSize44dp,
+ TransientTaskbarIconSizeKey(5, 5, true) to iconSize44dp,
)
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarSpecsEvaluator.kt b/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarSpecsEvaluator.kt
index 02e5947..0b7be40 100644
--- a/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarSpecsEvaluator.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarSpecsEvaluator.kt
@@ -22,7 +22,7 @@
fun getIconSizeByGrid(row: Int, column: Int): TaskbarIconSize {
return if (taskbarFeatureEvaluator.isTransient) {
TaskbarIconSpecs.transientTaskbarIconSizeByGridSize.getOrDefault(
- Pair(row, column),
+ TransientTaskbarIconSizeKey(row, column, taskbarFeatureEvaluator.isLandscape),
TaskbarIconSpecs.defaultTransientIconSize,
)
} else {
@@ -58,3 +58,5 @@
}
data class TaskbarIconSize(val size: Int)
+
+data class TransientTaskbarIconSizeKey(val row: Int, val column: Int, val isLandscape: Boolean)
diff --git a/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java b/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java
index fb54241..ba33c62 100644
--- a/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java
+++ b/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java
@@ -17,6 +17,7 @@
import static com.android.app.animation.Interpolators.ACCELERATE_1_5;
import static com.android.app.animation.Interpolators.LINEAR;
+import static com.android.launcher3.Flags.enableAdditionalHomeAnimations;
import static com.android.launcher3.PagedView.INVALID_PAGE;
import android.animation.Animator;
@@ -449,7 +450,7 @@
float alpha = mAnimationFactory.getWindowAlpha(progress);
mHomeAnim.setPlayFraction(progress);
- if (mTargetTaskView == null) {
+ if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) {
mHomeToWindowPositionMap.mapRect(mWindowCurrentRect, currentRect);
mMatrix.setRectToRect(mCropRectF, mWindowCurrentRect, ScaleToFit.FILL);
mLocalTransformParams
@@ -464,10 +465,15 @@
mLocalTransformParams.applySurfaceParams(
mLocalTransformParams.createSurfaceParams(this));
- mAnimationFactory.update(
- currentRect, progress, mMatrix.mapRadius(cornerRadius), (int) (alpha * 255));
- if (mTargetTaskView == null) {
+ mAnimationFactory.update(
+ currentRect,
+ progress,
+ mMatrix.mapRadius(cornerRadius),
+ !enableAdditionalHomeAnimations() || mTargetTaskView == null
+ ? 0 : (int) (alpha * 255));
+
+ if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) {
return;
}
if (mAnimationFactory.isAnimatingIntoIcon() && mAnimationFactory.isAnimationReady()) {
@@ -506,7 +512,7 @@
public void onAnimationStart(Animator animation) {
setUp();
mHomeAnim.dispatchOnStart();
- if (mTargetTaskView == null) {
+ if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) {
return;
}
Rect thumbnailBounds = new Rect();
@@ -521,7 +527,7 @@
}
private void setUp() {
- if (mTargetTaskView == null) {
+ if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) {
return;
}
RecentsView recentsView = mTargetTaskView.getRecentsView();
@@ -542,7 +548,7 @@
}
private void cleanUp() {
- if (mTargetTaskView == null) {
+ if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) {
return;
}
RecentsView recentsView = mTargetTaskView.getRecentsView();
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 4f802c9..b332652 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -34,6 +34,7 @@
import static com.android.launcher3.AbstractFloatingView.TYPE_TASK_MENU;
import static com.android.launcher3.AbstractFloatingView.getTopOpenViewWithType;
import static com.android.launcher3.BaseActivity.STATE_HANDLER_INVISIBILITY_FLAGS;
+import static com.android.launcher3.Flags.enableAdditionalHomeAnimations;
import static com.android.launcher3.Flags.enableGridOnlyOverview;
import static com.android.launcher3.Flags.enableRefactorTaskThumbnail;
import static com.android.launcher3.LauncherAnimUtils.SUCCESS_TRANSITION_PROGRESS;
@@ -4520,6 +4521,9 @@
* than the running task, when updating page offsets.
*/
public void setOffsetMidpointIndexOverride(int offsetMidpointIndexOverride) {
+ if (!enableAdditionalHomeAnimations()) {
+ return;
+ }
mOffsetMidpointIndexOverride = offsetMidpointIndexOverride;
updatePageOffsets();
}
diff --git a/quickstep/tests/multivalentTests/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsControllerTest.kt b/quickstep/tests/multivalentTests/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsControllerTest.kt
index c09dcf2..fe4e2d2 100644
--- a/quickstep/tests/multivalentTests/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsControllerTest.kt
+++ b/quickstep/tests/multivalentTests/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsControllerTest.kt
@@ -16,6 +16,7 @@
package com.android.launcher3.taskbar.allapps
+import android.animation.AnimatorTestRule
import android.content.ComponentName
import android.content.Intent
import android.os.Process
@@ -42,6 +43,7 @@
class TaskbarAllAppsControllerTest {
@get:Rule val taskbarUnitTestRule = TaskbarUnitTestRule()
+ @get:Rule val animatorTestRule = AnimatorTestRule(this)
@InjectController lateinit var allAppsController: TaskbarAllAppsController
@InjectController lateinit var overlayController: TaskbarOverlayController
@@ -166,6 +168,21 @@
assertThat(btv.hasDot()).isTrue()
}
+ @Test
+ fun testToggleSearch_searchEditTextFocused() {
+ getInstrumentation().runOnMainSync { allAppsController.toggleSearch() }
+ getInstrumentation().runOnMainSync {
+ // All Apps is now attached to window. Open animation is posted but not started.
+ }
+
+ getInstrumentation().runOnMainSync {
+ // Animation has started. Advance to end of animation.
+ animatorTestRule.advanceTimeBy(overlayController.openDuration.toLong())
+ }
+ val editText = overlayController.requestWindow().appsView.searchUiManager.editText
+ assertThat(editText?.hasFocus()).isTrue()
+ }
+
private companion object {
private val TEST_APPS =
Array(16) {
diff --git a/quickstep/tests/src/com/android/quickstep/taskbar/customization/TaskbarSpecsEvaluatorTest.kt b/quickstep/tests/src/com/android/quickstep/taskbar/customization/TaskbarSpecsEvaluatorTest.kt
index b637e7d..0bf68eb 100644
--- a/quickstep/tests/src/com/android/quickstep/taskbar/customization/TaskbarSpecsEvaluatorTest.kt
+++ b/quickstep/tests/src/com/android/quickstep/taskbar/customization/TaskbarSpecsEvaluatorTest.kt
@@ -35,13 +35,22 @@
private val taskbarSpecsEvaluator = spy(TaskbarSpecsEvaluator(taskbarFeatureEvaluator))
@Test
- fun testGetIconSizeByGrid_whenTaskbarIsTransient_withValidRowAndColumn() {
+ fun testGetIconSizeByGrid_whenTaskbarIsTransient_withValidRowAndColumnInLandscape() {
doReturn(true).whenever(taskbarFeatureEvaluator).isTransient
- assertThat(taskbarSpecsEvaluator.getIconSizeByGrid(6, 5))
+ doReturn(true).whenever(taskbarFeatureEvaluator).isLandscape
+ assertThat(taskbarSpecsEvaluator.getIconSizeByGrid(4, 4))
.isEqualTo(TaskbarIconSpecs.iconSize52dp)
}
@Test
+ fun testGetIconSizeByGrid_whenTaskbarIsTransient_withValidRowAndColumnInPortrait() {
+ doReturn(true).whenever(taskbarFeatureEvaluator).isTransient
+ doReturn(false).whenever(taskbarFeatureEvaluator).isLandscape
+ assertThat(taskbarSpecsEvaluator.getIconSizeByGrid(4, 4))
+ .isEqualTo(TaskbarIconSpecs.iconSize48dp)
+ }
+
+ @Test
fun testGetIconSizeByGrid_whenTaskbarIsTransient_withInvalidRowAndColumn() {
doReturn(true).whenever(taskbarFeatureEvaluator).isTransient
assertThat(taskbarSpecsEvaluator.getIconSizeByGrid(1, 2))
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index e9f951b..08ff6e7 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -27,8 +27,7 @@
<string name="safemode_widget_error" msgid="4863470563535682004">"Widgets disabled in Safe mode"</string>
<string name="shortcut_not_available" msgid="2536503539825726397">"Shortcut isn\'t available"</string>
<string name="home_screen" msgid="5629429142036709174">"Home"</string>
- <!-- no translation found for set_default_home_app (5808906607627586381) -->
- <skip />
+ <string name="set_default_home_app" msgid="5808906607627586381">"Set <xliff:g id="LAUNCHER_NAME">%1$s</xliff:g> as default home app in Settings"</string>
<string name="recent_task_option_split_screen" msgid="6690461455618725183">"Split screen"</string>
<string name="split_app_info_accessibility" msgid="5475288491241414932">"App info for %1$s"</string>
<string name="split_app_usage_settings" msgid="7214375263347964093">"Usage settings for %1$s"</string>
diff --git a/res/values-en-rXC/strings.xml b/res/values-en-rXC/strings.xml
index fb08c7e..fa6d1f1 100644
--- a/res/values-en-rXC/strings.xml
+++ b/res/values-en-rXC/strings.xml
@@ -27,8 +27,7 @@
<string name="safemode_widget_error" msgid="4863470563535682004">"Widgets disabled in Safe mode"</string>
<string name="shortcut_not_available" msgid="2536503539825726397">"Shortcut isn\'t available"</string>
<string name="home_screen" msgid="5629429142036709174">"Home"</string>
- <!-- no translation found for set_default_home_app (5808906607627586381) -->
- <skip />
+ <string name="set_default_home_app" msgid="5808906607627586381">"Set <xliff:g id="LAUNCHER_NAME">%1$s</xliff:g> as default home app in Settings"</string>
<string name="recent_task_option_split_screen" msgid="6690461455618725183">"Split screen"</string>
<string name="split_app_info_accessibility" msgid="5475288491241414932">"App info for %1$s"</string>
<string name="split_app_usage_settings" msgid="7214375263347964093">"Usage settings for %1$s"</string>
diff --git a/res/values-pa/strings.xml b/res/values-pa/strings.xml
index c235c3c..b287b2f 100644
--- a/res/values-pa/strings.xml
+++ b/res/values-pa/strings.xml
@@ -86,7 +86,7 @@
<string name="remove_drop_target_label" msgid="7812859488053230776">"ਹਟਾਓ"</string>
<string name="uninstall_drop_target_label" msgid="4722034217958379417">"ਅਣਸਥਾਪਤ ਕਰੋ"</string>
<string name="app_info_drop_target_label" msgid="692894985365717661">"ਐਪ ਜਾਣਕਾਰੀ"</string>
- <string name="install_private_system_shortcut_label" msgid="1616889277073184841">"ਨਿੱਜੀ ਵਜੋਂ ਸਥਾਪਤ ਕਰੋ"</string>
+ <string name="install_private_system_shortcut_label" msgid="1616889277073184841">"ਪ੍ਰਾਈਵੇਟ ਵਜੋਂ ਸਥਾਪਤ ਕਰੋ"</string>
<string name="uninstall_private_system_shortcut_label" msgid="8423460530441627982">"ਐਪ ਅਣਸਥਾਪਤ ਕਰੋ"</string>
<string name="install_drop_target_label" msgid="2539096853673231757">"ਸਥਾਪਤ ਕਰੋ"</string>
<string name="dismiss_prediction_label" msgid="3357562989568808658">"ਐਪ ਦਾ ਸੁਝਾਅ ਨਾ ਦਿਓ"</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index b2ec45d..4c4b13b 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -192,7 +192,7 @@
<string name="ps_container_settings" msgid="6059734123353320479">"Configurações do Espaço particular"</string>
<string name="ps_container_unlock_button_content_description" msgid="9181551784092204234">"Privada, desbloqueado."</string>
<string name="ps_container_lock_button_content_description" msgid="5961993384382649530">"Privada, bloqueado."</string>
- <string name="ps_container_lock_title" msgid="2640257399982364682">"Bloquear"</string>
+ <string name="ps_container_lock_title" msgid="2640257399982364682">"Bloqueio"</string>
<string name="ps_container_transition" msgid="8667331812048014412">"Espaço particular em transição"</string>
<string name="ps_add_button_label" msgid="8127988716897128773">"Instalar"</string>
<string name="ps_add_button_content_description" msgid="3254274107740952556">"Instalar apps no espaço privado"</string>
diff --git a/src/com/android/launcher3/views/ClipIconView.java b/src/com/android/launcher3/views/ClipIconView.java
index 325c1cd..f90a3e4 100644
--- a/src/com/android/launcher3/views/ClipIconView.java
+++ b/src/com/android/launcher3/views/ClipIconView.java
@@ -16,6 +16,7 @@
package com.android.launcher3.views;
import static com.android.app.animation.Interpolators.LINEAR;
+import static com.android.launcher3.Flags.enableAdditionalHomeAnimations;
import static com.android.launcher3.Utilities.boundToRange;
import static com.android.launcher3.Utilities.mapToRange;
import static com.android.launcher3.anim.AnimatorListeners.forEndCallback;
@@ -97,6 +98,9 @@
* within the clip bounds of this view.
*/
public void setTaskViewArtist(TaskViewArtist taskViewArtist) {
+ if (!enableAdditionalHomeAnimations()) {
+ return;
+ }
mTaskViewArtist = taskViewArtist;
invalidate();
}
diff --git a/src/com/android/launcher3/views/FloatingIconView.java b/src/com/android/launcher3/views/FloatingIconView.java
index 1d5a9dc..1e577be 100644
--- a/src/com/android/launcher3/views/FloatingIconView.java
+++ b/src/com/android/launcher3/views/FloatingIconView.java
@@ -18,6 +18,7 @@
import static android.view.Gravity.LEFT;
import static com.android.app.animation.Interpolators.LINEAR;
+import static com.android.launcher3.Flags.enableAdditionalHomeAnimations;
import static com.android.launcher3.Utilities.getFullDrawable;
import static com.android.launcher3.Utilities.mapToRange;
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
@@ -164,7 +165,12 @@
*/
public void update(float alpha, RectF rect, float progress, float shapeProgressStart,
float cornerRadius, boolean isOpening, int taskViewDrawAlpha) {
- setAlpha(isLaidOut() ? alpha : 0f);
+ // The non-running task home animation has some very funky first few frames because this
+ // FIV hasn't fully laid out. During those frames, hide this FIV and continue drawing the
+ // TaskView directly while transforming it in the place of this FIV. However, if we fade
+ // the TaskView at all, we need to display this FIV regardless.
+ setAlpha(!enableAdditionalHomeAnimations() || isLaidOut() || taskViewDrawAlpha < 255
+ ? alpha : 0f);
mClipIconView.update(rect, progress, shapeProgressStart, cornerRadius, isOpening, this,
mLauncher.getDeviceProfile(), taskViewDrawAlpha);