From 528bf70f61a6c161ec231d7447ac69dd4d97d1c8 Mon Sep 17 00:00:00 2001 From: Johannes Gallmann Date: Wed, 26 Mar 2025 16:41:10 +0100 Subject: [PATCH 01/21] Play haptic on ACTION_DOWN for 3-button-nav buttons Bug: 393959400 Test: Manual, i.e. verified that haptic happens on ACTION_DOWN and on long press (except for back button which doesn't have a haptic on long press). Also verified that Talkback works. Flag: EXEMPT bugfix Change-Id: Ieb1892d69268d0bfba0ead9ec38c8ee9843addef --- .../launcher3/taskbar/NavbarButtonsViewController.java | 10 +++++++++- .../launcher3/taskbar/TaskbarNavButtonController.java | 2 -- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java index f03b7d147b..76c9949daa 100644 --- a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java @@ -58,6 +58,7 @@ import android.animation.ObjectAnimator; import android.annotation.DrawableRes; import android.annotation.IdRes; import android.annotation.LayoutRes; +import android.annotation.SuppressLint; import android.content.Context; import android.content.pm.ActivityInfo.Config; import android.content.res.ColorStateList; @@ -876,6 +877,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT R.layout.taskbar_nav_button); } + @SuppressLint("ClickableViewAccessibility") private ImageView addButton(@DrawableRes int drawableId, @TaskbarButton int buttonType, ViewGroup parent, TaskbarNavButtonController navButtonController, @IdRes int id, @LayoutRes int layoutId) { @@ -895,6 +897,12 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT navButtonController.onButtonClick(buttonType, view)); buttonView.setOnLongClickListener(view -> navButtonController.onButtonLongClick(buttonType, view)); + buttonView.setOnTouchListener((v, event) -> { + if (event.getAction() == MotionEvent.ACTION_DOWN) { + buttonView.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); + } + return false; + }); } return buttonView; } @@ -935,6 +943,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT hasSentDownEvent.set(false); mHandler.postDelayed(longPressTimeout, PREDICTIVE_BACK_TIMEOUT_MS); rect.set(0, 0, v.getWidth(), v.getHeight()); + buttonView.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); } boolean isCancelled = motionEventAction == MotionEvent.ACTION_CANCEL || (!rect.contains(event.getX(), event.getY()) @@ -956,7 +965,6 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT navButtonController.sendBackKeyEvent(KeyEvent.ACTION_UP, isCancelled); if (motionEventAction == MotionEvent.ACTION_UP && !isCancelled) { buttonView.performClick(); - buttonView.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); } return false; }); diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java index 1adb2e909e..f52de63859 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java @@ -147,8 +147,6 @@ public class TaskbarNavButtonController implements TaskbarControllers.LoggableTa // prevent interactions with other buttons while back button is pressed return; } - // Provide the same haptic feedback that the system offers for virtual keys. - view.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); switch (buttonType) { case BUTTON_BACK: executeBack(/* keyEvent */ null); From 66e5325d6fed28028aa6e7822ac364b5e7b09269 Mon Sep 17 00:00:00 2001 From: Eric Sum Date: Fri, 14 Mar 2025 17:16:57 -0700 Subject: [PATCH 02/21] Add ACTION_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE latency (launcher). This measures the delay from when the user closes or minimizes the last open window in desktop mode until the animation to exit desktop mode draws its first frame. Flag: EXEMPT metric change Bug: 390544490 Test: Run `statsd_testdrive 306` and ensure that latency metric is reported. Change-Id: If4923b50feade20ba74560ed7b8d14ea2bb6f71e --- .../launcher3/QuickstepTransitionManager.java | 29 +++++++++++++++---- .../DesktopVisibilityController.kt | 20 +++++++++++-- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index 548fbefcae..6aa4ba4766 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -40,6 +40,7 @@ import static com.android.app.animation.Interpolators.DECELERATE_1_5; import static com.android.app.animation.Interpolators.DECELERATE_1_7; import static com.android.app.animation.Interpolators.EXAGGERATED_EASE; import static com.android.app.animation.Interpolators.LINEAR; +import static com.android.internal.util.LatencyTracker.ACTION_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE; import static com.android.launcher3.BaseActivity.EVENT_DESTROYED; import static com.android.launcher3.BaseActivity.INVISIBLE_ALL; import static com.android.launcher3.BaseActivity.INVISIBLE_BY_APP_TRANSITIONS; @@ -122,6 +123,7 @@ import androidx.core.graphics.ColorUtils; import com.android.app.animation.Animations; import com.android.internal.jank.Cuj; +import com.android.internal.util.LatencyTracker; import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener; import com.android.launcher3.LauncherAnimationRunner.RemoteAnimationFactory; import com.android.launcher3.anim.AnimationSuccessListener; @@ -263,6 +265,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener private RemoteTransition mLauncherOpenTransition; private final RemoteAnimationCoordinateTransfer mCoordinateTransfer; + private final LatencyTracker mLatencyTracker; private LauncherBackAnimationController mBackAnimationController; private final AnimatorListenerAdapter mForceInvisibleListener = new AnimatorListenerAdapter() { @@ -317,6 +320,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener mOpeningInterpolator = AnimationUtils.loadInterpolator(context, R.interpolator.emphasized_interpolator); mCoordinateTransfer = new RemoteAnimationCoordinateTransfer(mLauncher); + mLatencyTracker = LatencyTracker.getInstance(context); } @Override @@ -1630,14 +1634,20 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener } private void addCujInstrumentation(Animator anim, int cuj) { - anim.addListener(getCujAnimationSuccessListener(cuj)); + anim.addListener(getCujAnimationSuccessListener(cuj, /* cujPreStartCallback= */null)); + } + + private void addCujInstrumentation(Animator anim, int cuj, Runnable cujPreStartCallback) { + anim.addListener(getCujAnimationSuccessListener(cuj, cujPreStartCallback)); } private void addCujInstrumentation(RectFSpringAnim anim, int cuj) { - anim.addAnimatorListener(getCujAnimationSuccessListener(cuj)); + anim.addAnimatorListener( + getCujAnimationSuccessListener(cuj, /* cujPreStartCallback= */null)); } - private AnimationSuccessListener getCujAnimationSuccessListener(int cuj) { + private AnimationSuccessListener getCujAnimationSuccessListener( + int cuj, Runnable cujPreStartCallback) { return new AnimationSuccessListener() { @Override public void onAnimationStart(Animator animation) { @@ -1651,7 +1661,9 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener return; } mHandled = true; - + if (cujPreStartCallback != null) { + cujPreStartCallback.run(); + } InteractionJankMonitorWrapper.begin(mDragLayer, cuj); mDragLayer.post(() -> @@ -1803,8 +1815,13 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener addCujInstrumentation(rectFSpringAnim, Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME); } else { if (isFreeformAnimation(appTargets)) { - addCujInstrumentation(anim, - Cuj.CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE); + addCujInstrumentation( + anim, + Cuj.CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE, + /* cujPreStartCallback= */ () -> { + mLatencyTracker.onActionEnd( + ACTION_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE); + }); } addCujInstrumentation(anim, playFallBackAnimation ? Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK diff --git a/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.kt b/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.kt index 1ac2d7c13e..6bce2caff8 100644 --- a/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.kt +++ b/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.kt @@ -23,6 +23,7 @@ import android.util.SparseArray import android.view.Display.DEFAULT_DISPLAY import android.window.DesktopModeFlags.ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY import androidx.core.util.forEach +import com.android.internal.util.LatencyTracker import com.android.launcher3.LauncherState import com.android.launcher3.dagger.ApplicationContext import com.android.launcher3.dagger.LauncherAppComponent @@ -175,7 +176,7 @@ constructor( private var desktopTaskListener: DesktopTaskListenerImpl? init { - desktopTaskListener = DesktopTaskListenerImpl(this, context, context.displayId) + desktopTaskListener = DesktopTaskListenerImpl(this, context) systemUiProxy.setDesktopTaskListener(desktopTaskListener) lifecycleTracker.addCloseable { @@ -645,9 +646,9 @@ constructor( private class DesktopTaskListenerImpl( controller: DesktopVisibilityController, @ApplicationContext private val context: Context, - private val displayId: Int, ) : Stub() { private val controller = WeakReference(controller) + private val displayId = context.displayId override fun onListenerConnected( displayDeskStates: Array, @@ -710,7 +711,10 @@ constructor( // TODO: b/402496827 - The multi-desks backend needs to be updated to call this API only // once, not between desk switches. - override fun onExitDesktopModeTransitionStarted(transitionDuration: Int) { + override fun onExitDesktopModeTransitionStarted( + transitionDuration: Int, + shouldEndUpAtHome: Boolean, + ) { val controller = controller.get() ?: return MAIN_EXECUTOR.execute { Log.d( @@ -719,6 +723,16 @@ constructor( "duration= " + transitionDuration), ) + // If shouldEndUpAtHome is true, desktop mode is ending from the user + // closing/minimizing the last open window. If it's false, the display is + // probably transitioning to an app's full screen mode instead so this metric + // should not be logged. + if (shouldEndUpAtHome) { + LatencyTracker.getInstance(context) + .onActionStart( + LatencyTracker.ACTION_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE + ) + } if (enableMultipleDesktops(context)) { controller.notifyTaskbarDesktopModeListenersForExit(transitionDuration) } else if (controller.isInDesktopModeDeprecated) { From 552831ed28a03cdbd33e1b7af1f8b367e2f601e6 Mon Sep 17 00:00:00 2001 From: Ajinkya Chalke Date: Wed, 12 Feb 2025 18:33:22 +0000 Subject: [PATCH 03/21] [CD][Alt+Tab] Flatten Alt + Tab structure Next: - Look into sorting tasks based on last active time. - Will update task thumbnails as per latest UX. - Need to ensure the logic that determines which task has focus when overview is launched. Bug: 382769617 Test: manually run CUJs Flag: com.android.launcher3.enable_alt_tab_kqs_flatenning Change-Id: Ic1ab8a3a30af3d941e26439507e5a583540759e5 --- .../KeyboardQuickSwitchController.java | 30 +++++++- .../taskbar/KeyboardQuickSwitchView.java | 6 ++ .../KeyboardQuickSwitchViewController.java | 76 ++++++++++++++++--- .../com/android/quickstep/SystemUiProxy.kt | 13 +++- 4 files changed, 114 insertions(+), 11 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java index 16980502cd..6bd1d758a6 100644 --- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java +++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java @@ -15,6 +15,7 @@ */ package com.android.launcher3.taskbar; +import static com.android.launcher3.Flags.enableAltTabKqsFlatenning; import static com.android.launcher3.Flags.enableAltTabKqsOnConnectedDisplays; import android.app.ActivityManager; @@ -48,6 +49,7 @@ import java.util.List; import java.util.Set; import java.util.function.Consumer; import java.util.stream.Collectors; +import java.util.stream.Stream; /** * Handles initialization of the {@link KeyboardQuickSwitchViewController}. @@ -243,13 +245,39 @@ public final class KeyboardQuickSwitchController implements private void processLoadedTasks(List tasks, Set taskIdsToExclude) { mHasDesktopTask = false; mWasDesktopTaskFilteredOut = false; - if (mControllers.taskbarDesktopModeController.shouldShowDesktopTasksInTaskbar()) { + + if (enableAltTabKqsFlatenning()) { + processLoadedTasksCombined(tasks, taskIdsToExclude); + } else if (mControllers.taskbarDesktopModeController.shouldShowDesktopTasksInTaskbar()) { processLoadedTasksOnDesktop(tasks, taskIdsToExclude); } else { processLoadedTasksOutsideDesktop(tasks, taskIdsToExclude); } } + private void processLoadedTasksCombined(List tasks, Set taskIdsToExclude) { + List allTasks = tasks.stream() + .flatMap(task -> { + // In case of DesktopTasks, convert each contained task into a new DesktopTask + // this way the view controller will be able to show a thumbnail in KQS view. + if (task instanceof DesktopTask desktopTask) { + return desktopTask.getTasks().stream() + .map(singleTask -> new DesktopTask(desktopTask.getDeskId(), + desktopTask.getDisplayId(), List.of(singleTask))); + } + + return Stream.of(task); + }) + .filter(task -> !shouldExcludeTask(task, taskIdsToExclude)) + .toList(); + + // TODO(b/382769617): Sort tasks, including desktop and split, before limiting to max. + mTasks = allTasks.stream() + .limit(MAX_TASKS) + .toList(); + mNumHiddenTasks = Math.max(0, allTasks.size() - MAX_TASKS); + } + private void processLoadedTasksOutsideDesktop(List tasks, Set taskIdsToExclude) { // Only store MAX_TASK tasks, from most to least recent diff --git a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchView.java b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchView.java index 515cfe2af0..fe93a26b94 100644 --- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchView.java +++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchView.java @@ -47,11 +47,13 @@ import androidx.constraintlayout.widget.ConstraintLayout; import com.android.app.animation.Interpolators; import com.android.internal.jank.Cuj; +import com.android.launcher3.Flags; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatedFloat; import com.android.launcher3.testing.TestLogging; import com.android.launcher3.testing.shared.TestProtocol; +import com.android.quickstep.util.DesktopTask; import com.android.quickstep.util.GroupTask; import com.android.quickstep.util.SingleTask; import com.android.quickstep.util.SplitTask; @@ -285,6 +287,10 @@ public class KeyboardQuickSwitchView extends ConstraintLayout { } else if (groupTask instanceof SingleTask singleTask) { task1 = singleTask.getTask(); task2 = null; + } else if (Flags.enableAltTabKqsFlatenning() + && groupTask instanceof DesktopTask desktopTask) { + task1 = desktopTask.getTasks().get(0); + task2 = null; } else { continue; } diff --git a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java index a312d5f70b..5add5c1a44 100644 --- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java @@ -43,6 +43,7 @@ import com.android.launcher3.taskbar.overlay.TaskbarOverlayContext; import com.android.launcher3.taskbar.overlay.TaskbarOverlayDragLayer; import com.android.launcher3.views.BaseDragLayer; import com.android.quickstep.SystemUiProxy; +import com.android.quickstep.util.DesktopTask; import com.android.quickstep.util.GroupTask; import com.android.quickstep.util.SingleTask; import com.android.quickstep.util.SlideInRemoteTransition; @@ -50,6 +51,7 @@ import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.recents.model.ThumbnailData; import com.android.systemui.shared.system.InteractionJankMonitorWrapper; import com.android.systemui.shared.system.QuickStepContract; +import com.android.wm.shell.shared.desktopmode.DesktopModeTransitionSource; import com.android.wm.shell.shared.desktopmode.DesktopTaskToFrontReason; import java.io.PrintWriter; @@ -266,9 +268,11 @@ public class KeyboardQuickSwitchViewController { onStartCallback, onFinishCallback), "SlideInTransition"); + SystemUiProxy systemUiProxy = SystemUiProxy.INSTANCE.get( + mKeyboardQuickSwitchView.getContext()); if (index == mKeyboardQuickSwitchView.getDesktopTaskIndex()) { UI_HELPER_EXECUTOR.execute(() -> - SystemUiProxy.INSTANCE.get(mKeyboardQuickSwitchView.getContext()) + systemUiProxy .showDesktopApps( mKeyboardQuickSwitchView.getDisplay().getDisplayId(), slideInTransition)); @@ -284,20 +288,19 @@ public class KeyboardQuickSwitchViewController { // Ignore attempts to run the selected task if it is already running. return -1; } + + if (Flags.enableAltTabKqsFlatenning() + && tryLaunchingCombinedTask(task, slideInTransition, systemUiProxy)) { + return -1; + } + RemoteTransition remoteTransition = slideInTransition; boolean canUnminimizeDesktopTask = task instanceof SingleTask singleTask && mControllers.taskbarActivityContext.canUnminimizeDesktopTask( singleTask.getTask().key.id); if (mOnDesktop && canUnminimizeDesktopTask) { // This app is being unminimized - use our own transition runner. - remoteTransition = new RemoteTransition( - new DesktopAppLaunchTransition( - context, - UNMINIMIZE, - Cuj.CUJ_DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH, - MAIN_EXECUTOR - ), - "DesktopKeyboardQuickSwitchUnminimize"); + remoteTransition = getUnminimizeTransition(); } mControllers.taskbarActivityContext.handleGroupTaskLaunch( task, @@ -309,6 +312,61 @@ public class KeyboardQuickSwitchViewController { return -1; } + private boolean tryLaunchingCombinedTask(GroupTask task, RemoteTransition slideInTransition, + SystemUiProxy systemUiProxy) { + TaskbarActivityContext context = mControllers.taskbarActivityContext; + int taskId = task.getTasks().getFirst().key.id; + + // All DesktopTasks, irrespective of whether desktop mode is active, are launched here as + // the class DesktopTask is used in a special way by KQS view for showing thumbnails of + // freeform tasks. + if (task instanceof DesktopTask) { + boolean canUnminimizeDesktopTask = context.canUnminimizeDesktopTask(taskId); + runOnUiWithJankMonitoring(() -> { + if (!mOnDesktop) { + systemUiProxy.showDesktopApps(context.getDisplayId(), slideInTransition); + } + + systemUiProxy.showDesktopApp(taskId, + canUnminimizeDesktopTask ? getUnminimizeTransition() : null, + DesktopTaskToFrontReason.ALT_TAB); + }); + return true; + } else if (mOnDesktop && task instanceof SingleTask) { + // Use the special API if user wants to switch to a fullscreen app while in desktop. + runOnUiWithJankMonitoring( + () -> systemUiProxy.moveToFullscreen(taskId, + DesktopModeTransitionSource.KEYBOARD_SHORTCUT, slideInTransition)); + return true; + } + + // For all other cases, let TaskbarActivityContext handle launching the task. + return false; + } + + private void runOnUiWithJankMonitoring(Runnable runnable) { + Runnable onStartCallback = () -> InteractionJankMonitorWrapper.begin( + mKeyboardQuickSwitchView, Cuj.CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH); + Runnable onFinishCallback = () -> InteractionJankMonitorWrapper.end( + Cuj.CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH); + UI_HELPER_EXECUTOR.execute(() -> { + onStartCallback.run(); + runnable.run(); + onFinishCallback.run(); + }); + } + + private RemoteTransition getUnminimizeTransition() { + return new RemoteTransition( + new DesktopAppLaunchTransition( + mControllers.taskbarActivityContext, + UNMINIMIZE, + Cuj.CUJ_DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH, + MAIN_EXECUTOR + ), + "DesktopKeyboardQuickSwitchUnminimize"); + } + private void onCloseComplete() { mCloseAnimation = null; // Reset the view callbacks to prevent `onDetachedFromWindow` getting called in response to diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.kt b/quickstep/src/com/android/quickstep/SystemUiProxy.kt index cd87d93650..199283bd1b 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.kt +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.kt @@ -692,7 +692,7 @@ class SystemUiProxy @Inject constructor(@ApplicationContext private val context: /** Tells SysUI to move the dragged bubble to full screen. */ fun moveDraggedBubbleToFullscreen(key: String, dropLocation: Point) { - executeWithErrorLog({ "Failed to call moveDraggedBubbleToFullscreen"}) { + executeWithErrorLog({ "Failed to call moveDraggedBubbleToFullscreen" }) { bubbles?.moveDraggedBubbleToFullscreen(key, dropLocation) } } @@ -1132,6 +1132,17 @@ class SystemUiProxy @Inject constructor(@ApplicationContext private val context: desktopMode?.showDesktopApp(taskId, transition, toFrontReason) } + /** Call shell to move to an existing fullscreen task (given by [taskId]) from desktop. */ + @JvmOverloads + fun moveToFullscreen( + taskId: Int, + desktopModeTransitionSource: DesktopModeTransitionSource, + remoteTransition: RemoteTransition? = null, + ) = + executeWithErrorLog({ "Failed call moveToFullscreen" }) { + desktopMode?.moveToFullscreen(taskId, desktopModeTransitionSource, remoteTransition) + } + /** Set a listener on shell to get updates about desktop task state */ fun setDesktopTaskListener(listener: IDesktopTaskListener?) { desktopTaskListener = listener From ba8a3ff1761ef61b39b49fe81515f6c0008d2a7a Mon Sep 17 00:00:00 2001 From: Will Osborn Date: Thu, 27 Mar 2025 13:35:49 +0000 Subject: [PATCH 04/21] Fix launcher immutable list UnsupportedOperationException on swipe up Bug: 406740276 Flag: EXEMPT bugfix Test: locally tested Change-Id: I4dfd0434e9537103144d08fa4db96f43ee5b59a8 --- .../com/android/quickstep/TopTaskTracker.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/quickstep/src/com/android/quickstep/TopTaskTracker.java b/quickstep/src/com/android/quickstep/TopTaskTracker.java index 53344a1408..43ee447699 100644 --- a/quickstep/src/com/android/quickstep/TopTaskTracker.java +++ b/quickstep/src/com/android/quickstep/TopTaskTracker.java @@ -65,12 +65,12 @@ import com.android.wm.shell.shared.GroupedTaskInfo; import com.android.wm.shell.splitscreen.ISplitScreenListener; import java.io.PrintWriter; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.LinkedList; import java.util.List; +import java.util.stream.Stream; import javax.inject.Inject; @@ -366,21 +366,22 @@ public class TopTaskTracker extends ISplitScreenListener.Stub implements TaskSta Collections.addAll(mOrderedTaskList, tasks); } - List tasks = new ArrayList<>(mOrderedTaskList); - // Strip the pinned task and recents task. - tasks.removeIf(t -> t.taskId == mPinnedTaskId || isRecentsTask(t)); + Stream taskStream = mOrderedTaskList.stream() + // Strip the pinned task and recents task. + .filter(t -> t.taskId != mPinnedTaskId && !isRecentsTask(t)); if (enableOverviewOnConnectedDisplays()) { - tasks = tasks.stream().filter( - info -> ExternalDisplaysKt.getSafeDisplayId(info) == displayId).toList(); + taskStream = taskStream.filter( + info -> ExternalDisplaysKt.getSafeDisplayId(info) == displayId); } if (enableMultipleDesktops(mContext)) { - tasks = tasks.stream().takeWhile( - taskInfo -> !DesksUtils.isDesktopWallpaperTask(taskInfo)).toList(); + taskStream = taskStream.takeWhile( + taskInfo -> !DesksUtils.isDesktopWallpaperTask(taskInfo)); } else { - tasks.removeIf(taskInfo -> DesksUtils.isDesktopWallpaperTask(taskInfo)); + taskStream = taskStream.filter( + taskInfo -> !DesksUtils.isDesktopWallpaperTask(taskInfo)); } - return new CachedTaskInfo(tasks, mContext, displayId); + return new CachedTaskInfo(taskStream.toList(), mContext, displayId); } } From 036e1ae8d5af0606459698102d35f9ebe463a054 Mon Sep 17 00:00:00 2001 From: Liran Binyamin Date: Wed, 26 Mar 2025 16:25:34 -0400 Subject: [PATCH 05/21] Updates to bubble bar drag zones 1. Pass bubble bar size properties to DragZoneFactory for generating a drop target for the bubble bar. 2. Update the dismiss X circle position. Flag: com.android.wm.shell.enable_bubble_to_fullscreen Fixes: 404920503 Fixes: 404916611 Test: manual - turn enable_bubble_to_fullscreen flag on - drag the bubble bar and an individual bubble through the dismiss zone - observe behavior - repeat with flag off to verify existing behavior Change-Id: I877648763e3043551f678e382abd97c7e625b483 --- quickstep/res/values/dimens.xml | 2 +- .../taskbar/bubbles/BubbleDismissViewExt.kt | 1 + .../taskbar/bubbles/BubbleDragController.java | 42 +++++++++++++++---- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml index 9bde865b2e..58d2ede6b5 100644 --- a/quickstep/res/values/dimens.xml +++ b/quickstep/res/values/dimens.xml @@ -489,7 +489,7 @@ @dimen/floating_dismiss_background_size 60dp @dimen/floating_dismiss_icon_size - 50dp + 60dp 548dp 192dp 242dp diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDismissViewExt.kt b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDismissViewExt.kt index 3245fd1ed7..9f7802fe0e 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDismissViewExt.kt +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDismissViewExt.kt @@ -39,6 +39,7 @@ fun DismissView.setup() { floatingGradientColorResId = android.R.color.system_neutral1_900, backgroundResId = SharedR.drawable.floating_dismiss_background, iconResId = SharedR.drawable.floating_dismiss_ic_close, + applyMarginOverNavBarInset = false, ) ) } diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java index 3df10c0ce0..0c33916cb2 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java @@ -36,6 +36,7 @@ import com.android.wm.shell.shared.bubbles.BubbleBarLocation; import com.android.wm.shell.shared.bubbles.DeviceConfig; import com.android.wm.shell.shared.bubbles.DragZone; import com.android.wm.shell.shared.bubbles.DragZoneFactory; +import com.android.wm.shell.shared.bubbles.DragZoneFactory.BubbleBarPropertiesProvider; import com.android.wm.shell.shared.bubbles.DragZoneFactory.DesktopWindowModeChecker; import com.android.wm.shell.shared.bubbles.DragZoneFactory.SplitScreenModeChecker; import com.android.wm.shell.shared.bubbles.DraggedObject; @@ -113,8 +114,25 @@ public class BubbleDragController { return false; } }; + BubbleBarPropertiesProvider bubbleBarPropertiesProvider = + new BubbleBarPropertiesProvider() { + @Override + public int getHeight() { + return (int) mBubbleBarViewController.getBubbleBarCollapsedHeight(); + } + + @Override + public int getWidth() { + return (int) mBubbleBarViewController.getBubbleBarCollapsedWidth(); + } + + @Override + public int getBottomPadding() { + return (int) -mBubbleBarViewController.getBubbleBarTranslationY().value; + } + }; mDragZoneFactory = new DragZoneFactory(mActivity.getApplicationContext(), deviceConfig, - splitScreenModeChecker, desktopWindowModeChecker); + splitScreenModeChecker, desktopWindowModeChecker, bubbleBarPropertiesProvider); mBubbleDragZoneChangedListener = new BubbleDragZoneChangedListener(); mDropTargetManager = new DropTargetManager(mActivity.getApplicationContext(), dropTargetParent, mBubbleDragZoneChangedListener); @@ -194,9 +212,7 @@ public class BubbleDragController { protected void onDragUpdate(float x, float y, float newTx, float newTy) { bubbleView.setDragTranslationX(newTx); bubbleView.setTranslationY(newTy); - if (BubbleAnythingFlagHelper.enableBubbleToFullscreen()) { - mDropTargetManager.onDragUpdated((int) x, (int) y); - } else { + if (!BubbleAnythingFlagHelper.enableBubbleToFullscreen()) { mBubblePinController.onDragUpdate(x, y); } } @@ -305,9 +321,7 @@ public class BubbleDragController { protected void onDragUpdate(float x, float y, float newTx, float newTy) { bubbleBarView.setTranslationX(newTx); bubbleBarView.setTranslationY(newTy); - if (BubbleAnythingFlagHelper.enableBubbleToFullscreen()) { - mDropTargetManager.onDragUpdated((int) x, (int) y); - } else { + if (!BubbleAnythingFlagHelper.enableBubbleToFullscreen()) { mBubbleBarPinController.onDragUpdate(x, y); } } @@ -570,7 +584,17 @@ public class BubbleDragController { private void drag(@NonNull View view, @NonNull MotionEvent event, float dx, float dy, float x, float y) { - if (mBubbleDismissController.handleTouchEvent(event)) return; + if (BubbleAnythingFlagHelper.enableBubbleToFullscreen()) { + // notify drop target manager about the new drag location regardless of whether we + // are in the dismiss zone so that it can keep track of the current zone and update + // the drop target view + mDropTargetManager.onDragUpdated((int) x, (int) y); + } + if (mBubbleDismissController.handleTouchEvent(event)) { + // if we're dragging within the dismiss target, return immediately; the dragged + // object is manipulated by the dismiss target + return; + } final float newTx = mViewInitialPosition.x + dx; final float newTy = mViewInitialPosition.y + dy; onDragUpdate(x, y, newTx, newTy); @@ -598,7 +622,7 @@ public class BubbleDragController { } } else { mAnimator.animateToRestingState(getRestingPosition(), getCurrentVelocity(), - onComplete); + onComplete); } } mBubbleDismissController.hideDismissView(); From 472709d9ca6161df0465a46199fea4b7803c6f33 Mon Sep 17 00:00:00 2001 From: Shamali P Date: Wed, 26 Mar 2025 20:13:53 +0000 Subject: [PATCH 06/21] Delete the filter code as it will be provided differently in refactor With the dagger update the initialization happens in constructor which we would avoid once we work on refactor and move it into a repository class. The list will also be fetched from a different data source, so, makes sense to delete it at the moment. Bug: 406324964 Flag: EXEMPT BUGFIX Test: Not applicable as code is removed Change-Id: Iab8bb1e94677abf9b5b882f4d3485b002faf3e0f --- .../launcher3/WidgetPickerActivity.java | 2 +- src/com/android/launcher3/Launcher.java | 2 +- .../dagger/LauncherBaseAppComponent.java | 2 - .../model/WidgetsFilterDataProvider.kt | 53 ------------------- .../picker/model/WidgetPickerDataProvider.kt | 34 ++---------- .../util/TestSandboxModelContextWrapper.java | 3 +- .../model/WidgetPickerDataProviderTest.kt | 2 +- 7 files changed, 9 insertions(+), 89 deletions(-) delete mode 100644 src/com/android/launcher3/model/WidgetsFilterDataProvider.kt diff --git a/quickstep/src/com/android/launcher3/WidgetPickerActivity.java b/quickstep/src/com/android/launcher3/WidgetPickerActivity.java index cdae9caa5c..d8d43f1f51 100644 --- a/quickstep/src/com/android/launcher3/WidgetPickerActivity.java +++ b/quickstep/src/com/android/launcher3/WidgetPickerActivity.java @@ -167,7 +167,7 @@ public class WidgetPickerActivity extends BaseActivity implements InvariantDeviceProfile idp = mApp.getInvariantDeviceProfile(); mDeviceProfile = idp.getDeviceProfile(this); mModel = new WidgetsModel(mApp.getContext()); - mWidgetPickerDataProvider = new WidgetPickerDataProvider(this); + mWidgetPickerDataProvider = new WidgetPickerDataProvider(); setContentView(R.layout.widget_picker_activity); mDragLayer = findViewById(R.id.drag_layer); diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index f5e70dffb4..f05b76cb70 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -545,7 +545,7 @@ public class Launcher extends StatefulActivity mFocusHandler, new CellLayout(mWorkspace.getContext(), mWorkspace)); mPopupDataProvider = new PopupDataProvider(this); - mWidgetPickerDataProvider = new WidgetPickerDataProvider(this); + mWidgetPickerDataProvider = new WidgetPickerDataProvider(); PillColorProvider.getInstance(mWorkspace.getContext()).registerObserver(); boolean internalStateHandled = ACTIVITY_TRACKER.handleCreate(this); diff --git a/src/com/android/launcher3/dagger/LauncherBaseAppComponent.java b/src/com/android/launcher3/dagger/LauncherBaseAppComponent.java index c95c376290..0974403e0d 100644 --- a/src/com/android/launcher3/dagger/LauncherBaseAppComponent.java +++ b/src/com/android/launcher3/dagger/LauncherBaseAppComponent.java @@ -29,7 +29,6 @@ import com.android.launcher3.graphics.ThemeManager; import com.android.launcher3.icons.LauncherIcons.IconPool; import com.android.launcher3.model.ItemInstallQueue; import com.android.launcher3.model.LoaderCursor.LoaderCursorFactory; -import com.android.launcher3.model.WidgetsFilterDataProvider; import com.android.launcher3.pm.InstallSessionHelper; import com.android.launcher3.pm.UserCache; import com.android.launcher3.util.ApiWrapper; @@ -87,7 +86,6 @@ public interface LauncherBaseAppComponent { RemoveAnimationSettingsTracker getRemoveAnimationSettingsTracker(); LauncherAppState getLauncherAppState(); GridCustomizationsProxy getGridCustomizationsProxy(); - WidgetsFilterDataProvider getWidgetsFilterDataProvider(); LoaderCursorFactory getLoaderCursorFactory(); WidgetHolderFactory getWidgetHolderFactory(); diff --git a/src/com/android/launcher3/model/WidgetsFilterDataProvider.kt b/src/com/android/launcher3/model/WidgetsFilterDataProvider.kt deleted file mode 100644 index 90d6fb2594..0000000000 --- a/src/com/android/launcher3/model/WidgetsFilterDataProvider.kt +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.launcher3.model - -import com.android.launcher3.dagger.LauncherAppSingleton -import java.util.function.Predicate -import javax.inject.Inject - -/** Helper for the widgets model to load the filters that can be applied to available widgets. */ -@LauncherAppSingleton -open class WidgetsFilterDataProvider @Inject constructor() { - - /** Filter that should be applied to the widget predictions */ - open val predictedWidgetsFilter: Predicate? = null - - /** - * Filter that should be applied to the widgets list to see which widgets can be shown by - * default. - */ - open val defaultWidgetsFilter: Predicate? = null - - protected val listeners = mutableListOf() - - /** Adds a callback for listening to filter changes */ - fun addFilterChangeCallback(callback: WidgetsFilterLoadedCallback) { - listeners.add(callback) - } - - /** Removes a previously added callback */ - fun removeFilterChangeCallback(callback: WidgetsFilterLoadedCallback) { - listeners.remove(callback) - } - - /** Interface for the model callback to be invoked when filters are loaded. */ - interface WidgetsFilterLoadedCallback { - /** Method called back when widget filters are loaded */ - fun onWidgetsFilterLoaded() - } -} diff --git a/src/com/android/launcher3/widget/picker/model/WidgetPickerDataProvider.kt b/src/com/android/launcher3/widget/picker/model/WidgetPickerDataProvider.kt index 5b97a49536..16bbfd6197 100644 --- a/src/com/android/launcher3/widget/picker/model/WidgetPickerDataProvider.kt +++ b/src/com/android/launcher3/widget/picker/model/WidgetPickerDataProvider.kt @@ -16,11 +16,7 @@ package com.android.launcher3.widget.picker.model -import android.content.Context -import com.android.launcher3.dagger.LauncherComponentProvider.appComponent import com.android.launcher3.model.WidgetItem -import com.android.launcher3.model.WidgetsFilterDataProvider -import com.android.launcher3.model.WidgetsFilterDataProvider.WidgetsFilterLoadedCallback import com.android.launcher3.model.data.ItemInfo import com.android.launcher3.widget.model.WidgetsListBaseEntry import com.android.launcher3.widget.picker.model.data.WidgetPickerData @@ -33,11 +29,7 @@ import java.util.function.Predicate * Provides [WidgetPickerData] to various views such as widget picker, app-specific widget picker, * widgets shortcut. */ -class WidgetPickerDataProvider(private val filterProvider: WidgetsFilterDataProvider) : - WidgetsFilterLoadedCallback { - - constructor(context: Context) : this(context.appComponent.widgetsFilterDataProvider) - +class WidgetPickerDataProvider { /** All the widgets data provided for the views */ private var mWidgetPickerData: WidgetPickerData = WidgetPickerData() @@ -52,19 +44,11 @@ class WidgetPickerDataProvider(private val filterProvider: WidgetsFilterDataProv this.changeListener = changeListener } - init { - filterProvider.addFilterChangeCallback(this) - } - /** Returns the current snapshot of [WidgetPickerData]. */ fun get(): WidgetPickerData { return mWidgetPickerData } - override fun onWidgetsFilterLoaded() { - setWidgets(allWidgets) - } - /** * Updates the widgets available to the widget picker. * @@ -73,19 +57,11 @@ class WidgetPickerDataProvider(private val filterProvider: WidgetsFilterDataProv fun setWidgets(allWidgets: List) { this.allWidgets = allWidgets - val currentFilter = filterProvider.defaultWidgetsFilter - val finalFilter = - when { - currentFilter != null && hostSpecifiedDefaultWidgetsFilter != null -> - currentFilter.and(hostSpecifiedDefaultWidgetsFilter) - hostSpecifiedDefaultWidgetsFilter != null -> hostSpecifiedDefaultWidgetsFilter - else -> currentFilter - } - + val defaultWidgetsFilter = hostSpecifiedDefaultWidgetsFilter val defaultWidgets = - if (finalFilter != null) + if (defaultWidgetsFilter != null) allWidgets - .map { it.copy().apply { mWidgets.removeIf(finalFilter) } } + .map { it.copy().apply { mWidgets.removeIf(defaultWidgetsFilter) } } .filter { it.mWidgets.isNotEmpty() } else emptyList() @@ -111,7 +87,7 @@ class WidgetPickerDataProvider(private val filterProvider: WidgetsFilterDataProv } fun destroy() { - filterProvider.removeFilterChangeCallback(this) + changeListener = null } interface WidgetPickerDataChangeListener { diff --git a/tests/multivalentTests/src/com/android/launcher3/util/TestSandboxModelContextWrapper.java b/tests/multivalentTests/src/com/android/launcher3/util/TestSandboxModelContextWrapper.java index acd17d1586..8be13412e9 100644 --- a/tests/multivalentTests/src/com/android/launcher3/util/TestSandboxModelContextWrapper.java +++ b/tests/multivalentTests/src/com/android/launcher3/util/TestSandboxModelContextWrapper.java @@ -28,7 +28,6 @@ import com.android.launcher3.allapps.ActivityAllAppsContainerView; import com.android.launcher3.allapps.AllAppsStore; import com.android.launcher3.allapps.AlphabeticalAppsList; import com.android.launcher3.model.BgDataModel; -import com.android.launcher3.model.WidgetsFilterDataProvider; import com.android.launcher3.model.data.AppInfo; import com.android.launcher3.pm.UserCache; import com.android.launcher3.popup.PopupDataProvider; @@ -59,7 +58,7 @@ public class TestSandboxModelContextWrapper extends ActivityContextWrapper imple private final PopupDataProvider mPopupDataProvider = new PopupDataProvider(this); private final WidgetPickerDataProvider mWidgetPickerDataProvider = - new WidgetPickerDataProvider(new WidgetsFilterDataProvider()); + new WidgetPickerDataProvider(); protected final UserCache mUserCache; public TestSandboxModelContextWrapper(SandboxContext base) { diff --git a/tests/multivalentTests/src/com/android/launcher3/widget/picker/model/WidgetPickerDataProviderTest.kt b/tests/multivalentTests/src/com/android/launcher3/widget/picker/model/WidgetPickerDataProviderTest.kt index c1827bc66d..766fb780be 100644 --- a/tests/multivalentTests/src/com/android/launcher3/widget/picker/model/WidgetPickerDataProviderTest.kt +++ b/tests/multivalentTests/src/com/android/launcher3/widget/picker/model/WidgetPickerDataProviderTest.kt @@ -80,7 +80,7 @@ class WidgetPickerDataProviderTest { userHandle = UserHandle.CURRENT context = ActivityContextWrapper(ApplicationProvider.getApplicationContext()) testInvariantProfile = LauncherAppState.getIDP(context) - underTest = WidgetPickerDataProvider(context) + underTest = WidgetPickerDataProvider() doAnswer { invocation: InvocationOnMock -> val componentWithLabel = invocation.getArgument(0) as CachedObject componentWithLabel.getComponent().shortClassName From b988ca81b0c5a5cbcb04e8958d2cf0d720389dd8 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Thu, 27 Mar 2025 17:20:44 -0400 Subject: [PATCH 07/21] Update SplitSelectDataHolderTest for HSUM Test: atest NexusLauncherTests:com.android.quickstep.util.SplitSelectDataHolderTest Flag: EXEMPT test Fixes: 398855338 Change-Id: Ia224be5291d9aa37f76ec0e1ac3d8096ec73d7c0 --- .../com/android/quickstep/util/SplitSelectDataHolderTest.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickstep/tests/src/com/android/quickstep/util/SplitSelectDataHolderTest.kt b/quickstep/tests/src/com/android/quickstep/util/SplitSelectDataHolderTest.kt index b4f1692604..dfb48d1dca 100644 --- a/quickstep/tests/src/com/android/quickstep/util/SplitSelectDataHolderTest.kt +++ b/quickstep/tests/src/com/android/quickstep/util/SplitSelectDataHolderTest.kt @@ -22,6 +22,7 @@ import android.app.ActivityTaskManager.INVALID_TASK_ID import android.content.Context import android.content.ContextWrapper import android.content.Intent +import android.os.Process import android.os.UserHandle import androidx.test.platform.app.InstrumentationRegistry import com.android.launcher3.model.data.ItemInfo @@ -54,7 +55,7 @@ class SplitSelectDataHolderTest { private val sampleTaskInfo = RunningTaskInfo() private val sampleTaskId = 10 private val sampleTaskId2 = 11 - private val sampleUser = UserHandle(0) + private val sampleUser = UserHandle(Process.myUserHandle().identifier) private val sampleIntent = Intent() private val sampleIntent2 = Intent() private val sampleShortcut = Intent() From 8fbd61aca7b7812f751491fbd6df5d325bf5b29c Mon Sep 17 00:00:00 2001 From: minch Date: Thu, 27 Mar 2025 05:50:53 +0000 Subject: [PATCH 08/21] Create RemoteTargetHandler based on GroupedTaskInfo Inside `RemoteTargetGluer`, create the `RemoteTargetHandle` based on `GroupedTaskInfo`. Bug: 406340124 Flag: com.android.window.flags.enable_multiple_desktops_frontend Flag: com.android.window.flags.enable_multiple_desktops_backend Test: m Change-Id: I0603d0b05fbc4fa8042ef1da27b2cf95226969d9 --- .../android/quickstep/AbsSwipeUpHandler.java | 16 +++++++++- .../android/quickstep/RemoteTargetGluer.java | 30 +++++++++++++------ .../quickstep/SwipeUpAnimationLogic.java | 10 ++++++- 3 files changed, 45 insertions(+), 11 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 48630b11d3..1277c331c9 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -961,7 +961,21 @@ public abstract class AbsSwipeUpHandler< public void onRecentsAnimationStart(RecentsAnimationController controller, RecentsAnimationTargets targets, @Nullable TransitionInfo transitionInfo) { super.onRecentsAnimationStart(controller, targets, transitionInfo); - if (targets.hasDesktopTasks(mContext)) { + boolean forDesktop; + if (DesktopModeStatus.enableMultipleDesktops(mContext)) { + GroupedTaskInfo groupedTaskInfo; + if (mGestureState.getRunningTask() != null + && (groupedTaskInfo = + mGestureState.getRunningTask().getPlaceholderGroupedTaskInfo( + /* splitTaskIds = */ null)) != null) { + forDesktop = groupedTaskInfo.isBaseType(GroupedTaskInfo.TYPE_DESK); + } else { + forDesktop = false; + } + } else { + forDesktop = targets.hasDesktopTasks(mContext); + } + if (forDesktop) { mRemoteTargetHandles = mTargetGluer.assignTargetsForDesktop(targets, transitionInfo); } else { int untrimmedAppCount = mRemoteTargetHandles.length; diff --git a/quickstep/src/com/android/quickstep/RemoteTargetGluer.java b/quickstep/src/com/android/quickstep/RemoteTargetGluer.java index 943f543809..d85326e674 100644 --- a/quickstep/src/com/android/quickstep/RemoteTargetGluer.java +++ b/quickstep/src/com/android/quickstep/RemoteTargetGluer.java @@ -18,6 +18,7 @@ package com.android.quickstep; import static com.android.quickstep.util.SplitScreenUtils.convertShellSplitBoundsToLauncher; import static com.android.wm.shell.shared.split.SplitBounds.KEY_EXTRA_SPLIT_BOUNDS; +import static com.android.wm.shell.shared.desktopmode.DesktopModeStatus.enableMultipleDesktops; import android.app.WindowConfiguration; import android.content.Context; @@ -34,6 +35,7 @@ import com.android.launcher3.util.SplitConfigurationOptions; import com.android.quickstep.util.AnimatorControllerWithResistance; import com.android.quickstep.util.TaskViewSimulator; import com.android.quickstep.util.TransformParams; +import com.android.wm.shell.shared.GroupedTaskInfo; import com.android.wm.shell.shared.split.SplitBounds; import java.util.ArrayList; @@ -67,21 +69,31 @@ public class RemoteTargetGluer { * Use this constructor if you want the number of handles created to match the number of active * running tasks */ - public RemoteTargetGluer(Context context, BaseContainerInterface sizingStrategy) { + public RemoteTargetGluer(Context context, BaseContainerInterface sizingStrategy, + @Nullable GroupedTaskInfo groupedTaskInfo) { // TODO: b/403344864 Make sure init with correct number of RemoteTargetHandle with // multi-desks feature enabled as well. - int visibleTasksCount = DesktopVisibilityController.INSTANCE.get(context) - .getVisibleDesktopTasksCountDeprecated(); - if (visibleTasksCount > 0) { - // Allocate +1 to account for a new task added to the desktop mode - int numHandles = visibleTasksCount + 1; - init(context, sizingStrategy, numHandles, true /* forDesktop */); - return; + if (enableMultipleDesktops(context)) { + if (groupedTaskInfo != null && groupedTaskInfo.isBaseType(GroupedTaskInfo.TYPE_DESK)) { + // Allocate +1 to account for the DesktopWallpaperActivity added to the desk. + int numHandles = groupedTaskInfo.getTaskInfoList().size() + 1; + init(context, sizingStrategy, numHandles, /* forDesktop = */ true); + return; + } + } else { + int visibleTasksCount = DesktopVisibilityController.INSTANCE.get(context) + .getVisibleDesktopTasksCountDeprecated(); + if (visibleTasksCount > 0) { + // Allocate +1 to account for the DesktopWallpaperActivity added to the desk. + int numHandles = visibleTasksCount + 1; + init(context, sizingStrategy, numHandles, /* forDesktop = */ true); + return; + } } // Assume 2 handles needed for split, scale down as needed later on when we actually // get remote targets - init(context, sizingStrategy, DEFAULT_NUM_HANDLES, false /* forDesktop */); + init(context, sizingStrategy, DEFAULT_NUM_HANDLES, /* forDesktop = */ false); } private void init(Context context, BaseContainerInterface sizingStrategy, int numHandles, diff --git a/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java b/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java index 233f0a9e4f..850bc20c29 100644 --- a/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java +++ b/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java @@ -53,6 +53,7 @@ import com.android.quickstep.util.TransformParams; import com.android.quickstep.util.TransformParams.BuilderProxy; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; +import com.android.wm.shell.shared.GroupedTaskInfo; import java.util.Arrays; import java.util.function.Consumer; @@ -90,7 +91,14 @@ public abstract class SwipeUpAnimationLogic implements updateIsGestureForSplit(TopTaskTracker.INSTANCE.get(context) .getRunningSplitTaskIds().length); - mTargetGluer = new RemoteTargetGluer(mContext, mGestureState.getContainerInterface()); + GroupedTaskInfo groupedTaskInfo = null; + if (mGestureState.getRunningTask() != null) { + groupedTaskInfo = + mGestureState.getRunningTask().getPlaceholderGroupedTaskInfo( + /* splitTaskIds = */ null); + } + mTargetGluer = new RemoteTargetGluer(mContext, mGestureState.getContainerInterface(), + groupedTaskInfo); mRemoteTargetHandles = mTargetGluer.getRemoteTargetHandles(); RotationTouchHelper rotationTouchHelper = RotationTouchHelper.INSTANCE.get(context); runActionOnRemoteHandles(remoteTargetHandle -> From f46ebe03781e8d60f212767dc9a12b18eed72bf7 Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Wed, 26 Mar 2025 17:06:39 -0700 Subject: [PATCH 09/21] Control stash handle visibility directly Stash handle alpha animator was set to control the visibility of the view. This caused issues with the state as sometimes the alpha animation conflicted with the state of the bubble bar. And caused the handle to be visible when the bubble bar (or handle) should not be. Remove the ability for the handle alpha animator to manage the visibility. We already have logic in place to ensure that the stash handle is visible or invisible based on the state. And it is not needed for the animator to manage it. Bug: 392121302 Flag: com.android.wm.shell.enable_bubble_bar Test: atest NexusLauncherRoboTests Test: move an app to bubble, move it back to fullscreen, check that handle is hidden Test: check that handle is hidden and shown when in app and opening notif shade Test: check that handle is hidden and shown when in app and locking and unlocking device Test: check that handle is shown when receiving bubbles in app and the bar stashes after showing new bubbles Change-Id: I4af8b4fa38f63b3cbc01f9cf59e66d7fc651ab13 --- .../taskbar/bubbles/BubbleStashedHandleViewController.java | 1 - .../taskbar/bubbles/stashing/TransientBubbleStashController.kt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java index ec540e0088..16e24a18cc 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java @@ -85,7 +85,6 @@ public class BubbleStashedHandleViewController { mActivity = activity; mStashedHandleView = stashedHandleView; mStashedHandleAlpha = new MultiValueAlpha(mStashedHandleView, 1); - mStashedHandleAlpha.setUpdateVisibility(true); } /** Initialize controller. */ diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/stashing/TransientBubbleStashController.kt b/quickstep/src/com/android/launcher3/taskbar/bubbles/stashing/TransientBubbleStashController.kt index 82bb071bc3..fd6155c1c2 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/stashing/TransientBubbleStashController.kt +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/stashing/TransientBubbleStashController.kt @@ -556,6 +556,7 @@ class TransientBubbleStashController( ) { if (bubbleBarViewController.isHiddenForNoBubbles) { // If there are no bubbles the bar and handle are invisible, nothing to do here. + cancelAnimation() return } val isStashed = stash && !isBubblesShowingOnHome && !isBubblesShowingOnOverview From 5c1534b58d79b44791402a7382501a306db65a55 Mon Sep 17 00:00:00 2001 From: Sihua Ma Date: Thu, 27 Mar 2025 22:22:37 +0000 Subject: [PATCH 10/21] Enable previewing themed icon in wallpaper picker Test: Presubmit Flag: com.android.systemui.shared.new_customization_picker_ui Bug: 406813938 Change-Id: I9377db41ac422cd80e7af434f28a5b16cdbd02d2 --- .../graphics/GridCustomizationsProxy.java | 4 ++-- .../graphics/LauncherPreviewRenderer.java | 9 ++++++--- .../graphics/PreviewSurfaceRenderer.java | 20 ++++++++++++++++++- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/com/android/launcher3/graphics/GridCustomizationsProxy.java b/src/com/android/launcher3/graphics/GridCustomizationsProxy.java index d8a10c16bd..f78fc3d054 100644 --- a/src/com/android/launcher3/graphics/GridCustomizationsProxy.java +++ b/src/com/android/launcher3/graphics/GridCustomizationsProxy.java @@ -387,8 +387,8 @@ public class GridCustomizationsProxy implements ProxyProvider { break; case MESSAGE_ID_UPDATE_ICON_THEMED: if (Flags.newCustomizationPickerUi()) { - Boolean iconThemed = message.getData().getBoolean(BOOLEAN_VALUE); - // TODO Update icon themed in the preview + boolean iconThemed = message.getData().getBoolean(BOOLEAN_VALUE); + renderer.updateTheme(iconThemed); } break; default: diff --git a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java index a062a54ee3..b71ce9ca14 100644 --- a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java +++ b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java @@ -30,6 +30,7 @@ import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION; import static com.android.launcher3.Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET; import static com.android.launcher3.graphics.ThemeManager.PREF_ICON_SHAPE; +import static com.android.launcher3.graphics.ThemeManager.THEMED_ICONS; import static com.android.launcher3.model.ModelUtils.currentScreenContentFilter; import static com.android.launcher3.widget.LauncherWidgetHolder.APPWIDGET_HOST_ID; @@ -154,12 +155,13 @@ public class LauncherPreviewRenderer extends BaseContext private final File mDbDir; - public PreviewContext(Context base, String gridName, String shapeKey) { - this(base, gridName, shapeKey, APPWIDGET_HOST_ID, null); + public PreviewContext(Context base, String gridName, String shapeKey, + boolean isMonoThemeEnabled) { + this(base, gridName, shapeKey, APPWIDGET_HOST_ID, null, isMonoThemeEnabled); } public PreviewContext(Context base, String gridName, String shapeKey, - int widgetHostId, @Nullable String layoutXml) { + int widgetHostId, @Nullable String layoutXml, boolean isMonoThemeEnabled) { super(base); String randomUid = UUID.randomUUID().toString(); mPrefName = "preview-" + randomUid; @@ -167,6 +169,7 @@ public class LauncherPreviewRenderer extends BaseContext new ProxyPrefs(this, getSharedPreferences(mPrefName, MODE_PRIVATE)); prefs.put(GRID_NAME, gridName); prefs.put(PREF_ICON_SHAPE, shapeKey); + prefs.put(THEMED_ICONS, isMonoThemeEnabled); PreviewAppComponent.Builder builder = DaggerLauncherPreviewRenderer_PreviewAppComponent.builder().bindPrefs(prefs); diff --git a/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java b/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java index 93e5f325bf..130a8d9be8 100644 --- a/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java +++ b/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java @@ -25,6 +25,7 @@ import static com.android.launcher3.LauncherPrefs.GRID_NAME; import static com.android.launcher3.WorkspaceLayoutManager.FIRST_SCREEN_ID; import static com.android.launcher3.WorkspaceLayoutManager.SECOND_SCREEN_ID; import static com.android.launcher3.graphics.ThemeManager.PREF_ICON_SHAPE; +import static com.android.launcher3.graphics.ThemeManager.THEMED_ICONS; import static com.android.launcher3.provider.LauncherDbUtils.selectionForWorkspaceScreen; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.Executors.MODEL_EXECUTOR; @@ -103,6 +104,7 @@ public class PreviewSurfaceRenderer { private String mGridName; private String mShapeKey; private String mLayoutXml; + private boolean mIsMonoThemeEnabled; @Nullable private Boolean mDarkMode; private boolean mDestroyed = false; @@ -132,6 +134,7 @@ public class PreviewSurfaceRenderer { mGridName = LauncherPrefs.get(context).get(GRID_NAME); } mShapeKey = LauncherPrefs.get(context).get(PREF_ICON_SHAPE); + mIsMonoThemeEnabled = LauncherPrefs.get(context).get(THEMED_ICONS); mWallpaperColors = bundle.getParcelable(KEY_COLORS); if (Flags.newCustomizationPickerUi()) { updateColorOverrides(bundle); @@ -248,6 +251,19 @@ public class PreviewSurfaceRenderer { loadAsync(); } + /** + * Update whether to enable monochrome themed icon + * + * @param isMonoThemeEnabled True if enabling mono themed icons + */ + public void updateTheme(boolean isMonoThemeEnabled) { + if (mIsMonoThemeEnabled == isMonoThemeEnabled) { + return; + } + mIsMonoThemeEnabled = isMonoThemeEnabled; + loadAsync(); + } + /** * Hides the components in the bottom row. * @@ -347,6 +363,7 @@ public class PreviewSurfaceRenderer { final Context inflationContext = getPreviewContext(); if (!mGridName.equals(LauncherPrefs.INSTANCE.get(mContext).get(GRID_NAME)) || !mShapeKey.equals(LauncherPrefs.INSTANCE.get(mContext).get(PREF_ICON_SHAPE)) + || mIsMonoThemeEnabled != LauncherPrefs.INSTANCE.get(mContext).get(THEMED_ICONS) || !TextUtils.isEmpty(mLayoutXml)) { boolean isCustomLayout = extendibleThemeManager() && !TextUtils.isEmpty(mLayoutXml); @@ -354,7 +371,8 @@ public class PreviewSurfaceRenderer { // Start the migration PreviewContext previewContext = new PreviewContext( - inflationContext, mGridName, mShapeKey, widgetHostId, mLayoutXml); + inflationContext, mGridName, mShapeKey, widgetHostId, mLayoutXml, + mIsMonoThemeEnabled); PreviewAppComponent appComponent = (PreviewAppComponent) LauncherComponentProvider.get(previewContext); From 1f1f4a6267b33142d17bffdfa477bad21d1ec051 Mon Sep 17 00:00:00 2001 From: minch Date: Thu, 27 Mar 2025 23:42:40 +0000 Subject: [PATCH 11/21] Get DesktopTaskView from `deskId` Fix the bug introduced by ag/32547343. Getting the corresponding `DesktopTaskView` from the `deskId` instead of `deskDisplayId`. Bug: 406340124 Test: m Flag: com.android.window.flags.enable_multiple_desktops_frontend Flag: com.android.window.flags.enable_multiple_desktops_backend Change-Id: Ifaa9a9602cb95c871dee16f874c2b4a51404aad1 --- quickstep/src/com/android/quickstep/views/RecentsViewUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsViewUtils.kt b/quickstep/src/com/android/quickstep/views/RecentsViewUtils.kt index 67f5e9589b..f873778f31 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsViewUtils.kt +++ b/quickstep/src/com/android/quickstep/views/RecentsViewUtils.kt @@ -548,7 +548,7 @@ class RecentsViewUtils(private val recentsView: RecentsView<*, *>) : DesktopVisi when { groupedTaskInfo.isBaseType(GroupedTaskInfo.TYPE_DESK) && enableMultipleDesktops(recentsView.context) -> - getDesktopTaskViewForDeskId(groupedTaskInfo.deskDisplayId) + getDesktopTaskViewForDeskId(groupedTaskInfo.deskId) groupedTaskInfo.isBaseType(GroupedTaskInfo.TYPE_DESK) && groupedTaskInfo.taskInfoList.size == 1 -> From 8d72503263e8108aa78a527dde1487eb60c867f6 Mon Sep 17 00:00:00 2001 From: Schneider Victor-Tulias Date: Thu, 27 Mar 2025 16:23:45 -0400 Subject: [PATCH 12/21] Forcefully finish recents animations when launcher is detroyed If launcher is destroyed while the recents animation start is pending, then the taskanimationmanager and absswipeuphandler states are not properly cleaned up. Adding a new cleanup flow to handle this case. Flag: EXEMPT bug fix Fixes: 405642423 Test: adb shell cmd uimode night yes/no while TaskAnimationManager.mRecentsAnimationStartPending == true Change-Id: I7bf1fc4fc07859f92d7aec6cd78deafa1214dd17 --- .../android/quickstep/AbsSwipeUpHandler.java | 19 +++--- .../quickstep/TaskAnimationManager.java | 42 +++++++++++-- .../util/ActiveGestureProtoLogProxy.java | 9 +++ .../quickstep/TaskAnimationManagerTest.java | 61 +++++++++++++++++++ 4 files changed, 116 insertions(+), 15 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 48630b11d3..f803709a46 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -221,15 +221,6 @@ public abstract class AbsSwipeUpHandler< // The previous task view type before the user quick switches between tasks private TaskViewType mPreviousTaskViewType; - private final Runnable mLauncherOnDestroyCallback = () -> { - ActiveGestureProtoLogProxy.logLauncherDestroyed(); - mRecentsView.removeOnScrollChangedListener(mOnRecentsScrollListener); - mRecentsView = null; - mContainer = null; - mStateCallback.clearState(STATE_LAUNCHER_PRESENT); - mRecentsAnimationStartCallbacks.clear(); - }; - private static int FLAG_COUNT = 0; private static int getNextStateFlag(String name) { if (DEBUG_STATES) { @@ -356,6 +347,16 @@ public abstract class AbsSwipeUpHandler< private final SwipePipToHomeAnimator[] mSwipePipToHomeAnimators = new SwipePipToHomeAnimator[2]; + private final Runnable mLauncherOnDestroyCallback = () -> { + ActiveGestureProtoLogProxy.logLauncherDestroyed(); + mRecentsView.removeOnScrollChangedListener(mOnRecentsScrollListener); + mRecentsView = null; + mContainer = null; + mStateCallback.clearState(STATE_LAUNCHER_PRESENT); + mRecentsAnimationStartCallbacks.clear(); + mTaskAnimationManager.onLauncherDestroyed(); + }; + // Interpolate RecentsView scale from start of quick switch scroll until this scroll threshold private final float mQuickSwitchScaleScrollThreshold; diff --git a/quickstep/src/com/android/quickstep/TaskAnimationManager.java b/quickstep/src/com/android/quickstep/TaskAnimationManager.java index cf0a3d570f..e552cd978b 100644 --- a/quickstep/src/com/android/quickstep/TaskAnimationManager.java +++ b/quickstep/src/com/android/quickstep/TaskAnimationManager.java @@ -425,22 +425,29 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn public void finishRunningRecentsAnimation(boolean toHome) { finishRunningRecentsAnimation(toHome, false /* forceFinish */, null /* forceFinishCb */); } + public void finishRunningRecentsAnimation( + boolean toHome, boolean forceFinish, Runnable forceFinishCb) { + finishRunningRecentsAnimation(toHome, forceFinish, forceFinishCb, mController); + } /** * Finishes the running recents animation. * @param forceFinish will synchronously finish the controller */ - public void finishRunningRecentsAnimation(boolean toHome, boolean forceFinish, - Runnable forceFinishCb) { - if (mController != null) { + public void finishRunningRecentsAnimation( + boolean toHome, + boolean forceFinish, + @Nullable Runnable forceFinishCb, + @Nullable RecentsAnimationController controller) { + if (controller != null) { ActiveGestureProtoLogProxy.logFinishRunningRecentsAnimation(toHome); if (forceFinish) { - mController.finishController(toHome, forceFinishCb, false /* sendUserLeaveHint */, + controller.finishController(toHome, forceFinishCb, false /* sendUserLeaveHint */, true /* forceFinish */); } else { Utilities.postAsyncCallback(MAIN_EXECUTOR.getHandler(), toHome - ? mController::finishAnimationToHome - : mController::finishAnimationToApp); + ? controller::finishAnimationToHome + : controller::finishAnimationToApp); } } } @@ -465,6 +472,29 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn return mController != null; } + void onLauncherDestroyed() { + if (!mRecentsAnimationStartPending) { + return; + } + if (mCallbacks == null) { + return; + } + ActiveGestureProtoLogProxy.logQueuingForceFinishRecentsAnimation(); + mCallbacks.addListener(new RecentsAnimationCallbacks.RecentsAnimationListener() { + @Override + public void onRecentsAnimationStart( + RecentsAnimationController controller, + RecentsAnimationTargets targets, + @Nullable TransitionInfo transitionInfo) { + finishRunningRecentsAnimation( + /* toHome= */ false, + /* forceFinish= */ true, + /* forceFinishCb= */ null, + controller); + } + }); + } + /** * Cleans up the recents animation entirely. */ diff --git a/quickstep/src_protolog/com/android/quickstep/util/ActiveGestureProtoLogProxy.java b/quickstep/src_protolog/com/android/quickstep/util/ActiveGestureProtoLogProxy.java index 2532fcf8cf..1c8656c54b 100644 --- a/quickstep/src_protolog/com/android/quickstep/util/ActiveGestureProtoLogProxy.java +++ b/quickstep/src_protolog/com/android/quickstep/util/ActiveGestureProtoLogProxy.java @@ -570,4 +570,13 @@ public class ActiveGestureProtoLogProxy { "OtherActivityInputConsumer.startTouchTrackingForWindowAnimation: " + "interactionHandler=%s", interactionHandler); } + + public static void logQueuingForceFinishRecentsAnimation() { + ActiveGestureLog.INSTANCE.addLog("Launcher destroyed while mRecentsAnimationStartPending ==" + + " true, queuing a callback to clean the pending animation up on start", + /* gestureEvent= */ ON_START_RECENTS_ANIMATION); + if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return; + ProtoLog.d(ACTIVE_GESTURE_LOG, "Launcher destroyed while mRecentsAnimationStartPending ==" + + " true, queuing a callback to clean the pending animation up on start"); + } } diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/TaskAnimationManagerTest.java b/quickstep/tests/multivalentTests/src/com/android/quickstep/TaskAnimationManagerTest.java index fd88a5cb27..75b59d734a 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/TaskAnimationManagerTest.java +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/TaskAnimationManagerTest.java @@ -19,19 +19,30 @@ package com.android.quickstep; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import android.app.ActivityManager; import android.app.ActivityOptions; import android.content.Context; import android.content.Intent; +import android.content.res.Configuration; +import android.graphics.Rect; +import android.os.Bundle; import android.view.Display; +import android.view.RemoteAnimationTarget; +import android.view.SurfaceControl; +import android.window.TransitionInfo; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; import androidx.test.platform.app.InstrumentationRegistry; +import com.android.systemui.shared.system.RecentsAnimationControllerCompat; + import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -80,6 +91,56 @@ public class TaskAnimationManagerTest { optionsCaptor.getValue().getPendingIntentBackgroundActivityStartMode()); } + @Test + public void testLauncherDestroyed_whileRecentsAnimationStartPending_finishesAnimation() { + final GestureState gestureState = mock(GestureState.class); + final ArgumentCaptor listenerCaptor = + ArgumentCaptor.forClass(RecentsAnimationCallbacks.class); + final RecentsAnimationControllerCompat controllerCompat = + mock(RecentsAnimationControllerCompat.class); + final RemoteAnimationTarget remoteAnimationTarget = new RemoteAnimationTarget( + /* taskId= */ 0, + /* mode= */ RemoteAnimationTarget.MODE_CLOSING, + /* leash= */ new SurfaceControl(), + /* isTranslucent= */ false, + /* clipRect= */ null, + /* contentInsets= */ null, + /* prefixOrderIndex= */ 0, + /* position= */ null, + /* localBounds= */ null, + /* screenSpaceBounds= */ null, + new Configuration().windowConfiguration, + /* isNotInRecents= */ false, + /* startLeash= */ null, + /* startBounds= */ null, + /* taskInfo= */ new ActivityManager.RunningTaskInfo(), + /* allowEnterPip= */ false); + + doReturn(mock(LauncherActivityInterface.class)).when(gestureState).getContainerInterface(); + when(mSystemUiProxy + .startRecentsActivity(any(), any(), listenerCaptor.capture(), anyBoolean())) + .thenReturn(true); + when(gestureState.getRunningTaskIds(anyBoolean())).thenReturn(new int[0]); + + runOnMainSync(() -> { + mTaskAnimationManager.startRecentsAnimation( + gestureState, + new Intent(), + mock(RecentsAnimationCallbacks.RecentsAnimationListener.class)); + mTaskAnimationManager.onLauncherDestroyed(); + listenerCaptor.getValue().onAnimationStart( + controllerCompat, + new RemoteAnimationTarget[] { remoteAnimationTarget }, + new RemoteAnimationTarget[] { remoteAnimationTarget }, + new Rect(), + new Rect(), + new Bundle(), + new TransitionInfo(0, 0)); + }); + runOnMainSync(() -> verify(controllerCompat) + .finish(/* toHome= */ eq(false), anyBoolean(), any())); + } + protected static void runOnMainSync(Runnable runnable) { InstrumentationRegistry.getInstrumentation().runOnMainSync(runnable); } From c2ed65f17f55a8d3feb02c6bb05e76aee7eb7c02 Mon Sep 17 00:00:00 2001 From: Bill Yi Date: Fri, 28 Mar 2025 05:25:39 +0000 Subject: [PATCH 13/21] Import translations. DO NOT MERGE ANYWHERE Auto-generated-cl: translation import Change-Id: I21b0c49b089c2045773ba4f4a68520a0e260621b --- quickstep/res/values-af/strings.xml | 6 ++++++ quickstep/res/values-am/strings.xml | 6 ++++++ quickstep/res/values-ar/strings.xml | 6 ++++++ quickstep/res/values-as/strings.xml | 6 ++++++ quickstep/res/values-az/strings.xml | 6 ++++++ quickstep/res/values-b+sr+Latn/strings.xml | 6 ++++++ quickstep/res/values-be/strings.xml | 6 ++++++ quickstep/res/values-bg/strings.xml | 6 ++++++ quickstep/res/values-bn/strings.xml | 6 ++++++ quickstep/res/values-bs/strings.xml | 6 ++++++ quickstep/res/values-ca/strings.xml | 6 ++++++ quickstep/res/values-cs/strings.xml | 6 ++++++ quickstep/res/values-da/strings.xml | 6 ++++++ quickstep/res/values-de/strings.xml | 6 ++++++ quickstep/res/values-el/strings.xml | 6 ++++++ quickstep/res/values-en-rAU/strings.xml | 6 ++++++ quickstep/res/values-en-rCA/strings.xml | 3 +++ quickstep/res/values-en-rGB/strings.xml | 6 ++++++ quickstep/res/values-en-rIN/strings.xml | 6 ++++++ quickstep/res/values-es-rUS/strings.xml | 6 ++++++ quickstep/res/values-es/strings.xml | 6 ++++++ quickstep/res/values-et/strings.xml | 6 ++++++ quickstep/res/values-eu/strings.xml | 6 ++++++ quickstep/res/values-fa/strings.xml | 6 ++++++ quickstep/res/values-fi/strings.xml | 6 ++++++ quickstep/res/values-fr-rCA/strings.xml | 6 ++++++ quickstep/res/values-fr/strings.xml | 6 ++++++ quickstep/res/values-gl/strings.xml | 6 ++++++ quickstep/res/values-gu/strings.xml | 6 ++++++ quickstep/res/values-hi/strings.xml | 6 ++++++ quickstep/res/values-hr/strings.xml | 6 ++++++ quickstep/res/values-hu/strings.xml | 6 ++++++ quickstep/res/values-hy/strings.xml | 6 ++++++ quickstep/res/values-in/strings.xml | 6 ++++++ quickstep/res/values-is/strings.xml | 6 ++++++ quickstep/res/values-it/strings.xml | 6 ++++++ quickstep/res/values-iw/strings.xml | 6 ++++++ quickstep/res/values-ja/strings.xml | 6 ++++++ quickstep/res/values-ka/strings.xml | 6 ++++++ quickstep/res/values-kk/strings.xml | 6 ++++++ quickstep/res/values-km/strings.xml | 6 ++++++ quickstep/res/values-kn/strings.xml | 6 ++++++ quickstep/res/values-ko/strings.xml | 6 ++++++ quickstep/res/values-ky/strings.xml | 6 ++++++ quickstep/res/values-lo/strings.xml | 6 ++++++ quickstep/res/values-lt/strings.xml | 3 +++ quickstep/res/values-lv/strings.xml | 6 ++++++ quickstep/res/values-mk/strings.xml | 6 ++++++ quickstep/res/values-ml/strings.xml | 6 ++++++ quickstep/res/values-mn/strings.xml | 6 ++++++ quickstep/res/values-mr/strings.xml | 6 ++++++ quickstep/res/values-ms/strings.xml | 3 +++ quickstep/res/values-my/strings.xml | 6 ++++++ quickstep/res/values-nb/strings.xml | 6 ++++++ quickstep/res/values-ne/strings.xml | 6 ++++++ quickstep/res/values-nl/strings.xml | 6 ++++++ quickstep/res/values-or/strings.xml | 6 ++++++ quickstep/res/values-pa/strings.xml | 6 ++++++ quickstep/res/values-pl/strings.xml | 6 ++++++ quickstep/res/values-pt-rPT/strings.xml | 6 ++++++ quickstep/res/values-pt/strings.xml | 6 ++++++ quickstep/res/values-ro/strings.xml | 6 ++++++ quickstep/res/values-ru/strings.xml | 6 ++++++ quickstep/res/values-si/strings.xml | 6 ++++++ quickstep/res/values-sk/strings.xml | 6 ++++++ quickstep/res/values-sl/strings.xml | 6 ++++++ quickstep/res/values-sq/strings.xml | 6 ++++++ quickstep/res/values-sr/strings.xml | 6 ++++++ quickstep/res/values-sv/strings.xml | 6 ++++++ quickstep/res/values-sw/strings.xml | 6 ++++++ quickstep/res/values-ta/strings.xml | 6 ++++++ quickstep/res/values-te/strings.xml | 6 ++++++ quickstep/res/values-th/strings.xml | 6 ++++++ quickstep/res/values-tl/strings.xml | 6 ++++++ quickstep/res/values-tr/strings.xml | 6 ++++++ quickstep/res/values-uk/strings.xml | 6 ++++++ quickstep/res/values-ur/strings.xml | 6 ++++++ quickstep/res/values-uz/strings.xml | 6 ++++++ quickstep/res/values-vi/strings.xml | 6 ++++++ quickstep/res/values-zh-rCN/strings.xml | 6 ++++++ quickstep/res/values-zh-rHK/strings.xml | 6 ++++++ quickstep/res/values-zh-rTW/strings.xml | 6 ++++++ quickstep/res/values-zu/strings.xml | 6 ++++++ 83 files changed, 489 insertions(+) diff --git a/quickstep/res/values-af/strings.xml b/quickstep/res/values-af/strings.xml index 58c554f318..72d9cda994 100644 --- a/quickstep/res/values-af/strings.xml +++ b/quickstep/res/values-af/strings.xml @@ -163,4 +163,10 @@ "Maak Toe-knoppie" "Speld aan taakbalk vas" "Ontspeld van taakbalk" + + + + + + diff --git a/quickstep/res/values-am/strings.xml b/quickstep/res/values-am/strings.xml index 0790da0336..349dbf20f0 100644 --- a/quickstep/res/values-am/strings.xml +++ b/quickstep/res/values-am/strings.xml @@ -163,4 +163,10 @@ "የዝጋ አዝራር" "ተግባር አሞሌ ላይ ፒን አድርግ" "ከተግባር አሞሌ ንቀል" + + + + + + diff --git a/quickstep/res/values-ar/strings.xml b/quickstep/res/values-ar/strings.xml index 7c4e10fbf5..1ea69df6e2 100644 --- a/quickstep/res/values-ar/strings.xml +++ b/quickstep/res/values-ar/strings.xml @@ -163,4 +163,10 @@ "زر الإغلاق" "التثبيت على شريط التطبيقات" "إزالة التثبيت من شريط التطبيقات" + + + + + + diff --git a/quickstep/res/values-as/strings.xml b/quickstep/res/values-as/strings.xml index 0a5241b731..9770ca04fa 100644 --- a/quickstep/res/values-as/strings.xml +++ b/quickstep/res/values-as/strings.xml @@ -163,4 +163,10 @@ "বন্ধ কৰা বুটাম" "টাস্কবাৰত পিন কৰক" "টাস্কবাৰৰ পৰা আনপিন কৰক" + + + + + + diff --git a/quickstep/res/values-az/strings.xml b/quickstep/res/values-az/strings.xml index ea9e4096d2..76a535b5a4 100644 --- a/quickstep/res/values-az/strings.xml +++ b/quickstep/res/values-az/strings.xml @@ -163,4 +163,10 @@ "Qapatma düyməsi" "İşləmə panelinə bərkidin" "İşləmə panelindən çıxarın" + + + + + + diff --git a/quickstep/res/values-b+sr+Latn/strings.xml b/quickstep/res/values-b+sr+Latn/strings.xml index 12ae5e792a..84eff8acb7 100644 --- a/quickstep/res/values-b+sr+Latn/strings.xml +++ b/quickstep/res/values-b+sr+Latn/strings.xml @@ -163,4 +163,10 @@ "Dugme Zatvori" "Zakači za traku zad." "Otkači sa trake zad." + + + + + + diff --git a/quickstep/res/values-be/strings.xml b/quickstep/res/values-be/strings.xml index c1e9b29836..9d7b463901 100644 --- a/quickstep/res/values-be/strings.xml +++ b/quickstep/res/values-be/strings.xml @@ -163,4 +163,10 @@ "Кнопка \"Закрыць\"" "Замацаваць на панэлі" "Адмацаваць ад панэлі" + + + + + + diff --git a/quickstep/res/values-bg/strings.xml b/quickstep/res/values-bg/strings.xml index 958a0292c0..ec43fb3856 100644 --- a/quickstep/res/values-bg/strings.xml +++ b/quickstep/res/values-bg/strings.xml @@ -163,4 +163,10 @@ "Бутон за затваряне" "Лент. на зад.: фикс." "Лент. на зад.: осв." + + + + + + diff --git a/quickstep/res/values-bn/strings.xml b/quickstep/res/values-bn/strings.xml index 3c3663b6b3..e82386c33e 100644 --- a/quickstep/res/values-bn/strings.xml +++ b/quickstep/res/values-bn/strings.xml @@ -163,4 +163,10 @@ "বন্ধ করার বোতাম" "টাস্কবারে পিন করুন" "টাস্কবার থেকে আনপিন করুন" + + + + + + diff --git a/quickstep/res/values-bs/strings.xml b/quickstep/res/values-bs/strings.xml index b7a2b37aef..a1eafd0de8 100644 --- a/quickstep/res/values-bs/strings.xml +++ b/quickstep/res/values-bs/strings.xml @@ -163,4 +163,10 @@ "Dugme za zatvaranje" "Zakači na traku zadataka" "Otkači s trake zadataka" + + + + + + diff --git a/quickstep/res/values-ca/strings.xml b/quickstep/res/values-ca/strings.xml index 142d4dcccf..bb6a1a28d8 100644 --- a/quickstep/res/values-ca/strings.xml +++ b/quickstep/res/values-ca/strings.xml @@ -163,4 +163,10 @@ "Botó Tanca" "Fixa a barra tasques" "Deixa de fixar" + + + + + + diff --git a/quickstep/res/values-cs/strings.xml b/quickstep/res/values-cs/strings.xml index 95242cccdb..c2ffd73bdd 100644 --- a/quickstep/res/values-cs/strings.xml +++ b/quickstep/res/values-cs/strings.xml @@ -163,4 +163,10 @@ "Tlačítko Zavřít" "Připnout na panel" "Odepnout z panelu" + + + + + + diff --git a/quickstep/res/values-da/strings.xml b/quickstep/res/values-da/strings.xml index 0449516978..886638f90a 100644 --- a/quickstep/res/values-da/strings.xml +++ b/quickstep/res/values-da/strings.xml @@ -163,4 +163,10 @@ "Knappen Luk" "Fastgør til proceslinje" "Frigør fra proceslinje" + + + + + + diff --git a/quickstep/res/values-de/strings.xml b/quickstep/res/values-de/strings.xml index 10f5dc8102..8efdc03937 100644 --- a/quickstep/res/values-de/strings.xml +++ b/quickstep/res/values-de/strings.xml @@ -163,4 +163,10 @@ "Schaltfläche „Schließen“" "An Taskleiste pinnen" "Von Taskleiste lösen" + + + + + + diff --git a/quickstep/res/values-el/strings.xml b/quickstep/res/values-el/strings.xml index f5009c86c1..877893c120 100644 --- a/quickstep/res/values-el/strings.xml +++ b/quickstep/res/values-el/strings.xml @@ -163,4 +163,10 @@ "Κουμπί κλεισίματος" "Καρφ. σε γρ. εργαλ." "Ξεκαρφ. από γρ. εργαλ." + + + + + + diff --git a/quickstep/res/values-en-rAU/strings.xml b/quickstep/res/values-en-rAU/strings.xml index 87a65e813b..604571cbaf 100644 --- a/quickstep/res/values-en-rAU/strings.xml +++ b/quickstep/res/values-en-rAU/strings.xml @@ -163,4 +163,10 @@ "Close button" "Pin to taskbar" "Unpin from taskbar" + + + + + + diff --git a/quickstep/res/values-en-rCA/strings.xml b/quickstep/res/values-en-rCA/strings.xml index fcd7c66490..8cdacbc15f 100644 --- a/quickstep/res/values-en-rCA/strings.xml +++ b/quickstep/res/values-en-rCA/strings.xml @@ -163,4 +163,7 @@ "Close button" "Pin to taskbar" "Unpin from taskbar" + "Nudge" + "Close" + "Nudge image" diff --git a/quickstep/res/values-en-rGB/strings.xml b/quickstep/res/values-en-rGB/strings.xml index 87a65e813b..604571cbaf 100644 --- a/quickstep/res/values-en-rGB/strings.xml +++ b/quickstep/res/values-en-rGB/strings.xml @@ -163,4 +163,10 @@ "Close button" "Pin to taskbar" "Unpin from taskbar" + + + + + + diff --git a/quickstep/res/values-en-rIN/strings.xml b/quickstep/res/values-en-rIN/strings.xml index 87a65e813b..604571cbaf 100644 --- a/quickstep/res/values-en-rIN/strings.xml +++ b/quickstep/res/values-en-rIN/strings.xml @@ -163,4 +163,10 @@ "Close button" "Pin to taskbar" "Unpin from taskbar" + + + + + + diff --git a/quickstep/res/values-es-rUS/strings.xml b/quickstep/res/values-es-rUS/strings.xml index 903a04dbc6..45d1f3c3f0 100644 --- a/quickstep/res/values-es-rUS/strings.xml +++ b/quickstep/res/values-es-rUS/strings.xml @@ -163,4 +163,10 @@ "Botón de cerrar" "Fijar a la barra" "No fijar a la barra" + + + + + + diff --git a/quickstep/res/values-es/strings.xml b/quickstep/res/values-es/strings.xml index ce198e6123..8048823547 100644 --- a/quickstep/res/values-es/strings.xml +++ b/quickstep/res/values-es/strings.xml @@ -163,4 +163,10 @@ "Botón de cerrar" "Fijar a la barra" "Desfijar de la barra" + + + + + + diff --git a/quickstep/res/values-et/strings.xml b/quickstep/res/values-et/strings.xml index 74d2d25f18..c9f8729105 100644 --- a/quickstep/res/values-et/strings.xml +++ b/quickstep/res/values-et/strings.xml @@ -163,4 +163,10 @@ "Sulgemisnupp" "Tegumiribale kinnitamine" "Tegumiribalt vabastamine" + + + + + + diff --git a/quickstep/res/values-eu/strings.xml b/quickstep/res/values-eu/strings.xml index fca061ead7..33065fcb91 100644 --- a/quickstep/res/values-eu/strings.xml +++ b/quickstep/res/values-eu/strings.xml @@ -163,4 +163,10 @@ "Ixteko botoia" "Ainguratu zereginen barran" "Kendu aingura zereginen barratik" + + + + + + diff --git a/quickstep/res/values-fa/strings.xml b/quickstep/res/values-fa/strings.xml index 8b2537883b..97177a1420 100644 --- a/quickstep/res/values-fa/strings.xml +++ b/quickstep/res/values-fa/strings.xml @@ -163,4 +163,10 @@ "دکمه بستن" "سنجاق به نوار وظیفه" "برداشتن از نواروظیفه" + + + + + + diff --git a/quickstep/res/values-fi/strings.xml b/quickstep/res/values-fi/strings.xml index 2168653bfd..c427cded0a 100644 --- a/quickstep/res/values-fi/strings.xml +++ b/quickstep/res/values-fi/strings.xml @@ -163,4 +163,10 @@ "Sulje-painike" "Kiinnitä palkkiin" "Poista palkista" + + + + + + diff --git a/quickstep/res/values-fr-rCA/strings.xml b/quickstep/res/values-fr-rCA/strings.xml index a0cd4b2d47..8761cf6a8e 100644 --- a/quickstep/res/values-fr-rCA/strings.xml +++ b/quickstep/res/values-fr-rCA/strings.xml @@ -163,4 +163,10 @@ "Bouton Fermer" "Éping. (barre tâche)" "Détacher (bar. tâc.)" + + + + + + diff --git a/quickstep/res/values-fr/strings.xml b/quickstep/res/values-fr/strings.xml index f6dfe95c44..dd0ce1cda9 100644 --- a/quickstep/res/values-fr/strings.xml +++ b/quickstep/res/values-fr/strings.xml @@ -163,4 +163,10 @@ "Bouton \"Fermer\"" "Épingler à la barre" "Désépingler de la barre" + + + + + + diff --git a/quickstep/res/values-gl/strings.xml b/quickstep/res/values-gl/strings.xml index b1b78df039..adf6c01528 100644 --- a/quickstep/res/values-gl/strings.xml +++ b/quickstep/res/values-gl/strings.xml @@ -163,4 +163,10 @@ "Botón Pechar" "Fixar na barra" "Soltar da barra" + + + + + + diff --git a/quickstep/res/values-gu/strings.xml b/quickstep/res/values-gu/strings.xml index e92d4ab60d..0e4980249d 100644 --- a/quickstep/res/values-gu/strings.xml +++ b/quickstep/res/values-gu/strings.xml @@ -163,4 +163,10 @@ "\'બંધ કરો\' બટન" "ટાસ્કબારમાં પિન કરો" "ટાસ્કબારમાંથી અનપિન કરો" + + + + + + diff --git a/quickstep/res/values-hi/strings.xml b/quickstep/res/values-hi/strings.xml index 6663df1463..a0b0a9a170 100644 --- a/quickstep/res/values-hi/strings.xml +++ b/quickstep/res/values-hi/strings.xml @@ -163,4 +163,10 @@ "\'बंद करें\' बटन" "टास्कबार में पिन करें" "टास्कबार से अनपिन करें" + + + + + + diff --git a/quickstep/res/values-hr/strings.xml b/quickstep/res/values-hr/strings.xml index 701b5679c7..7874419b28 100644 --- a/quickstep/res/values-hr/strings.xml +++ b/quickstep/res/values-hr/strings.xml @@ -163,4 +163,10 @@ "Gumb Zatvori" "Prikvači na traku" "Otkvači s trake" + + + + + + diff --git a/quickstep/res/values-hu/strings.xml b/quickstep/res/values-hu/strings.xml index b38dddda29..738aaaafd0 100644 --- a/quickstep/res/values-hu/strings.xml +++ b/quickstep/res/values-hu/strings.xml @@ -163,4 +163,10 @@ "Bezárás gomb" "Kitűzés a feladatsávon" "Kitűzés feloldása" + + + + + + diff --git a/quickstep/res/values-hy/strings.xml b/quickstep/res/values-hy/strings.xml index 572c452270..c720f26aed 100644 --- a/quickstep/res/values-hy/strings.xml +++ b/quickstep/res/values-hy/strings.xml @@ -163,4 +163,10 @@ "«Փակել» կոճակ" "Ամրացնել վահանակում" "Ապամրացնել վահանակից" + + + + + + diff --git a/quickstep/res/values-in/strings.xml b/quickstep/res/values-in/strings.xml index 6fb1bc6452..72e5ee7e78 100644 --- a/quickstep/res/values-in/strings.xml +++ b/quickstep/res/values-in/strings.xml @@ -163,4 +163,10 @@ "Tombol tutup" "Sematkan ke taskbar" "Lepaskan dari taskbar" + + + + + + diff --git a/quickstep/res/values-is/strings.xml b/quickstep/res/values-is/strings.xml index ac4192fd37..2188132271 100644 --- a/quickstep/res/values-is/strings.xml +++ b/quickstep/res/values-is/strings.xml @@ -163,4 +163,10 @@ "Hnappur til að loka" "Festa á forritastiku" "Losa af forritastiku" + + + + + + diff --git a/quickstep/res/values-it/strings.xml b/quickstep/res/values-it/strings.xml index 8a08dcfbd8..a49d90d518 100644 --- a/quickstep/res/values-it/strings.xml +++ b/quickstep/res/values-it/strings.xml @@ -163,4 +163,10 @@ "Pulsante Chiudi" "Fissa alla barra app" "Sblocca da barra app" + + + + + + diff --git a/quickstep/res/values-iw/strings.xml b/quickstep/res/values-iw/strings.xml index 30d1855b63..44e13504fe 100644 --- a/quickstep/res/values-iw/strings.xml +++ b/quickstep/res/values-iw/strings.xml @@ -163,4 +163,10 @@ "כפתור הסגירה" "הצמדה לסרגל האפליקציות" "ביטול ההצמדה לסרגל" + + + + + + diff --git a/quickstep/res/values-ja/strings.xml b/quickstep/res/values-ja/strings.xml index 8f44ee75b9..6a5c5003e8 100644 --- a/quickstep/res/values-ja/strings.xml +++ b/quickstep/res/values-ja/strings.xml @@ -163,4 +163,10 @@ "閉じるボタン" "タスクバーに固定" "タスクバーの固定解除" + + + + + + diff --git a/quickstep/res/values-ka/strings.xml b/quickstep/res/values-ka/strings.xml index 6294cbdac7..482127e231 100644 --- a/quickstep/res/values-ka/strings.xml +++ b/quickstep/res/values-ka/strings.xml @@ -163,4 +163,10 @@ "დახურვის ღილაკი" "ამოც. ზოლში ჩანიშვნა" "ამოც. ზოლიდან მოხსნა" + + + + + + diff --git a/quickstep/res/values-kk/strings.xml b/quickstep/res/values-kk/strings.xml index 429fe5c330..29ee620943 100644 --- a/quickstep/res/values-kk/strings.xml +++ b/quickstep/res/values-kk/strings.xml @@ -163,4 +163,10 @@ "\"Жабу\" түймесі" "Тапсырмалар жолағына бекіту" "Тапсырмалар жолағынан босату" + + + + + + diff --git a/quickstep/res/values-km/strings.xml b/quickstep/res/values-km/strings.xml index f1772afe46..3c1fe0efdb 100644 --- a/quickstep/res/values-km/strings.xml +++ b/quickstep/res/values-km/strings.xml @@ -163,4 +163,10 @@ "ប៊ូតុងបិទ" "ខ្ទាស់ទៅរបារកិច្ចការ" "ដកខ្ទាស់ពីរបារកិច្ចការ" + + + + + + diff --git a/quickstep/res/values-kn/strings.xml b/quickstep/res/values-kn/strings.xml index 5f6734b58d..eaead18c58 100644 --- a/quickstep/res/values-kn/strings.xml +++ b/quickstep/res/values-kn/strings.xml @@ -163,4 +163,10 @@ "ಮುಚ್ಚುವ ಬಟನ್" "ಟಾಸ್ಕ್‌ಬಾರ್‌ಗೆ ಪಿನ್ ಮಾಡಿ" "ಟಾಸ್ಕ್‌ಬಾರ್‌ನಿಂದ ಅನ್‌ಪಿನ್" + + + + + + diff --git a/quickstep/res/values-ko/strings.xml b/quickstep/res/values-ko/strings.xml index cb8b6c42b3..00a50fe431 100644 --- a/quickstep/res/values-ko/strings.xml +++ b/quickstep/res/values-ko/strings.xml @@ -163,4 +163,10 @@ "닫기 버튼" "태스크 바에 고정" "태스크 바에서 고정 해제" + + + + + + diff --git a/quickstep/res/values-ky/strings.xml b/quickstep/res/values-ky/strings.xml index 167df7357d..1ab7be5543 100644 --- a/quickstep/res/values-ky/strings.xml +++ b/quickstep/res/values-ky/strings.xml @@ -163,4 +163,10 @@ "Жабуу баскычы" "Тапшырмалар панелине кадоо" "Тапшырмалар панелинен алуу" + + + + + + diff --git a/quickstep/res/values-lo/strings.xml b/quickstep/res/values-lo/strings.xml index 0539e1ff52..f3720401b9 100644 --- a/quickstep/res/values-lo/strings.xml +++ b/quickstep/res/values-lo/strings.xml @@ -163,4 +163,10 @@ "ປຸ່ມປິດ" "ປັກໝຸດໄປໃສ່ແຖບໜ້າວຽກ" "ຖອດປັກໝຸດຈາກແຖບໜ້າວຽກ" + + + + + + diff --git a/quickstep/res/values-lt/strings.xml b/quickstep/res/values-lt/strings.xml index dbc5649e29..488ab540d7 100644 --- a/quickstep/res/values-lt/strings.xml +++ b/quickstep/res/values-lt/strings.xml @@ -163,4 +163,7 @@ "Mygtukas „Uždaryti“" "Priseg. prie užd. j." "Atsegti nuo užd. j." + "Priminimas" + "Uždaryti" + "Pastumti vaizdą" diff --git a/quickstep/res/values-lv/strings.xml b/quickstep/res/values-lv/strings.xml index 10a2b403f2..cc3b9aea45 100644 --- a/quickstep/res/values-lv/strings.xml +++ b/quickstep/res/values-lv/strings.xml @@ -163,4 +163,10 @@ "Poga Aizvērt" "Piespraust uzdevumu joslai" "Atspraust no uzdevumu joslas" + + + + + + diff --git a/quickstep/res/values-mk/strings.xml b/quickstep/res/values-mk/strings.xml index 9d141056ad..4f41d48eff 100644 --- a/quickstep/res/values-mk/strings.xml +++ b/quickstep/res/values-mk/strings.xml @@ -163,4 +163,10 @@ "Копче за затворање" "Закачи на лентата" "Откачи од лентата" + + + + + + diff --git a/quickstep/res/values-ml/strings.xml b/quickstep/res/values-ml/strings.xml index 73c795b420..e247cb2c0a 100644 --- a/quickstep/res/values-ml/strings.xml +++ b/quickstep/res/values-ml/strings.xml @@ -163,4 +163,10 @@ "അടയ്ക്കുക ബട്ടൺ" "ടാസ്ക്ബാറിൽ ചേർക്കൂ" "ടാസ്ക്ബാറിൽ നിന്ന് മാറ്റൂ" + + + + + + diff --git a/quickstep/res/values-mn/strings.xml b/quickstep/res/values-mn/strings.xml index 186e4dc3f0..9f99a9c617 100644 --- a/quickstep/res/values-mn/strings.xml +++ b/quickstep/res/values-mn/strings.xml @@ -163,4 +163,10 @@ "Хаах товч" "Ажлын хэсэгт бэхлэх" "Бэхэлснийг болиулах" + + + + + + diff --git a/quickstep/res/values-mr/strings.xml b/quickstep/res/values-mr/strings.xml index ef44bb2b12..4d46bc0d70 100644 --- a/quickstep/res/values-mr/strings.xml +++ b/quickstep/res/values-mr/strings.xml @@ -163,4 +163,10 @@ "बंद करा बटण" "टास्कबारवर पिन करा" "टास्कबारवरून अनपिन करा" + + + + + + diff --git a/quickstep/res/values-ms/strings.xml b/quickstep/res/values-ms/strings.xml index 1007b55c78..a0b681a209 100644 --- a/quickstep/res/values-ms/strings.xml +++ b/quickstep/res/values-ms/strings.xml @@ -163,4 +163,7 @@ "Butang tutup" "Semat pada bar tugas" "Nyahsemat drpd bar tugas" + "Sigung" + "Tutup" + "Sigung imej" diff --git a/quickstep/res/values-my/strings.xml b/quickstep/res/values-my/strings.xml index 7be94b5df8..c955d7cbd3 100644 --- a/quickstep/res/values-my/strings.xml +++ b/quickstep/res/values-my/strings.xml @@ -163,4 +163,10 @@ "အပိတ် ခလုတ်" "Taskbar ၌ ပင်ထိုးရန်" "Taskbar မှ ဖြုတ်ရန်" + + + + + + diff --git a/quickstep/res/values-nb/strings.xml b/quickstep/res/values-nb/strings.xml index f07877ed37..beb70b1ecd 100644 --- a/quickstep/res/values-nb/strings.xml +++ b/quickstep/res/values-nb/strings.xml @@ -163,4 +163,10 @@ "Lukkeknapp" "Fest i oppgavelinjen" "Løsne i oppgavelinje" + + + + + + diff --git a/quickstep/res/values-ne/strings.xml b/quickstep/res/values-ne/strings.xml index fece2a8875..b452c3f1bd 100644 --- a/quickstep/res/values-ne/strings.xml +++ b/quickstep/res/values-ne/strings.xml @@ -163,4 +163,10 @@ "\"बन्द गर्नुहोस्\" बटन" "टास्कबारमा पिन गर्नुहोस्" "टास्कबारबाट पिन गर्नुहोस्" + + + + + + diff --git a/quickstep/res/values-nl/strings.xml b/quickstep/res/values-nl/strings.xml index a8dbb871a8..9ba7529b5e 100644 --- a/quickstep/res/values-nl/strings.xml +++ b/quickstep/res/values-nl/strings.xml @@ -163,4 +163,10 @@ "Knop Sluiten" "Vastzetten op taakbalk" "Losmaken van taakbalk" + + + + + + diff --git a/quickstep/res/values-or/strings.xml b/quickstep/res/values-or/strings.xml index dabe226f53..10641ea392 100644 --- a/quickstep/res/values-or/strings.xml +++ b/quickstep/res/values-or/strings.xml @@ -163,4 +163,10 @@ "\"ବନ୍ଦ କରନ୍ତୁ\" ବଟନ" "ଟାସ୍କବାରରେ ପିନ କର" "ଟାସ୍କବାରରୁ ଅନପିନ କର" + + + + + + diff --git a/quickstep/res/values-pa/strings.xml b/quickstep/res/values-pa/strings.xml index b745e04407..57fa991eaf 100644 --- a/quickstep/res/values-pa/strings.xml +++ b/quickstep/res/values-pa/strings.xml @@ -163,4 +163,10 @@ "\'ਬੰਦ ਕਰੋ\' ਬਟਨ" "ਟਾਸਕਬਾਰ \'ਤੇ ਪਿੰਨ ਕਰੋ" "ਟਾਸਕਬਾਰ ਤੋਂ ਅਣਪਿੰਨ ਕਰੋ" + + + + + + diff --git a/quickstep/res/values-pl/strings.xml b/quickstep/res/values-pl/strings.xml index 5dc41d171c..86e1bbcc02 100644 --- a/quickstep/res/values-pl/strings.xml +++ b/quickstep/res/values-pl/strings.xml @@ -163,4 +163,10 @@ "Przycisk Zamknij" "Przypnij do paska" "Odepnij od paska" + + + + + + diff --git a/quickstep/res/values-pt-rPT/strings.xml b/quickstep/res/values-pt-rPT/strings.xml index 646dec1dbb..0e0c3b7897 100644 --- a/quickstep/res/values-pt-rPT/strings.xml +++ b/quickstep/res/values-pt-rPT/strings.xml @@ -163,4 +163,10 @@ "Botão Fechar" "Afixar na barra tar." "Desaf. da barra tar." + + + + + + diff --git a/quickstep/res/values-pt/strings.xml b/quickstep/res/values-pt/strings.xml index e4c3cf1996..ca917f4eb8 100644 --- a/quickstep/res/values-pt/strings.xml +++ b/quickstep/res/values-pt/strings.xml @@ -163,4 +163,10 @@ "Botão \"Fechar\"" "Fixar na barra de tarefas" "Liberar da barra de tarefas" + + + + + + diff --git a/quickstep/res/values-ro/strings.xml b/quickstep/res/values-ro/strings.xml index 27f80fbb5c..3539537b6a 100644 --- a/quickstep/res/values-ro/strings.xml +++ b/quickstep/res/values-ro/strings.xml @@ -163,4 +163,10 @@ "Buton de închidere" "Fixează pe bara de activități" "Anulează fixarea din bara de activități" + + + + + + diff --git a/quickstep/res/values-ru/strings.xml b/quickstep/res/values-ru/strings.xml index 605c5654ef..463e970b5b 100644 --- a/quickstep/res/values-ru/strings.xml +++ b/quickstep/res/values-ru/strings.xml @@ -163,4 +163,10 @@ "Кнопка \"Закрыть\"" "Закрепить на панели" "Открепить от панели" + + + + + + diff --git a/quickstep/res/values-si/strings.xml b/quickstep/res/values-si/strings.xml index 2030252b29..3de8a7f69e 100644 --- a/quickstep/res/values-si/strings.xml +++ b/quickstep/res/values-si/strings.xml @@ -163,4 +163,10 @@ "වැසීමේ බොත්තම" "කාර්ය තීරුවට අමුණන්න" "කාර්ය තීරුවෙන් ඉවත් කරන්න" + + + + + + diff --git a/quickstep/res/values-sk/strings.xml b/quickstep/res/values-sk/strings.xml index 1b7a753d4a..12a7705ad5 100644 --- a/quickstep/res/values-sk/strings.xml +++ b/quickstep/res/values-sk/strings.xml @@ -163,4 +163,10 @@ "Tlačidlo Zavrieť" "Pripnúť na panel" "Odopnúť z panela" + + + + + + diff --git a/quickstep/res/values-sl/strings.xml b/quickstep/res/values-sl/strings.xml index fd7dc69d44..dc9837085a 100644 --- a/quickstep/res/values-sl/strings.xml +++ b/quickstep/res/values-sl/strings.xml @@ -163,4 +163,10 @@ "Gumb za zapiranje" "Pripni v opravilno vrstico" "Odpni iz opravilne vrstice" + + + + + + diff --git a/quickstep/res/values-sq/strings.xml b/quickstep/res/values-sq/strings.xml index 3ebff3a74d..76723862a6 100644 --- a/quickstep/res/values-sq/strings.xml +++ b/quickstep/res/values-sq/strings.xml @@ -163,4 +163,10 @@ "Butoni i mbylljes" "Gozhdo te shiriti" "Zhgozhdo nga shiriti" + + + + + + diff --git a/quickstep/res/values-sr/strings.xml b/quickstep/res/values-sr/strings.xml index 345fc27b1e..777c1c27ac 100644 --- a/quickstep/res/values-sr/strings.xml +++ b/quickstep/res/values-sr/strings.xml @@ -163,4 +163,10 @@ "Дугме Затвори" "Закачи за траку зад." "Откачи са траке зад." + + + + + + diff --git a/quickstep/res/values-sv/strings.xml b/quickstep/res/values-sv/strings.xml index c995fd0521..b3445dcb3b 100644 --- a/quickstep/res/values-sv/strings.xml +++ b/quickstep/res/values-sv/strings.xml @@ -163,4 +163,10 @@ "Knappen Stäng" "Fäst i aktivitetsfält" "Lossa från aktivitetsfält" + + + + + + diff --git a/quickstep/res/values-sw/strings.xml b/quickstep/res/values-sw/strings.xml index ce9a56a8b1..71c95377da 100644 --- a/quickstep/res/values-sw/strings.xml +++ b/quickstep/res/values-sw/strings.xml @@ -163,4 +163,10 @@ "Kitufe cha kufunga" "Bandika kwa upauzana" "Bandua kwa upauzana" + + + + + + diff --git a/quickstep/res/values-ta/strings.xml b/quickstep/res/values-ta/strings.xml index 9074f6c9c3..822e4d741e 100644 --- a/quickstep/res/values-ta/strings.xml +++ b/quickstep/res/values-ta/strings.xml @@ -163,4 +163,10 @@ "மூடுவதற்கான பட்டன்" "செயல்பட்டியில் பின் செய்" "செயல்பட்டியிலிருந்து அகற்று" + + + + + + diff --git a/quickstep/res/values-te/strings.xml b/quickstep/res/values-te/strings.xml index 7bd92dd640..a6bbf2831d 100644 --- a/quickstep/res/values-te/strings.xml +++ b/quickstep/res/values-te/strings.xml @@ -163,4 +163,10 @@ "\'మూసివేయండి\' బటన్" "టాస్క్‌బార్‌కు పిన్" "టాస్క్‌బార్ అన్‌పిన్" + + + + + + diff --git a/quickstep/res/values-th/strings.xml b/quickstep/res/values-th/strings.xml index a18a89f26d..664a4b7d60 100644 --- a/quickstep/res/values-th/strings.xml +++ b/quickstep/res/values-th/strings.xml @@ -163,4 +163,10 @@ "ปุ่มปิด" "ปักหมุดไปยังแถบงาน" "เลิกปักหมุดจากแถบงาน" + + + + + + diff --git a/quickstep/res/values-tl/strings.xml b/quickstep/res/values-tl/strings.xml index 35515789cb..ce3b48a051 100644 --- a/quickstep/res/values-tl/strings.xml +++ b/quickstep/res/values-tl/strings.xml @@ -163,4 +163,10 @@ "Button na isara" "I-pin sa taskbar" "I-unpin sa taskbar" + + + + + + diff --git a/quickstep/res/values-tr/strings.xml b/quickstep/res/values-tr/strings.xml index 5c5fba656d..498c78817a 100644 --- a/quickstep/res/values-tr/strings.xml +++ b/quickstep/res/values-tr/strings.xml @@ -163,4 +163,10 @@ "Kapat düğmesi" "Çubuğa sabitle" "Çubuktan kaldır" + + + + + + diff --git a/quickstep/res/values-uk/strings.xml b/quickstep/res/values-uk/strings.xml index 1d1f040acc..2eed9edfc2 100644 --- a/quickstep/res/values-uk/strings.xml +++ b/quickstep/res/values-uk/strings.xml @@ -163,4 +163,10 @@ "Кнопка \"Закрити\"" "На панель завдань" "З панелі завдань" + + + + + + diff --git a/quickstep/res/values-ur/strings.xml b/quickstep/res/values-ur/strings.xml index 8c44ef71a4..b3eb959d99 100644 --- a/quickstep/res/values-ur/strings.xml +++ b/quickstep/res/values-ur/strings.xml @@ -163,4 +163,10 @@ "\'بند کریں\' بٹن" "ٹاسک بار میں پن کریں" "ٹاسک بار سے پن ہٹائیں" + + + + + + diff --git a/quickstep/res/values-uz/strings.xml b/quickstep/res/values-uz/strings.xml index 86fdd5614c..7feb8ca145 100644 --- a/quickstep/res/values-uz/strings.xml +++ b/quickstep/res/values-uz/strings.xml @@ -163,4 +163,10 @@ "Yopish tugmasi" "Panelga qadash" "Vazifalar panelidan yechib olish" + + + + + + diff --git a/quickstep/res/values-vi/strings.xml b/quickstep/res/values-vi/strings.xml index 43bd8facc1..c8a06f0685 100644 --- a/quickstep/res/values-vi/strings.xml +++ b/quickstep/res/values-vi/strings.xml @@ -163,4 +163,10 @@ "Nút đóng" "Ghim vào thanh tác vụ" "Bỏ ghim khỏi thanh tác vụ" + + + + + + diff --git a/quickstep/res/values-zh-rCN/strings.xml b/quickstep/res/values-zh-rCN/strings.xml index 619c5125b0..22a0a0fd2e 100644 --- a/quickstep/res/values-zh-rCN/strings.xml +++ b/quickstep/res/values-zh-rCN/strings.xml @@ -163,4 +163,10 @@ "“关闭”按钮" "固定到任务栏" "从任务栏取消固定" + + + + + + diff --git a/quickstep/res/values-zh-rHK/strings.xml b/quickstep/res/values-zh-rHK/strings.xml index 34f8aacb49..ab1068eda6 100644 --- a/quickstep/res/values-zh-rHK/strings.xml +++ b/quickstep/res/values-zh-rHK/strings.xml @@ -163,4 +163,10 @@ "關閉按鈕" "固定至工作列" "取消固定至工作列" + + + + + + diff --git a/quickstep/res/values-zh-rTW/strings.xml b/quickstep/res/values-zh-rTW/strings.xml index 5244b05d48..3096fe6a8d 100644 --- a/quickstep/res/values-zh-rTW/strings.xml +++ b/quickstep/res/values-zh-rTW/strings.xml @@ -163,4 +163,10 @@ "關閉按鈕" "固定到工作列" "從工作列中取消固定" + + + + + + diff --git a/quickstep/res/values-zu/strings.xml b/quickstep/res/values-zu/strings.xml index a81fe25676..a35f9faaec 100644 --- a/quickstep/res/values-zu/strings.xml +++ b/quickstep/res/values-zu/strings.xml @@ -163,4 +163,10 @@ "Inkinobho yokuvala" "Phina kutaskbar" "Susa ukuphina i-taskbar" + + + + + + From 8ad93ac31704442f745e6a669d95578a3d697016 Mon Sep 17 00:00:00 2001 From: Bill Yi Date: Fri, 28 Mar 2025 05:26:39 +0000 Subject: [PATCH 14/21] Import translations. DO NOT MERGE ANYWHERE Auto-generated-cl: translation import Change-Id: I770ef4506c65ccc6b0916483cda79953cdde95a1 --- res/values-af/strings.xml | 11 ++++++++++- res/values-am/strings.xml | 11 ++++++++++- res/values-ar/strings.xml | 14 +++++++++++--- res/values-as/strings.xml | 14 +++++++++++--- res/values-az/strings.xml | 11 ++++++++++- res/values-b+sr+Latn/strings.xml | 14 +++++++++++--- res/values-be/strings.xml | 14 +++++++++++--- res/values-bg/strings.xml | 11 ++++++++++- res/values-bn/strings.xml | 11 ++++++++++- res/values-bs/strings.xml | 11 ++++++++++- res/values-ca/strings.xml | 11 ++++++++++- res/values-cs/strings.xml | 11 ++++++++++- res/values-da/strings.xml | 11 ++++++++++- res/values-de/strings.xml | 11 ++++++++++- res/values-el/strings.xml | 11 ++++++++++- res/values-en-rAU/strings.xml | 11 ++++++++++- res/values-en-rCA/strings.xml | 6 +++++- res/values-en-rGB/strings.xml | 11 ++++++++++- res/values-en-rIN/strings.xml | 11 ++++++++++- res/values-es-rUS/strings.xml | 11 ++++++++++- res/values-es/strings.xml | 11 ++++++++++- res/values-et/strings.xml | 14 +++++++++++--- res/values-eu/strings.xml | 11 ++++++++++- res/values-fa/strings.xml | 11 ++++++++++- res/values-fi/strings.xml | 11 ++++++++++- res/values-fr-rCA/strings.xml | 11 ++++++++++- res/values-fr/strings.xml | 11 ++++++++++- res/values-gl/strings.xml | 11 ++++++++++- res/values-gu/strings.xml | 11 ++++++++++- res/values-hi/strings.xml | 11 ++++++++++- res/values-hr/strings.xml | 11 ++++++++++- res/values-hu/strings.xml | 14 +++++++++++--- res/values-hy/strings.xml | 14 +++++++++++--- res/values-in/strings.xml | 14 +++++++++++--- res/values-is/strings.xml | 11 ++++++++++- res/values-it/strings.xml | 11 ++++++++++- res/values-iw/strings.xml | 11 ++++++++++- res/values-ja/strings.xml | 14 +++++++++++--- res/values-ka/strings.xml | 14 +++++++++++--- res/values-kk/strings.xml | 11 ++++++++++- res/values-km/strings.xml | 14 +++++++++++--- res/values-kn/strings.xml | 14 +++++++++++--- res/values-ko/strings.xml | 11 ++++++++++- res/values-ky/strings.xml | 11 ++++++++++- res/values-lo/strings.xml | 11 ++++++++++- res/values-lt/strings.xml | 11 ++++++++++- res/values-lv/strings.xml | 11 ++++++++++- res/values-mk/strings.xml | 11 ++++++++++- res/values-ml/strings.xml | 14 +++++++++++--- res/values-mn/strings.xml | 11 ++++++++++- res/values-mr/strings.xml | 16 ++++++++++++---- res/values-ms/strings.xml | 14 +++++++++++--- res/values-my/strings.xml | 11 ++++++++++- res/values-nb/strings.xml | 11 ++++++++++- res/values-ne/strings.xml | 14 +++++++++++--- res/values-nl/strings.xml | 14 +++++++++++--- res/values-or/strings.xml | 11 ++++++++++- res/values-pa/strings.xml | 14 +++++++++++--- res/values-pl/strings.xml | 11 ++++++++++- res/values-pt-rPT/strings.xml | 11 ++++++++++- res/values-pt/strings.xml | 11 ++++++++++- res/values-ro/strings.xml | 11 ++++++++++- res/values-ru/strings.xml | 11 ++++++++++- res/values-si/strings.xml | 14 +++++++++++--- res/values-sk/strings.xml | 14 +++++++++++--- res/values-sl/strings.xml | 14 +++++++++++--- res/values-sq/strings.xml | 11 ++++++++++- res/values-sr/strings.xml | 14 +++++++++++--- res/values-sv/strings.xml | 11 ++++++++++- res/values-sw/strings.xml | 11 ++++++++++- res/values-ta/strings.xml | 11 ++++++++++- res/values-te/strings.xml | 14 +++++++++++--- res/values-th/strings.xml | 14 +++++++++++--- res/values-tl/strings.xml | 14 +++++++++++--- res/values-tr/strings.xml | 11 ++++++++++- res/values-uk/strings.xml | 11 ++++++++++- res/values-ur/strings.xml | 14 +++++++++++--- res/values-uz/strings.xml | 11 ++++++++++- res/values-vi/strings.xml | 11 ++++++++++- res/values-zh-rCN/strings.xml | 11 ++++++++++- res/values-zh-rHK/strings.xml | 11 ++++++++++- res/values-zh-rTW/strings.xml | 11 ++++++++++- res/values-zu/strings.xml | 11 ++++++++++- 83 files changed, 852 insertions(+), 136 deletions(-) diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml index a9b752f21a..b4658c3826 100644 --- a/res/values-af/strings.xml +++ b/res/values-af/strings.xml @@ -133,7 +133,6 @@ "Muurpapier en styl" "Wysig tuisskerm" "Tuis-instellings" - "Apps" "Gedeaktiveer deur jou administrateur" "Laat toe dat tuisskerm gedraai word" "Wanneer foon gedraai word" @@ -220,4 +219,14 @@ "Installeer" "Installeer apps in privaat ruimte" "Voeg lêers en meer by privaat ruimte" + + + + + + + + + + diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml index 25d19b6338..a9a9b6818e 100644 --- a/res/values-am/strings.xml +++ b/res/values-am/strings.xml @@ -133,7 +133,6 @@ "ልጣፍ እና ቅጥ" "መነሻ ማያ ገጽን አርትዕ" "የመነሻ ቅንብሮች" - "መተግበሪያዎች" "በእርስዎ አስተዳዳሪ የተሰናከለ" "የመነሻ ማያ ገፅ ማሽከርከርን ይፍቀዱ" "ስልኩ ሲዞር" @@ -220,4 +219,14 @@ "ይጫኑ" "መተግበሪያዎችን ወደ የግል ቦታ ይጫኑ" "ወደ የግል ቦታ ፋይሎች እና ሌሎችንም ያክሉ" + + + + + + + + + + diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml index b4c52099fb..dd272aa1db 100644 --- a/res/values-ar/strings.xml +++ b/res/values-ar/strings.xml @@ -29,8 +29,7 @@ "الشاشة الرئيسية" "يمكن ضبط \"%1$s\" كتطبيق الشاشة الرئيسية التلقائي من خلال \"الإعدادات\"" "تقسيم الشاشة" - - + "تغيير نسبة العرض إلى الارتفاع" "‏معلومات تطبيق %1$s" "‏إعدادات استخدام \"%1$s\"" "نافذة جديدة" @@ -133,7 +132,6 @@ "الخلفية والأسلوب" "تعديل الشاشة الرئيسية" "إعدادات الشاشة الرئيسية" - "التطبيقات" "أوقف المشرف هذه الميزة" "السماح بتدوير الشاشة الرئيسية" "عند تدوير الهاتف" @@ -220,4 +218,14 @@ "تثبيت" "تثبيت التطبيقات في المساحة الخاصّة" "إضافة ملفات والمزيد إلى \"المساحة الخاصّة\"" + + + + + + + + + + diff --git a/res/values-as/strings.xml b/res/values-as/strings.xml index 2ab47d51e4..93b4861095 100644 --- a/res/values-as/strings.xml +++ b/res/values-as/strings.xml @@ -29,8 +29,7 @@ "গৃহ স্ক্ৰীন" "ছেটিঙত %1$sক ডিফ’ল্ট গৃহপৃষ্ঠা এপ্‌ হিচাপে ছেট কৰক" "বিভাজিত স্ক্ৰীন" - - + "আকাৰৰ অনুপাত সলনি কৰক" "%1$sৰ বাবে এপৰ তথ্য" "%1$sৰ বাবে ব্যৱহাৰৰ ছেটিং" "নতুন ৱিণ্ড’" @@ -133,7 +132,6 @@ "ৱালপেপাৰ আৰু শৈলী" "গৃহ স্ক্ৰীন সম্পাদনা কৰক" "গৃহ ছেটিং" - "এপ্‌" "আপোনাৰ প্ৰশাসকে অক্ষম কৰি ৰাখিছে" "গৃহ স্ক্ৰীন ঘূৰোৱাৰ অনুমতি দিয়ক" "ফ\'নটো যেতিয়া ঘূৰোৱা হয়" @@ -220,4 +218,14 @@ "ইনষ্টল কৰক" "এপ্‌সমূহ প্ৰাইভেট স্পেচত ইনষ্টল কৰক" "প্ৰাইভেট স্পে’চত ফাইল আৰু অধিক যোগ দিয়ক" + + + + + + + + + + diff --git a/res/values-az/strings.xml b/res/values-az/strings.xml index 092e240ba7..87b3982e35 100644 --- a/res/values-az/strings.xml +++ b/res/values-az/strings.xml @@ -133,7 +133,6 @@ "Divar kağızı və üslub" "Əsas ekranı redaktə edin" "Home ayarları" - "Tətbiqlər" "Admininiz tərəfindən deaktiv edilib" "Əsas ekran çevrilsin" "Telefon çevrilən zaman" @@ -220,4 +219,14 @@ "Quraşdırın" "Tətbiqləri şəxsi sahədə quraşdırın" "Private Space-ə fayllar və s. əlavə edin" + + + + + + + + + + diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml index 1312d6ea1d..3a62a9e8e6 100644 --- a/res/values-b+sr+Latn/strings.xml +++ b/res/values-b+sr+Latn/strings.xml @@ -29,8 +29,7 @@ "Početni ekran" "Podesite %1$s kao podrazumevanu početnu aplikaciju u Podešavanjima" "Podeljeni ekran" - - + "Promeni razmeru" "Informacije o aplikaciji za: %1$s" "Podešavanja potrošnje za %1$s" "Novi prozor" @@ -133,7 +132,6 @@ "Pozadina i stil" "Izmeni početni ekran" "Podešavanja početnog ekrana" - "Aplikacije" "Administrator je onemogućio" "Dozvoli rotaciju početnog ekrana" "Kada se telefon rotira" @@ -220,4 +218,14 @@ "Instalirajte" "Instaliraj aplikacije u privatan prostor" "Dodajte fajlove i drugo u privatan prostor" + + + + + + + + + + diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml index c251cddcf8..186c20f705 100644 --- a/res/values-be/strings.xml +++ b/res/values-be/strings.xml @@ -29,8 +29,7 @@ "Галоўны экран" "Зрабіць %1$s стандартнай праграмай для галоўнага экрана, перайшоўшы ў Налады" "Падзелены экран" - - + "Змяніць суадносіны бакоў" "Інфармацыя пра праграму для: %1$s" "%1$s: налады выкарыстання" "Новае акно" @@ -133,7 +132,6 @@ "Шпалеры і стыль" "Змяніць Галоўны экран" "Налады галоўнага экрана" - "Праграмы" "Адключаная адміністратарам" "Дазволіць паварот галоўнага экрана" "Пры павароце тэлефона" @@ -220,4 +218,14 @@ "Усталяваць" "Усталяваць праграмы ў прыватнай прасторы" "Дадавайце файлы і іншае змесціва ў прыватную прастору" + + + + + + + + + + diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml index f1c849a986..fecd1ad5f0 100644 --- a/res/values-bg/strings.xml +++ b/res/values-bg/strings.xml @@ -133,7 +133,6 @@ "Тапет и стил" "Редактиране на началния екран" "Настройки за началния екран" - "Приложения" "Деактивирано от администратора ви" "Разрешаване на завъртането на началния екран" "При завъртане на телефона" @@ -220,4 +219,14 @@ "Инсталиране" "Инсталиране на приложения в частно пространство" "Добавяне на файлове и др. в частно пространство" + + + + + + + + + + diff --git a/res/values-bn/strings.xml b/res/values-bn/strings.xml index 1106d93ca9..ab5874e9ce 100644 --- a/res/values-bn/strings.xml +++ b/res/values-bn/strings.xml @@ -133,7 +133,6 @@ "ওয়ালপেপার এবং স্টাইল" "হোম স্ক্রিন এডিট করুন" "হোম সেটিংস" - "অ্যাপ" "আপনার প্রশাসক দ্বারা অক্ষম করা হয়েছে" "হোম স্ক্রিন রোটেট করার অনুমতি দিন" "যখন ফোনটি ঘোরানো হয়" @@ -220,4 +219,14 @@ "ইনস্টল করুন" "প্রাইভেট স্পেসে অ্যাপ ইনস্টল করুন" "প্রাইভেট স্পেসে ফাইল ও আরও অনেক কিছু যোগ করুন" + + + + + + + + + + diff --git a/res/values-bs/strings.xml b/res/values-bs/strings.xml index ab12756cd4..642a35a461 100644 --- a/res/values-bs/strings.xml +++ b/res/values-bs/strings.xml @@ -133,7 +133,6 @@ "Pozadinska slika i stil" "Uredi Početni ekran" "Postavke početnog ekrana" - "Aplikacije" "Onemogućio vaš administrator" "Dozvoli rotiranje početnog ekrana" "Kada se telefon zarotira" @@ -220,4 +219,14 @@ "Instalirajte" "Instaliranje aplikacija u privatni prostor" "Dodavanje fajlova i drugih stavki u privatni prostor" + + + + + + + + + + diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index 293823b712..c040d01515 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -133,7 +133,6 @@ "Estil i fons de pantalla" "Edita la pantalla d\'inici" "Configuració de la pantalla d\'inici" - "Aplicacions" "Desactivada per l\'administrador" "Permet la rotació de la pantalla d\'inici" "En girar el telèfon" @@ -220,4 +219,14 @@ "Instal·la" "Instal·la les aplicacions a Espai privat" "Afegeix fitxers i més a Espai privat" + + + + + + + + + + diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 7ff6412566..1764c03d87 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -133,7 +133,6 @@ "Tapety a styl" "Upravit plochu" "Nastavení plochy" - "Aplikace" "Zakázáno administrátorem" "Povolit otáčení plochy" "Při otočení telefonu" @@ -220,4 +219,14 @@ "Nainstalovat" "Instalovat aplikace do soukromého prostoru" "Přidejte do soukromého prostoru soubory a další položky" + + + + + + + + + + diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml index 78fa358523..39dc766922 100644 --- a/res/values-da/strings.xml +++ b/res/values-da/strings.xml @@ -133,7 +133,6 @@ "Baggrund og stil" "Rediger startskærm" "Indst. for startskærm" - "Apps" "Deaktiveret af din administrator" "Tillad rotation af startskærmen" "Når telefonen roteres" @@ -220,4 +219,14 @@ "Installer" "Installer apps i privat område" "Føj filer m.m. til dit private område" + + + + + + + + + + diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index a832a0c398..2bdde9e8b2 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -133,7 +133,6 @@ "Hintergrund & Stil" "Startbildschirm bearbeiten" "Einstellungen" - "Apps" "Von deinem Administrator deaktiviert" "Drehen des Startbildschirms zulassen" "Beim Drehen des Smartphones" @@ -220,4 +219,14 @@ "Installieren" "Apps im vertraulichen Profil installieren" "Dateien und mehr zum vertraulichen Profil hinzufügen" + + + + + + + + + + diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml index 8193165010..fdd37b73f7 100644 --- a/res/values-el/strings.xml +++ b/res/values-el/strings.xml @@ -133,7 +133,6 @@ "Ταπετσαρία και στιλ" "Επεξεργασία αρχικής οθόνης" "Ρυθμ. Αρχικής οθόνης" - "Εφαρμογές" "Απενεργοποιήθηκε από τον διαχειριστή σας" "Να επιτρέπεται η περιστροφή της αρχικής οθόνης" "Όταν το τηλέφωνο περιστρέφεται" @@ -220,4 +219,14 @@ "Εγκατάσταση" "Εγκατάσταση εφαρμογών στον ιδιωτικό χώρο" "Προσθέστε αρχεία και άλλα στοιχεία στον Ιδιωτικό χώρο" + + + + + + + + + + diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml index d855cd0453..f9e84c4c89 100644 --- a/res/values-en-rAU/strings.xml +++ b/res/values-en-rAU/strings.xml @@ -133,7 +133,6 @@ "Wallpaper and style" "Edit home screen" "Home settings" - "Apps" "Disabled by your admin" "Allow home screen rotation" "When phone is rotated" @@ -220,4 +219,14 @@ "Install" "Install apps to private space" "Add files and more to private space" + + + + + + + + + + diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml index f51f5cf6f2..9d4ff5fe30 100644 --- a/res/values-en-rCA/strings.xml +++ b/res/values-en-rCA/strings.xml @@ -132,7 +132,6 @@ "Wallpaper and style" "Edit Home Screen" "Home settings" - "Apps" "Disabled by your admin" "Allow home screen rotation" "When phone is rotated" @@ -219,4 +218,9 @@ "Install" "Install apps to Private Space" "Add files and more to Private Space" + "Circle" + "Square" + "4-sided cookie" + "7-sided cookie" + "Arch" diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml index d855cd0453..f9e84c4c89 100644 --- a/res/values-en-rGB/strings.xml +++ b/res/values-en-rGB/strings.xml @@ -133,7 +133,6 @@ "Wallpaper and style" "Edit home screen" "Home settings" - "Apps" "Disabled by your admin" "Allow home screen rotation" "When phone is rotated" @@ -220,4 +219,14 @@ "Install" "Install apps to private space" "Add files and more to private space" + + + + + + + + + + diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml index d855cd0453..f9e84c4c89 100644 --- a/res/values-en-rIN/strings.xml +++ b/res/values-en-rIN/strings.xml @@ -133,7 +133,6 @@ "Wallpaper and style" "Edit home screen" "Home settings" - "Apps" "Disabled by your admin" "Allow home screen rotation" "When phone is rotated" @@ -220,4 +219,14 @@ "Install" "Install apps to private space" "Add files and more to private space" + + + + + + + + + + diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml index 992b1b144b..eba79c3dfb 100644 --- a/res/values-es-rUS/strings.xml +++ b/res/values-es-rUS/strings.xml @@ -133,7 +133,6 @@ "Fondo de pantalla y estilo" "Editar pantalla principal" "Configuración de pantalla principal" - "Apps" "El administrador inhabilitó esta función" "Permitir la rotación de la pantalla principal" "Al girar el teléfono" @@ -220,4 +219,14 @@ "Instalar" "Instala las apps en el espacio privado" "Agrega archivos y mucho más al Espacio privado" + + + + + + + + + + diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 1160a3d98b..986c6232ec 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -133,7 +133,6 @@ "Fondo de pantalla y estilo" "Editar pantalla de inicio" "Ajustes de la pantalla de inicio" - "Aplicaciones" "Inhabilitado por el administrador" "Permitir rotación de la pantalla de inicio" "Al girar el teléfono" @@ -220,4 +219,14 @@ "Instalar" "Descargar aplicaciones en el espacio privado" "Añade archivos y más al espacio privado" + + + + + + + + + + diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml index 71fb8ab365..89bb55e55a 100644 --- a/res/values-et/strings.xml +++ b/res/values-et/strings.xml @@ -29,8 +29,7 @@ "Avakuva" "Määrake rakendus %1$s seadetes avakuva vaikerakenduseks" "Jagatud ekraanikuva" - - + "Kuvasuhte muutmine" "Rakenduse teave: %1$s" "Kasutuse seaded: %1$s" "Uus aken" @@ -133,7 +132,6 @@ "Taustapilt ja stiil" "Muuda avaekraani" "Avakuva seaded" - "Rakendused" "Keelas administraator" "Luba avakuva pööramine" "Kui telefoni pööratakse" @@ -220,4 +218,14 @@ "Installi" "Rakenduste installimine privaatses ruumis" "Privaatsesse ruumi failide ja muu sisu lisamine" + + + + + + + + + + diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml index 199355e6a6..63f5eebfeb 100644 --- a/res/values-eu/strings.xml +++ b/res/values-eu/strings.xml @@ -133,7 +133,6 @@ "Horma-papera eta estiloa" "Editatu orri nagusia" "Orri nagusiaren ezarpenak" - "Aplikazioak" "Administratzaileak desgaitu du" "Eman orri nagusia biratzeko baimena" "Telefonoa biratzean" @@ -220,4 +219,14 @@ "Instalatu" "Instalatu aplikazioak eremu pribatuan" "Gehitu fitxategiak eta gauza gehiago eremu pribatuan" + + + + + + + + + + diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index 3c0ef1e521..7a49dfe841 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -133,7 +133,6 @@ "کاغذدیواری و سبک" "ویرایش «صفحه اصلی»" "تنظیمات صفحه اصلی" - "برنامه‌ها" "توسط سرپرست سیستم غیرفعال شده است" "مجاز کردن چرخش صفحه اصلی" "وقتی تلفن چرخانده می‌شود" @@ -220,4 +219,14 @@ "نصب" "نصب برنامه‌ها در «فضای خصوصی»" "افزودن فایل‌ها و موارد دیگر به «فضای خصوصی»" + + + + + + + + + + diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml index 9d478f7677..01d77ef976 100644 --- a/res/values-fi/strings.xml +++ b/res/values-fi/strings.xml @@ -133,7 +133,6 @@ "Taustakuva ja tyyli" "Muokkaa aloitusnäyttöä" "Aloitusnäyttö" - "Sovellukset" "Järjestelmänvalvoja on poistanut toiminnon käytöstä." "Salli aloitusnäytön kiertäminen" "Kun puhelinta kierretään" @@ -220,4 +219,14 @@ "Asenna" "Asenna sovelluksia yksityiseen tilaan" "Lisää tiedostoja ja muuta yksityiseen tilaan" + + + + + + + + + + diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml index 290dfa26ff..df52038173 100644 --- a/res/values-fr-rCA/strings.xml +++ b/res/values-fr-rCA/strings.xml @@ -133,7 +133,6 @@ "Fond d\'écran et style" "Modifier l\'écran d\'accueil" "Paramètres d\'accueil" - "Applis" "Cette fonction est désactivée par votre administrateur" "Autoriser la rotation de l\'écran d\'accueil" "Lorsque vous faites pivoter le téléphone" @@ -220,4 +219,14 @@ "Installer" "Installer des applis dans l\'Espace privé" "Ajouter des fichiers et plus à l\'espace privé" + + + + + + + + + + diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 08731c2039..9ae2b0af0d 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -133,7 +133,6 @@ "Fond d\'écran et style" "Modifier l\'écran d\'accueil" "Paramètres de l\'accueil" - "Applis" "Désactivé par votre administrateur" "Autoriser la rotation de l\'écran d\'accueil" "Lorsque vous faites pivoter le téléphone" @@ -220,4 +219,14 @@ "Installer" "Installer des applis dans l\'espace privé" "Ajoutez des fichiers et bien plus à votre espace privé" + + + + + + + + + + diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml index fcd6634d1e..34adace642 100644 --- a/res/values-gl/strings.xml +++ b/res/values-gl/strings.xml @@ -133,7 +133,6 @@ "Estilo e fondo de pantalla" "Editar pantalla de inicio" "Configuración da pantalla de inicio" - "Aplicacións" "Función desactivada polo administrador" "Permitir xirar a pantalla de inicio" "Ao xirar o teléfono" @@ -220,4 +219,14 @@ "Instalar" "Instalar as aplicacións no espazo privado" "Engade ficheiros e máis elementos ao espazo privado" + + + + + + + + + + diff --git a/res/values-gu/strings.xml b/res/values-gu/strings.xml index 993ce97f58..ba60d13172 100644 --- a/res/values-gu/strings.xml +++ b/res/values-gu/strings.xml @@ -133,7 +133,6 @@ "વૉલપેપર અને સ્ટાઇલ" "હોમ સ્ક્રીનમાં ફેરફાર કરો" "હોમ સેટિંગ" - "ઍપ" "તમારા વ્યવસ્થાપક દ્વારા અક્ષમ કરેલ" "હોમ સ્ક્રીનને ફેરવવાની મંજૂરી આપો" "જ્યારે ફોન ફેરવવામાં આવે ત્યારે" @@ -220,4 +219,14 @@ "ઇન્સ્ટૉલ કરો" "ખાનગી સ્પેસમાં ઍપ ઇન્સ્ટૉલ કરો" "ખાનગી સ્પેસમાં ફાઇલો વગેરે ઉમેરો" + + + + + + + + + + diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml index 4a6e2deecd..1460624321 100644 --- a/res/values-hi/strings.xml +++ b/res/values-hi/strings.xml @@ -133,7 +133,6 @@ "वॉलपेपर और स्टाइल" "होम स्क्रीन में बदलाव करें" "होम स्क्रीन की सेटिंग" - "ऐप्लिकेशन" "आपके एडमिन ने बंद किया हुआ है" "होम स्क्रीन घुमाने की अनुमति दें" "फ़ोन घुुमाए जाने पर" @@ -220,4 +219,14 @@ "इंस्टॉल करें" "प्राइवेट स्पेस में ऐप्लिकेशन इंस्टॉल करें" "प्राइवेट स्पेस में फ़ाइलें और अन्य चीज़ें जोड़ें" + + + + + + + + + + diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml index b8f5f5a1db..76a758ec75 100644 --- a/res/values-hr/strings.xml +++ b/res/values-hr/strings.xml @@ -133,7 +133,6 @@ "Pozadina i stil" "Uredi početni zaslon" "Postavke početnog zaslona" - "Aplikacije" "Onemogućio administrator" "Dopusti zakretanje početnog zaslona" "Kada se telefon zakrene" @@ -220,4 +219,14 @@ "Instalirajte" "Instaliranje aplikacija u privatni prostor" "Dodajte datoteke i druge sadržaje u privatni prostor" + + + + + + + + + + diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml index e8381d6729..fadfc56df6 100644 --- a/res/values-hu/strings.xml +++ b/res/values-hu/strings.xml @@ -29,8 +29,7 @@ "Kezdőképernyő" "A(z) %1$s appot a Beállításokban adhatja meg alapértelmezett kezdőalkalmazásként." "Osztott képernyő" - - + "Méretarány módosítása" "Alkalmazásinformáció a következőhöz: %1$s" "A(z) %1$s használati beállításai" "Új ablak" @@ -133,7 +132,6 @@ "Háttérkép és stílus" "Kezdőképernyő szerkesztése" "Kezdőképernyő beállításai" - "Alkalmazások" "A rendszergazda letiltotta" "A kezdőképernyő elforgatásának engedélyezése" "A telefon elforgatásakor" @@ -220,4 +218,14 @@ "Telepítés" "Alkalmazások telepítése privát területre" "Fájlok és egyebek hozzáadása a privát területhez" + + + + + + + + + + diff --git a/res/values-hy/strings.xml b/res/values-hy/strings.xml index eef0501d1f..363e7b21f3 100644 --- a/res/values-hy/strings.xml +++ b/res/values-hy/strings.xml @@ -29,8 +29,7 @@ "Հիմնական էկրան" "Սահմանել %1$s գործարկիչը որպես մեկնարկի կանխադրված հավելված Կարգավորումներում" "Տրոհել էկրանը" - - + "Փոխել կողմերի հարաբերակցությունը" "Տեղեկություններ %1$s հավելվածի մասին" "Օգտագործման կարգավորումներ (%1$s)" "Նոր պատուհան" @@ -133,7 +132,6 @@ "Պաստառ և ոճ" "Փոփոխել հիմնական էկրանը" "Գլխավոր էկրանի կարգավորումներ" - "Հավելվածներ" "Անջատվել է ձեր ադմինիստրատորի կողմից" "Թույլ տալ հիմնական էկրանի պտտումը" "Հեռախոսը պտտելու դեպքում" @@ -220,4 +218,14 @@ "Տեղադրել" "Հավելվածների տեղադրում անձնական տարածքում" "Ձեր մասնավոր տարածքում ավելացրեք ֆայլեր և ավելին" + + + + + + + + + + diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml index c397aad4cd..d5bb3acda9 100644 --- a/res/values-in/strings.xml +++ b/res/values-in/strings.xml @@ -29,8 +29,7 @@ "Layar utama" "Jadikan %1$s sebagai aplikasi layar utama default di Setelan" "Layar terpisah" - - + "Ubah rasio aspek" "Info aplikasi untuk %1$s" "Setelan penggunaan untuk %1$s" "Jendela Baru" @@ -133,7 +132,6 @@ "Wallpaper & gaya" "Edit Layar Utama" "Setelan layar utama" - "Aplikasi" "Dinonaktifkan oleh admin" "Izinkan layar utama diputar" "Saat ponsel diputar" @@ -220,4 +218,14 @@ "Instal" "Instal aplikasi ke Ruang Pribadi" "Tambahkan file dan lainnya ke Ruang Privasi" + + + + + + + + + + diff --git a/res/values-is/strings.xml b/res/values-is/strings.xml index 5c46728cc1..39d0d8a033 100644 --- a/res/values-is/strings.xml +++ b/res/values-is/strings.xml @@ -133,7 +133,6 @@ "Veggfóður og stíll" "Breyta heimaskjá" "Heimastillingar" - "Forrit" "Gert óvirkt af kerfisstjóra" "Leyfa snúning á heimaskjá" "Þegar símanum er snúið" @@ -220,4 +219,14 @@ "Setja upp" "Setja upp forrit í leynirými" "Bættu skrám og fleiru við leynirými" + + + + + + + + + + diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index bf39ca915f..58957b6e8d 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -132,7 +132,6 @@ "Sfondo e stile" "Modifica schermata Home" "Impostazioni schermata Home" - "App" "Disattivata dall\'amministratore" "Consenti rotazione della schermata Home" "Con il telefono ruotato" @@ -219,4 +218,14 @@ "Installa" "Installa le app su spazi privati" "Aggiungi file e altro allo spazio privato" + + + + + + + + + + diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml index 096fdcef78..3faecd5a15 100644 --- a/res/values-iw/strings.xml +++ b/res/values-iw/strings.xml @@ -133,7 +133,6 @@ "טפט וסגנון" "עריכה של מסך הבית" "הגדרות של מסך הבית" - "אפליקציות" "הושבת על ידי מנהל המערכת שלך" "סיבוב מסך הבית" "כאשר מסובבים את הטלפון" @@ -220,4 +219,14 @@ "התקנה" "התקנת אפליקציות במרחב הפרטי" "הוספת קבצים ופריטים נוספים למרחב הפרטי" + + + + + + + + + + diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml index 3d6fca3d88..e1fb65086a 100644 --- a/res/values-ja/strings.xml +++ b/res/values-ja/strings.xml @@ -29,8 +29,7 @@ "ホーム" "[設定] で %1$s をデフォルトのホームアプリに設定します" "分割画面" - - + "アスペクト比を変更" "%1$s のアプリ情報" "%1$s の使用設定" "新しいウィンドウ" @@ -133,7 +132,6 @@ "壁紙とスタイル" "ホーム画面を編集" "ホームの設定" - "アプリ" "管理者により無効にされています" "ホーム画面の回転を許可" "スマートフォンの向きに合わせます" @@ -220,4 +218,14 @@ "インストール" "プライベート スペースにアプリをインストールします" "プライベート スペースにファイルなどを追加する" + + + + + + + + + + diff --git a/res/values-ka/strings.xml b/res/values-ka/strings.xml index f62fd17d5d..a335454274 100644 --- a/res/values-ka/strings.xml +++ b/res/values-ka/strings.xml @@ -29,8 +29,7 @@ "მთავარი გვერდი" "%1$s-ის დაყენება ნაგულისხმევ Home აპად პარამეტრებში" "ეკრანის გაყოფა" - - + "თანაფარდობის შეცვლა" "%1$s-ის აპის ინფო" "გამოყენების პარამეტრები %1$s-ისთვის" "ახალი ფანჯარა" @@ -133,7 +132,6 @@ "ფონი და სტილი" "მთავარი ეკრანის რედაქტირება" "მთავარი გვერდის პარამეტრები" - "აპები" "გათიშულია თქვენი ადმინისტრატორის მიერ" "მთავარი ეკრანის შეტრიალების დაშვება" "ტელეფონის შეტრიალებისას" @@ -220,4 +218,14 @@ "ინსტალაცია" "კერძო სივრცეში აპების ინსტალაცია" "კერძო სივრცეში დაამატეთ ფაილები და სხვა" + + + + + + + + + + diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml index 6700441f2c..f0188100ba 100644 --- a/res/values-kk/strings.xml +++ b/res/values-kk/strings.xml @@ -133,7 +133,6 @@ "Тұсқағаз және стиль" "Негізгі экранды өзгерту" "Негізгі экран параметрлері" - "Қолданбалар" "Әкімші өшірді" "Негізгі экранды бұруға рұқсат ету" "Телефон бұрылғанда" @@ -220,4 +219,14 @@ "Орнату" "Қолданбаларды \"Құпия кеңістікке\" орнатыңыз." "Құпия кеңістікке файлдар мен басқа да элементтерді қосыңыз" + + + + + + + + + + diff --git a/res/values-km/strings.xml b/res/values-km/strings.xml index efb3290b7e..7b2323ac30 100644 --- a/res/values-km/strings.xml +++ b/res/values-km/strings.xml @@ -29,8 +29,7 @@ "អេក្រង់ដើម" "កំណត់ %1$s ជាកម្មវិធីអេក្រង់ដើមលំនាំដើមនៅក្នុង \"ការកំណត់\"" "មុខងារ​បំបែកអេក្រង់" - - + "ប្ដូរ​​សមាមាត្រ" "ព័ត៌មានកម្មវិធី​សម្រាប់ %1$s" "ការកំណត់ការប្រើប្រាស់សម្រាប់ %1$s" "វិនដូ​ថ្មី" @@ -133,7 +132,6 @@ "ផ្ទាំងរូបភាព និងរចនាបថ" "កែអេក្រង់ដើម" "ការកំណត់​ទំព័រដើម" - "កម្មវិធី" "បានបិទដំណើរការដោយអ្នកគ្រប់គ្រងរបស់អ្នក" "អនុញ្ញាតការបងិ្វលអេក្រង់ដើម" "នៅពេលដែលបង្វិលទូរសព្ទ" @@ -220,4 +218,14 @@ "ដំឡើង" "ដំឡើងកម្មវិធីទៅលំហឯកជន" "បញ្ចូលឯកសារ និងអ្វីៗជាច្រើនទៀតទៅលំហឯកជន" + + + + + + + + + + diff --git a/res/values-kn/strings.xml b/res/values-kn/strings.xml index 83ff4e3deb..a0612f5da1 100644 --- a/res/values-kn/strings.xml +++ b/res/values-kn/strings.xml @@ -29,8 +29,7 @@ "ಹೋಮ್" "ಸೆಟ್ಟಿಂಗ್‌ಗಳಲ್ಲಿ %1$s ಅನ್ನು ಡೀಫಾಲ್ಟ್ ಹೋಮ್ ಆ್ಯಪ್ ಆಗಿ ಸೆಟ್‌ ಮಾಡಿ" "ಸ್ಪ್ಲಿಟ್ ಸ್ಕ್ರೀನ್" - - + "ದೃಶ್ಯಾನುಪಾತವನ್ನು ಬದಲಾಯಿಸಿ" "%1$s ಗಾಗಿ ಆ್ಯಪ್ ಮಾಹಿತಿ" "%1$s ಗೆ ಸಂಬಂಧಿಸಿದ ಬಳಕೆಯ ಸೆಟ್ಟಿಂಗ್‌ಗಳು" "ಹೊಸ ವಿಂಡೋ" @@ -133,7 +132,6 @@ "ವಾಲ್‌ಪೇಪರ್ ಮತ್ತು ಶೈಲಿ" "ಹೋಮ್ ಸ್ಕ್ರೀನ್ ಅನ್ನು ಎಡಿಟ್ ಮಾಡಿ" "ಹೋಮ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳು" - "ಆ್ಯಪ್‌ಗಳು" "ನಿಮ್ಮ ನಿರ್ವಾಹಕರು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿದ್ದಾರೆ" "ಹೋಮ್ ಸ್ಕ್ರೀನ್ ತಿರುಗುವಿಕೆಯನ್ನು ಅನುಮತಿಸಿ" "ಫೋನ್‌ ತಿರುಗಿಸಿದಾಗ" @@ -220,4 +218,14 @@ "ಇನ್‌ಸ್ಟಾಲ್" "ಆ್ಯಪ್‌ಗಳನ್ನು ಪ್ರೈವೇಟ್ ಸ್ಪೇಸ್‌ನಲ್ಲಿ ಇನ್‌ಸ್ಟಾಲ್ ಮಾಡಿ" "ಪ್ರೈವೆಟ್ ಸ್ಪೇಸ್‌ಗೆ ಫೈಲ್‌ಗಳು ಮತ್ತು ಹೆಚ್ಚಿನದನ್ನು ಸೇರಿಸಿ" + + + + + + + + + + diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index 5a8c507b20..b97131f7ca 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -133,7 +133,6 @@ "배경화면 및 스타일" "홈 화면 수정" "홈 설정" - "앱" "관리자가 사용 중지함" "홈 화면 회전 허용" "휴대전화 회전 시" @@ -220,4 +219,14 @@ "설치" "비공개 스페이스에 앱 설치" "비공개 스페이스에 파일 등 추가" + + + + + + + + + + diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml index 6f415446ec..89cba52778 100644 --- a/res/values-ky/strings.xml +++ b/res/values-ky/strings.xml @@ -133,7 +133,6 @@ "Тушкагаз жана стиль" "Башкы экранды түзөтүү" "Башкы бет параметрлери" - "Колдонмолор" "Администраторуңуз өчүрүп койгон" "Башкы экранды бурууга уруксат берүү" "Телефон бурулганда" @@ -220,4 +219,14 @@ "Орнотуу" "Колдонмолорду Жеке мейкиндикке орнотуe" "Жеке мейкиндикке файлдарды жана башкаларды кошуу" + + + + + + + + + + diff --git a/res/values-lo/strings.xml b/res/values-lo/strings.xml index e13e2892e8..183dae7f7b 100644 --- a/res/values-lo/strings.xml +++ b/res/values-lo/strings.xml @@ -132,7 +132,6 @@ "ຮູບພື້ນຫຼັງ ແລະ ຮູບແບບ" "ແກ້ໄຂໂຮມສະກຣີນ" "ການຕັ້ງຄ່າໜ້າຫຼັກ" - "ແອັບ" "ຖືກປິດການນຳໃຊ້ໂດຍຜູ້ເບິ່ງແຍງລະບົບຂອງທ່ານ" "ອະນຸຍາດໃຫ້ໝຸນໜ້າຈໍຢູ່ໂຮມສະກຣີນໄດ້" "ເມື່ອໝຸນໂທລະສັບ" @@ -219,4 +218,14 @@ "ຕິດຕັ້ງ" "ຕິດຕັ້ງແອັບໄປໃສ່ພື້ນທີ່ສ່ວນບຸກຄົນ" "ເພີ່ມໄຟລ໌ ແລະ ອື່ນໆໃສ່ພື້ນທີ່ສ່ວນບຸກຄົນ" + + + + + + + + + + diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml index 2d8924fe35..4bc673dfea 100644 --- a/res/values-lt/strings.xml +++ b/res/values-lt/strings.xml @@ -133,7 +133,6 @@ "Ekrano fonas ir stilius" "Redaguoti pagrindinį ekraną" "Pagrindinio ekrano nustatymai" - "Programos" "Išjungė administratorius" "Leisti pasukti pagrindinį ekraną" "Kai telefonas pasukamas" @@ -220,4 +219,14 @@ "Įdiegti" "Įdiegti programas privačioje erdvėje" "Pridėkite failų ir kt. prie privačios erdvės" + + + + + + + + + + diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml index 268aa986e7..3d98fd6dcc 100644 --- a/res/values-lv/strings.xml +++ b/res/values-lv/strings.xml @@ -133,7 +133,6 @@ "Fona tapete un stils" "Rediģēt sākuma ekrānu" "Sākumlapas iestatījumi" - "Lietotnes" "Atspējojis administrators" "Atļaut sākuma ekrāna pagriešanu" "Pagriežot tālruni" @@ -220,4 +219,14 @@ "Instalēt" "Instalējiet lietotnes privātajā telpā." "Pievienojiet failus un citu saturu privātajai telpai" + + + + + + + + + + diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml index 736c88424f..8125df9d3b 100644 --- a/res/values-mk/strings.xml +++ b/res/values-mk/strings.xml @@ -133,7 +133,6 @@ "Тапет и стил" "Изменете го почетниот екран" "Поставки за почетен екран" - "Апликации" "Оневозможено од администраторот" "Дозволи ротирање на почетниот екран" "Кога телефонот се ротира" @@ -220,4 +219,14 @@ "Инсталирајте" "Инсталирање апликации во „Приватен простор“" "Додавање датотеки и друго во „Приватен простор“" + + + + + + + + + + diff --git a/res/values-ml/strings.xml b/res/values-ml/strings.xml index 6e5e83c60e..9ad25394cd 100644 --- a/res/values-ml/strings.xml +++ b/res/values-ml/strings.xml @@ -29,8 +29,7 @@ "ഹോം" "ക്രമീകരണത്തിൽ %1$s എന്നത് ഡിഫോൾട്ട് ഹോം ആപ്പായി സജ്ജീകരിക്കുക" "സ്‌ക്രീൻ വിഭജന മോഡ്" - - + "വീക്ഷണ അനുപാതം മാറ്റുക" "%1$s എന്നതിന്റെ ആപ്പ് വിവരങ്ങൾ" "%1$s എന്നതിനുള്ള ഉപയോഗ ക്രമീകരണം" "പുതിയ വിന്‍ഡോ" @@ -133,7 +132,6 @@ "വാൾപേപ്പറും സ്‌റ്റൈലും" "ഹോം സ്‌ക്രീൻ എഡിറ്റ് ചെയ്യുക" "ഹോം ക്രമീകരണം" - "ആപ്പുകൾ" "അഡ്മിൻ പ്രവർത്തനരഹിതമാക്കിയിരിക്കുന്നു" "ഹോം സ്ക്രീൻ റൊട്ടേഷൻ അനുവദിക്കുക" "ഫോൺ തിരിച്ച നിലയിലായിരിക്കുമ്പോൾ" @@ -220,4 +218,14 @@ "ഇൻസ്റ്റാൾ ചെയ്യുക" "സ്വകാര്യ സ്പേസിലേക്ക് ആപ്പുകൾ ഇൻസ്റ്റാൾ ചെയ്യുക" "സ്വകാര്യ സ്‌പേസിലേക്ക് ഫയലുകളും മറ്റും ചേർക്കുക" + + + + + + + + + + diff --git a/res/values-mn/strings.xml b/res/values-mn/strings.xml index 81fe01ffd5..85ee88d37e 100644 --- a/res/values-mn/strings.xml +++ b/res/values-mn/strings.xml @@ -133,7 +133,6 @@ "Дэлгэцийн зураг, загвар" "Үндсэн нүүрийг засах" "Нүүр хуудасны тохиргоо" - "Апп" "Таны админ идэвхгүй болгосон" "Үндсэн нүүрийг эргүүлэхийг зөвшөөрөх" "Утсыг эргүүлсэн үед" @@ -220,4 +219,14 @@ "Суулгах" "Хувийн орон зайд аппууд суулгана уу" "Хаалттай орон зайд файл болон бусад зүйлийг нэмэх" + + + + + + + + + + diff --git a/res/values-mr/strings.xml b/res/values-mr/strings.xml index 0e2e40415c..4f77899913 100644 --- a/res/values-mr/strings.xml +++ b/res/values-mr/strings.xml @@ -29,8 +29,7 @@ "होम" "सेटिंग्ज मध्ये %1$s हे डीफॉल्ट होम अ‍ॅप म्हणून सेट करा" "स्प्लिट स्क्रीन" - - + "आस्पेक्ट रेशो बदला" "%1$s साठी ॲपशी संबंधित माहिती" "%1$s साठी वापरासंबंधित सेटिंग्ज" "नवीन विंडो" @@ -112,7 +111,7 @@ "विजेट लोड करू शकत नाही" "विजेटची सेटिंग्ज" "सेटअप पूर्ण करण्‍यासाठी टॅप करा" - "हा सिस्टम अ‍ॅप आहे आणि अनइंस्टॉल केला जाऊ शकत नाही." + "हे सिस्टीम अ‍ॅप आहे आणि ते अनइंस्टॉल केले जाऊ शकत नाही." "नाव संपादित करा" "%1$s अक्षम केला आहे" "{count,plural, =1{{app_name} संबंधित # सूचना आहे}other{{app_name} संबंधित # सूचना आहेत}}" @@ -133,7 +132,6 @@ "वॉलपेपर आणि शैली" "होम स्क्रीन संपादित करा" "होम सेटिंग्‍ज" - "ॲप्स" "आपल्या प्रशासकाने अक्षम केले" "होम स्क्रीन फिरवण्‍याची अनुमती द्या" "फोन फिरवला जातो तेव्हा" @@ -220,4 +218,14 @@ "इंस्टॉल करा" "अ‍ॅप्स खाजगी स्पेस मध्ये इंस्टॉल करा" "खाजगी स्पेस मध्ये फाइल आणि आणखी बऱ्याच गोष्टी जोडा" + + + + + + + + + + diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml index 78163083d3..db3b918637 100644 --- a/res/values-ms/strings.xml +++ b/res/values-ms/strings.xml @@ -29,8 +29,7 @@ "Rumah" "Tetapkan %1$s sebagai apl skrin utama lalai dalam Tetapan" "Skrin pisah" - - + "Tukar nisbah bidang" "Maklumat apl untuk %1$s" "Tetapan penggunaan sebanyak %1$s" "Tetingkap Baharu" @@ -133,7 +132,6 @@ "Hiasan latar & gaya" "Edit Skrin Utama" "Tetapan skrin utama" - "Apl" "Dilumpuhkan oleh pentadbir anda" "Benarkan putaran skrin utama" "Apabila telefon diputar" @@ -220,4 +218,14 @@ "Pasang" "Pasang apl pada Ruang Peribadi" "Tambahkan fail dan banyak lagi pada Ruang Persendirian" + + + + + + + + + + diff --git a/res/values-my/strings.xml b/res/values-my/strings.xml index 58956e05b6..bf8e5c4d58 100644 --- a/res/values-my/strings.xml +++ b/res/values-my/strings.xml @@ -132,7 +132,6 @@ "နောက်ခံနှင့် ပုံစံ" "ပင်မစာမျက်နှာ တည်းဖြတ်ရန်" "ပင်မဆက်တင်များ" - "အက်ပ်များ" "သင့်စီမံခန့်ခွဲသူက ပိတ်လိုက်ပါသည်" "ပင်မစာမျက်နှာလှည့်ခြင်းကို ခွင့်ပြုခြင်း" "ဖုန်းကိုလှည့်ထားစဉ်" @@ -219,4 +218,14 @@ "ထည့်သွင်းရန်" "‘သီးသန့်နေရာ’ တွင် အက်ပ်များ ထည့်သွင်းနိုင်သည်" "‘သီးသန့်နေရာ’ တွင် ဖိုင်နှင့် အခြားအရာများ ထည့်နိုင်သည်" + + + + + + + + + + diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml index 16556504a3..6cb88efe5b 100644 --- a/res/values-nb/strings.xml +++ b/res/values-nb/strings.xml @@ -133,7 +133,6 @@ "Bakgrunn og stil" "Endre startsiden" "Startsideinnstillinger" - "Apper" "Administratoren har slått av funksjonen" "Tillat at startskjermen roterer" "Når telefonen roteres" @@ -220,4 +219,14 @@ "Installer" "Installer apper i privat område" "Legg til filer og annet i det private området" + + + + + + + + + + diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml index ad0c83dc71..50ec7dd921 100644 --- a/res/values-ne/strings.xml +++ b/res/values-ne/strings.xml @@ -29,8 +29,7 @@ "होम" "सेटिङमा गई %1$s लाई डिफल्ट होम एपका रूपमा सेट गर्नुहोस्" "स्प्लिट स्क्रिन" - - + "एस्पेक्ट रेसियो परिवर्तन गर्नुहोस्" "%1$s का हकमा एपसम्बन्धी जानकारी" "%1$s को प्रयोगसम्बन्धी सेटिङ" "नयाँ विन्डो" @@ -133,7 +132,6 @@ "वालपेपर तथा शैली" "होम स्क्रिन बदल्नुहोस्" "होम पेजका सेटिङहरू" - "एपहरू" "तपाईँको प्रशासकद्वारा असक्षम गरिएको" "होम स्क्रिन रोटेट हुन दिइयोस्" "फोन घुमाउँदा" @@ -220,4 +218,14 @@ "इन्स्टल गर्नुहोस्" "निजी स्पेसमा एपहरू इन्स्टल गर्नुहोस्" "निजी स्पेसमा फाइल र अन्य कुरा हाल्नुहोस्" + + + + + + + + + + diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 29d16a35e1..7efff200b4 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -29,8 +29,7 @@ "Startscherm" "Stel %1$s in als de standaard startscherm-app in Instellingen" "Gesplitst scherm" - - + "Beeldverhouding wijzigen" "App-info voor %1$s" "Gebruiksinstellingen voor %1$s" "Nieuw venster" @@ -133,7 +132,6 @@ "Achtergrond en stijl" "Startscherm bewerken" "Instellingen Start" - "Apps" "Uitgezet door je beheerder" "Draaien van startscherm toestaan" "Als de telefoon gedraaid is" @@ -220,4 +218,14 @@ "Installeren" "Apps installeren in privégedeelte" "Bestanden en meer toevoegen aan privégedeelte" + + + + + + + + + + diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml index eb3bc2d714..f1e3b9ddf5 100644 --- a/res/values-or/strings.xml +++ b/res/values-or/strings.xml @@ -133,7 +133,6 @@ "ୱାଲପେପର ଏବଂ ଷ୍ଟାଇଲ" "ହୋମ ସ୍କ୍ରିନକୁ ଏଡିଟ କରନ୍ତୁ" "ହୋମ ସେଟିଂସ" - "ଆପ୍ସ" "ଆପଣଙ୍କ ଆଡମିନଙ୍କ ଦ୍ୱାରା ଅକ୍ଷମ କରାଯାଇଛି" "ହୋମ ସ୍କ୍ରିନ ରୋଟେସନକୁ ଅନୁମତି ଦିଅନ୍ତୁ" "ଯେତେବେଳେ ଫୋନକୁ ରୋଟେଟ କରାଯାଇଥାଏ" @@ -220,4 +219,14 @@ "ଇନଷ୍ଟଲ କରନ୍ତୁ" "ଆପ୍ସକୁ ପ୍ରାଇଭେଟ ସ୍ପେସରେ ଇନଷ୍ଟଲ କରନ୍ତୁ" "ପ୍ରାଇଭେଟ ସ୍ପେସରେ ଫାଇଲ ଏବଂ ଅଧିକ ଯୋଗ କରନ୍ତୁ" + + + + + + + + + + diff --git a/res/values-pa/strings.xml b/res/values-pa/strings.xml index 4993922741..e0272ef214 100644 --- a/res/values-pa/strings.xml +++ b/res/values-pa/strings.xml @@ -29,8 +29,7 @@ "ਮੁੱਖ ਪੰਨਾ" "ਸੈਟਿੰਗਾਂ ਵਿੱਚ ਜਾ ਕੇ %1$s ਨੂੰ ਪੂਰਵ-ਨਿਰਧਾਰਿਤ ਹੋਮ ਐਪ ਵਜੋਂ ਸੈੱਟ ਕਰੋ" "ਸਪਲਿਟ ਸਕ੍ਰੀਨ" - - + "ਆਕਾਰ ਅਨੁਪਾਤ ਬਦਲੋ" "%1$s ਲਈ ਐਪ ਜਾਣਕਾਰੀ" "%1$s ਲਈ ਵਰਤੋਂ ਸੈਟਿੰਗਾਂ" "ਨਵੀਂ ਵਿੰਡੋ" @@ -133,7 +132,6 @@ "ਵਾਲਪੇਪਰ ਅਤੇ ਸਟਾਈਲ" "ਹੋਮ ਸਕ੍ਰੀਨ ਦਾ ਸੰਪਾਦਨ ਕਰੋ" "ਹੋਮ ਸੈਟਿੰਗਾਂ" - "ਐਪਾਂ" "ਤੁਹਾਡੇ ਪ੍ਰਸ਼ਾਸਕ ਦੁਆਰਾ ਅਯੋਗ ਬਣਾਈ ਗਈ" "ਹੋਮ ਸਕ੍ਰੀਨ ਨੂੰ ਘੁਮਾਉਣ ਦੀ ਆਗਿਆ ਦਿਓ" "ਜਦੋਂ ਫ਼ੋਨ ਘੁਮਾਇਆ ਜਾਂਦਾ ਹੈ" @@ -220,4 +218,14 @@ "ਸਥਾਪਤ ਕਰੋ" "ਪ੍ਰਾਈਵੇਟ ਸਪੇਸ ਵਿੱਚ ਐਪਾਂ ਸਥਾਪਤ ਕਰੋ" "ਪ੍ਰਾਈਵੇਟ ਸਪੇਸ ਵਿੱਚ ਫ਼ਾਈਲਾਂ ਅਤੇ ਹੋਰ ਚੀਜ਼ਾਂ ਨੂੰ ਸ਼ਾਮਲ ਕਰੋ" + + + + + + + + + + diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 6d70a371dc..4b671f6612 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -133,7 +133,6 @@ "Tapeta i styl" "Edytuj ekran główny" "Ustawienia ekranu głównego" - "Aplikacje" "Funkcja wyłączona przez administratora" "Zezwalaj na obrót ekranu głównego" "Po obróceniu telefonu" @@ -220,4 +219,14 @@ "Zainstaluj" "Zainstaluj aplikacje w przestrzeni prywatnej" "Dodawanie plików i innych elementów do przestrzeni prywatnej" + + + + + + + + + + diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml index fa5daba7c0..039eb2044f 100644 --- a/res/values-pt-rPT/strings.xml +++ b/res/values-pt-rPT/strings.xml @@ -132,7 +132,6 @@ "Imagem fundo/estilo" "Editar ecrã principal" "Definições de início" - "Apps" "Desativada pelo gestor" "Permitir rotação do ecrã principal" "Quando o telemóvel é rodado" @@ -219,4 +218,14 @@ "Instalar" "Instale apps no espaço privado" "Adicione ficheiros e muito mais ao espaço privado" + + + + + + + + + + diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml index 61ad5b57e5..29413a96ff 100644 --- a/res/values-pt/strings.xml +++ b/res/values-pt/strings.xml @@ -133,7 +133,6 @@ "Plano de fundo e estilo" "Editar tela inicial" "Configurações da tela inicial" - "Apps" "Desativado pelo administrador" "Permitir a rotação da tela inicial" "Quando o smartphone for girado" @@ -220,4 +219,14 @@ "Instalar" "Instalar apps no espaço privado" "Adicione arquivos e muito mais ao espaço privado" + + + + + + + + + + diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml index 1bbc8665eb..e116d54d2b 100644 --- a/res/values-ro/strings.xml +++ b/res/values-ro/strings.xml @@ -133,7 +133,6 @@ "Imagine de fundal și stil" "Editează ecranul de pornire" "Setări ecran de pornire" - "Aplicații" "Dezactivată de administrator" "Permite rotirea ecranului de pornire" "Când telefonul este rotit" @@ -220,4 +219,14 @@ "Instalează" "Instalează aplicații în Spațiul privat" "Adaugă fișiere și altele în Spațiul privat" + + + + + + + + + + diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index d6d848b0ba..c7d64d6218 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -133,7 +133,6 @@ "Обои и стиль" "Изменить главный экран" "Главный экран" - "Приложения" "Функция отключена администратором" "Разрешить поворачивать главный экран" "При повороте телефона" @@ -220,4 +219,14 @@ "Установить" "Установить приложения в личном пространстве" "Добавляйте в частное пространство файлы и многое другое" + + + + + + + + + + diff --git a/res/values-si/strings.xml b/res/values-si/strings.xml index 14c63d4acf..407cc002be 100644 --- a/res/values-si/strings.xml +++ b/res/values-si/strings.xml @@ -29,8 +29,7 @@ "මුල් පිටුව" "%1$s සැකසීම් තුළ පෙරනිමි මුල් පිටුව යෙදුම ලෙස සකසන්න" "බෙදුම් තිරය" - - + "දර්ශන අනුපාතය වෙනස් කරන්න" "%1$s සඳහා යෙදුම් තතු" "%1$s සඳහා භාවිත සැකසීම්" "නව කවුළුව" @@ -133,7 +132,6 @@ "වෝල්පේපරය සහ මෝස්තරය" "මුල් තිරය සංස්කරණය කරන්න" "නිවසේ සැකසීම්" - "යෙදුම්" "ඔබගේ පරිපාලක විසින් අබල කරන ලදී" "මුල් තිරය කරකැවීමට ඉඩ දෙන්න" "දුරකථනය කරකවන විට" @@ -220,4 +218,14 @@ "ස්ථාපන කරන්න" "පෞද්ගලික අවකාශයට යෙදුම් ස්ථාපනය කරන්න" "රහසිගත අවකාශයට ගොනු සහ තවත් දේ එක් කරන්න" + + + + + + + + + + diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml index 34ff2b3f95..095a12caf0 100644 --- a/res/values-sk/strings.xml +++ b/res/values-sk/strings.xml @@ -29,8 +29,7 @@ "Domov" "Nastaviť aplikáciu %1$s ako predvolenú vstupnú aplikáciu v Nastaveniach" "Rozdeliť obrazovku" - - + "Zmeniť pomer strán" "Informácie o aplikácii pre %1$s" "Nastavenia používania pre %1$s" "Nové okno" @@ -133,7 +132,6 @@ "Tapeta a štýl" "Upraviť plochu" "Nastavenia plochy" - "Aplikácie" "Zakázané vaším správcom" "Povoliť otáčanie plochy" "Pri otočení telefónu" @@ -220,4 +218,14 @@ "Inštalovať" "Inštalácia aplikácií v súkromnom priestore" "Pridajte do súkromného priestoru súbory a ďalšie položky" + + + + + + + + + + diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml index 931c79f8a7..b531a18617 100644 --- a/res/values-sl/strings.xml +++ b/res/values-sl/strings.xml @@ -29,8 +29,7 @@ "Začetni zaslon" "Nastavitev zaganjalnika %1$s kot privzete aplikacije za začetni zaslon v nastavitvah" "Razdeljen zaslon" - - + "Sprememba razmerja stranic" "Podatki o aplikaciji za: %1$s" "Nastavitve uporabe za »%1$s«" "Novo okno" @@ -133,7 +132,6 @@ "Zaslonsko ozadje in slog" "Urejanje začetnega zaslona" "Začetni zaslon" - "Aplikacije" "Onemogočil skrbnik." "Dovoli sukanje začetnega zaslona" "Ko se telefon zasuka" @@ -220,4 +218,14 @@ "Namestitev" "Nameščanje aplikacij v zasebni prostor" "Dodajte datoteke in drugo v zasebni prostor" + + + + + + + + + + diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml index d013f156f6..2b246938e2 100644 --- a/res/values-sq/strings.xml +++ b/res/values-sq/strings.xml @@ -133,7 +133,6 @@ "Imazhi i sfondit dhe stili" "Modifiko ekranin bazë" "Cilësimet e ekranit bazë" - "Aplikacionet" "Çaktivizuar nga administratori" "Lejo rrotullimin e ekranit bazë" "Kur telefoni rrotullohet" @@ -220,4 +219,14 @@ "Instalo" "Instalo aplikacionet në hapësirën private" "Shto skedarë dhe më shumë te \"Hapësira private\"" + + + + + + + + + + diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml index 11c7f2cbeb..0064ae1e5a 100644 --- a/res/values-sr/strings.xml +++ b/res/values-sr/strings.xml @@ -29,8 +29,7 @@ "Почетни екран" "Подесите %1$s као подразумевану почетну апликацију у Подешавањима" "Подељени екран" - - + "Промени размеру" "Информације о апликацији за: %1$s" "Подешавања потрошње за %1$s" "Нови прозор" @@ -133,7 +132,6 @@ "Позадина и стил" "Измени почетни екран" "Подешавања почетног екрана" - "Апликације" "Администратор је онемогућио" "Дозволи ротацију почетног екрана" "Када се телефон ротира" @@ -220,4 +218,14 @@ "Инсталирајте" "Инсталирај апликације у приватан простор" "Додајте фајлове и друго у приватан простор" + + + + + + + + + + diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index 903525bfab..9a6af48c4c 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -133,7 +133,6 @@ "Bakgrund och utseende" "Redigera startskärm" "Startinställningar" - "Appar" "Inaktiverat av administratören" "Tillåt rotering av startskärmen" "När telefonen vrids" @@ -220,4 +219,14 @@ "Installera" "Installera appar i privat rum" "Lägg till filer och annat i det privata utrymmet" + + + + + + + + + + diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml index 9fe4c77d56..0864703163 100644 --- a/res/values-sw/strings.xml +++ b/res/values-sw/strings.xml @@ -133,7 +133,6 @@ "Mandhari na mtindo" "Badilisha Skrini ya Kwanza" "Mipangilio ya mwanzo" - "Programu" "Imezimwa na msimamizi wako" "Ruhusu kipengele cha kuzungusha skrini ya kwanza" "Simu inapozungushwa" @@ -220,4 +219,14 @@ "Weka" "Sakinisha programu kwenye Sehemu ya Faragha" "Weka faili na mengineyo kwenye Sehemu ya Faragha" + + + + + + + + + + diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml index ad5843ae9b..d9faabcba0 100644 --- a/res/values-ta/strings.xml +++ b/res/values-ta/strings.xml @@ -133,7 +133,6 @@ "வால்பேப்பர் & ஸ்டைல்" "முகப்புத் திரையில் மாற்று" "முகப்பு அமைப்புகள்" - "ஆப்ஸ்" "உங்கள் நிர்வாகி முடக்கியுள்ளார்" "முகப்புத் திரை சுழற்சியை அனுமதித்தல்" "மொபைலைச் சுழற்றும் போது" @@ -220,4 +219,14 @@ "நிறுவுக" "தனிப்பட்ட சேமிப்பிடத்தில் ஆப்ஸை நிறுவும்" "ரகசிய இடத்தில் ஃபைல்கள் மற்றும் பலவற்றைச் சேர்க்கலாம்" + + + + + + + + + + diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml index 7d65733bac..295e0e3d91 100644 --- a/res/values-te/strings.xml +++ b/res/values-te/strings.xml @@ -29,8 +29,7 @@ "మొదటి ట్యాబ్" "సెట్టింగ్‌లలో %1$s‌ను ఆటోమేటిక్ సెట్టింగ్ మొదటి స్క్రీన్ యాప్‌గా సెట్ చేయండి" "స్ప్లిట్ స్క్రీన్" - - + "ఆకార నిష్పత్తిని మార్చండి" "%1$s కోసం యాప్ సమాచారం" "%1$sకు సంబంధించిన వినియోగ సెట్టింగ్‌లు" "కొత్త విండో" @@ -133,7 +132,6 @@ "వాల్‌పేపర్ & స్టయిల్" "మొదటి స్క్రీన్‌ను ఎడిట్ చేయండి" "మొదటి స్క్రీన్ సెట్టింగ్‌లు" - "యాప్‌లు" "మీ నిర్వాహకులు నిలిపివేసారు" "మొదటి స్క్రీన్ రొటేషన్‌ను అనుమతించండి" "ఫోన్‌‌ను తిప్పినప్పుడు" @@ -220,4 +218,14 @@ "ఇన్‌స్టాల్ చేయండి" "ప్రైవేట్ స్పేస్‌కు యాప్‌లను ఇన్‌స్టాల్ చేయండి" "ప్రైవేట్ స్పేస్‌కు ఫైళ్లను, మరిన్నింటిని జోడించండి" + + + + + + + + + + diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml index b6ad3d992e..82fcd64571 100644 --- a/res/values-th/strings.xml +++ b/res/values-th/strings.xml @@ -29,8 +29,7 @@ "หน้าแรก" "ตั้ง %1$s เป็นแอปหน้าแรกเริ่มต้นในการตั้งค่า" "แยกหน้าจอ" - - + "เปลี่ยนสัดส่วนการแสดงผล" "ข้อมูลแอปสำหรับ %1$s" "การตั้งค่าการใช้งานสำหรับ %1$s" "หน้าต่างใหม่" @@ -133,7 +132,6 @@ "วอลเปเปอร์และสไตล์" "แก้ไขหน้าจอหลัก" "การตั้งค่าหน้าจอหลัก" - "แอป" "ปิดใช้โดยผู้ดูแลระบบ" "อนุญาตให้หมุนหน้าจอหลัก" "เมื่อหมุนโทรศัพท์" @@ -220,4 +218,14 @@ "ติดตั้ง" "ติดตั้งแอปไปยังพื้นที่ส่วนตัว" "เพิ่มไฟล์และอื่นๆ ไปยังพื้นที่ส่วนตัว" + + + + + + + + + + diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml index e895e887d9..ec362d545e 100644 --- a/res/values-tl/strings.xml +++ b/res/values-tl/strings.xml @@ -29,8 +29,7 @@ "Home" "Itakda ang %1$s bilang default na home app sa Mga Setting" "Split screen" - - + "Baguhin ang aspect ratio" "Impormasyon ng app para sa %1$s" "Mga setting ng paggamit para sa %1$s" "Bagong Window" @@ -133,7 +132,6 @@ "Wallpaper & istilo" "I-edit ang Home Screen" "Mga setting ng Home" - "Mga App" "Na-disable ng iyong admin" "Payagan ang pag-rotate ng home screen" "Kailan maro-rotate ang telepono" @@ -220,4 +218,14 @@ "I-install" "Mag-install ng mga app sa Pribadong Space" "Magdagdag ng mga file at higit pa sa Pribadong Space" + + + + + + + + + + diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index c46ba12e90..1ef22e60f0 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -133,7 +133,6 @@ "Duvar kağıdı ve stil" "Ana ekranı düzenleyin" "Ana ekran ayarları" - "Uygulamalar" "Yöneticiniz tarafından devre dışı bırakıldı" "Ana ekranı döndürmeye izin ver" "Telefon döndürüldüğünde" @@ -220,4 +219,14 @@ "Yükle" "Uygulamaları özel alana yükleyin" "Özel alana dosya ve başka öğeler ekleyin" + + + + + + + + + + diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml index 558b6118f0..686a872732 100644 --- a/res/values-uk/strings.xml +++ b/res/values-uk/strings.xml @@ -133,7 +133,6 @@ "Оформлення й стиль" "Редагувати головний екран" "Налаштування головного екрана" - "Додатки" "Вимкнув адміністратор" "Дозволити обертання головного екрана" "Коли телефон обертається" @@ -220,4 +219,14 @@ "Установити" "Установити додатки в особистому просторі" "Додавайте файли й інші об’єкти в приватний простір" + + + + + + + + + + diff --git a/res/values-ur/strings.xml b/res/values-ur/strings.xml index 8870b69844..054bfa3f8a 100644 --- a/res/values-ur/strings.xml +++ b/res/values-ur/strings.xml @@ -29,8 +29,7 @@ "ہوم" "ترتیبات میں %1$s کو بطور ڈیفالٹ ہوم ایپ سیٹ کریں" "اسپلٹ اسکرین" - - + "تناسبی شرح کو تبدیل کریں" "‏%1$s کے لیے ایپ کی معلومات" "‏%1$s کیلئے استعمال کی ترتیبات" "نئی ونڈو" @@ -133,7 +132,6 @@ "وال پیپر اور طرز" "ہوم اسکرین میں ترمیم کریں" "ہوم ترتیبات" - "ایپس" "آپ کے منتظم کی طرف سے غیر فعال کر دیا گیا" "ہوم اسکرین گھمانے کی اجازت دیں" "جب فون گھمایا جاتا ہے" @@ -220,4 +218,14 @@ "انسٹال کریں" "پرائیویٹ اسپیس میں ایپس انسٹال کریں" "پرائیویٹ اسپیس میں فائلز وغیرہ شامل کریں" + + + + + + + + + + diff --git a/res/values-uz/strings.xml b/res/values-uz/strings.xml index 13efd694a5..8764ebb5fa 100644 --- a/res/values-uz/strings.xml +++ b/res/values-uz/strings.xml @@ -133,7 +133,6 @@ "Fon rasmi va uslubi" "Bosh ekranni tahrirlash" "Bosh ekran sozlamalari" - "Ilovalar" "Administrator tomonidan o‘chirilgan" "Bosh ekranni burishga ruxsat" "Telefon burilganda" @@ -220,4 +219,14 @@ "Oʻrnatish" "Ilovalarni Maxfiy makonga oʻrnatish" "Maxfiy makonga fayllar va boshqalarni qoʻshish" + + + + + + + + + + diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml index a94126d4a5..7699cda17b 100644 --- a/res/values-vi/strings.xml +++ b/res/values-vi/strings.xml @@ -133,7 +133,6 @@ "Hình nền và phong cách" "Chỉnh sửa Màn hình chính" "Cài đặt màn hình chính" - "Ứng dụng" "Bị tắt bởi quản trị viên của bạn" "Cho phép xoay màn hình chính" "Khi xoay điện thoại" @@ -220,4 +219,14 @@ "Cài đặt" "Cài đặt ứng dụng vào Không gian riêng tư" "Thêm tệp và nội dung khác vào Không gian riêng tư" + + + + + + + + + + diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 7d1c6872b1..993035a1eb 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -133,7 +133,6 @@ "壁纸与风格" "修改主屏幕" "主屏幕设置" - "应用" "已被您的管理员停用" "允许旋转主屏幕" "手机旋转时" @@ -220,4 +219,14 @@ "安装" "将应用安装到私密空间" "将文件等内容添加到私密空间" + + + + + + + + + + diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml index 9c57b544a9..4a65dd5a48 100644 --- a/res/values-zh-rHK/strings.xml +++ b/res/values-zh-rHK/strings.xml @@ -133,7 +133,6 @@ "桌布和樣式" "編輯主畫面" "主畫面設定" - "應用程式" "已由你的管理員停用" "允許旋轉主畫面" "隨手機旋轉" @@ -220,4 +219,14 @@ "安裝" "將應用程式安裝在「私人空間」中" "新增檔案和其他內容到「私人空間」" + + + + + + + + + + diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml index 56de727786..bc9d03e8ad 100644 --- a/res/values-zh-rTW/strings.xml +++ b/res/values-zh-rTW/strings.xml @@ -133,7 +133,6 @@ "桌布和樣式" "編輯主畫面" "主畫面設定" - "應用程式" "已由你的管理員停用" "允許旋轉主畫面" "當手機旋轉時" @@ -220,4 +219,14 @@ "安裝" "將應用程式安裝在私人空間中" "將檔案和其他內容新增至私人空間" + + + + + + + + + + diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml index 2e2085b43e..0c1fa75f27 100644 --- a/res/values-zu/strings.xml +++ b/res/values-zu/strings.xml @@ -133,7 +133,6 @@ "Isithombe sangemuva nesitayela" "Hlela Isikrini Sasekhaya" "Amasethingi asekhaya" - "Ama-app" "Kukhutshazwe umlawuli wakho" "Vumela ukuzungezisa kwesikrini sasekhaya" "Uma ifoni iphendukiswa" @@ -220,4 +219,14 @@ "Faka" "Faka ama-app Endaweni Engasese" "Faka amafayela nokunye Endaweni engasese" + + + + + + + + + + From ec8d20d0ed9ee0629c9d071ce340b381aff152a8 Mon Sep 17 00:00:00 2001 From: Will Osborn Date: Mon, 17 Mar 2025 16:13:34 +0000 Subject: [PATCH 15/21] Refactor RecentsAnimationDeviceState and TaskAnimationManager using new PerDisplay library Test: locally tested on Tangor Bug: 399371607 Flag: EXEMPT refactor Change-Id: Ie52f53a2d5dee757a8dc3b19248736bc15e5e0c6 --- Android.bp | 1 + .../dagger/LauncherConcurrencyModule.kt | 72 ++++++ .../launcher3/dagger/PerDisplayModule.kt | 116 ++++++++++ .../android/quickstep/AbsSwipeUpHandler.java | 8 +- .../quickstep/FallbackSwipeHandler.java | 7 +- .../quickstep/LauncherDisplayRepository.kt | 24 ++ .../quickstep/LauncherSwipeHandlerV2.java | 3 +- .../quickstep/OverviewCommandHelper.kt | 10 +- .../RecentsAnimationDeviceState.java | 120 +++++----- .../quickstep/TaskAnimationManager.java | 27 ++- .../quickstep/TouchInteractionService.java | 205 +++++++++++------- .../dagger/QuickstepBaseAppComponent.java | 8 +- .../fallback/window/RecentsDisplayModel.kt | 12 - .../window/RecentsWindowSwipeHandler.java | 4 +- .../OtherActivityInputConsumer.java | 7 + .../recents/di/RecentsDependencies.kt | 26 ++- .../quickstep/util/ActivityPreloadUtil.kt | 3 +- .../android/quickstep/views/RecentsView.java | 3 +- .../util/ActiveGestureProtoLogProxy.java | 9 + .../model/data/TaskViewItemInfoTest.kt | 5 +- .../quickstep/AbsSwipeUpHandlerTestCase.java | 5 +- .../FallbackSwipeHandlerTestCase.java | 1 + .../quickstep/LauncherSwipeHandlerV2Test.kt | 6 +- .../LauncherSwipeHandlerV2TestCase.java | 1 + .../quickstep/OverviewCommandHelperTest.kt | 1 + .../RecentsAnimationDeviceStateTest.kt | 43 +--- .../RecentsWindowSwipeHandlerTestCase.java | 1 + .../quickstep/TaskAnimationManagerTest.java | 3 +- .../AspectRatioSystemShortcutTests.kt | 14 +- .../quickstep/InputConsumerUtilsTest.java | 10 +- .../launcher3/dagger/LauncherAppModule.java | 4 +- .../graphics/LauncherPreviewRenderer.java | 7 +- .../com/android/launcher3/dagger/Modules.kt | 4 + .../android/launcher3/util/DaggerGraphs.kt | 29 ++- 34 files changed, 547 insertions(+), 252 deletions(-) create mode 100644 quickstep/src/com/android/launcher3/dagger/LauncherConcurrencyModule.kt create mode 100644 quickstep/src/com/android/launcher3/dagger/PerDisplayModule.kt create mode 100644 quickstep/src/com/android/quickstep/LauncherDisplayRepository.kt diff --git a/Android.bp b/Android.bp index 2c4fb37908..9c2d97ba88 100644 --- a/Android.bp +++ b/Android.bp @@ -481,6 +481,7 @@ android_library { "SettingsLibSettingsTheme", "dagger2", "protolog-group", + "displaylib", ], manifest: "quickstep/AndroidManifest.xml", min_sdk_version: "current", diff --git a/quickstep/src/com/android/launcher3/dagger/LauncherConcurrencyModule.kt b/quickstep/src/com/android/launcher3/dagger/LauncherConcurrencyModule.kt new file mode 100644 index 0000000000..cb2220d589 --- /dev/null +++ b/quickstep/src/com/android/launcher3/dagger/LauncherConcurrencyModule.kt @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2025 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.launcher3.dagger + +import android.os.Handler +import android.os.HandlerThread +import android.os.Looper +import android.os.Process +import com.android.launcher3.util.coroutines.DispatcherProvider +import com.android.launcher3.util.coroutines.ProductionDispatchers +import com.android.systemui.dagger.qualifiers.Background +import dagger.Module +import dagger.Provides +import kotlinx.coroutines.CoroutineName +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.SupervisorJob + +/** Dagger Module for per-display thread handling. */ +@Module +object LauncherConcurrencyModule { + // Slow BG executor can potentially affect UI if UI is waiting for an updated state from this + // thread + private const val BG_SLOW_DISPATCH_THRESHOLD = 1000L + private const val BG_SLOW_DELIVERY_THRESHOLD = 1000L + + /** Background Looper */ + @Provides + @LauncherAppSingleton + @Background + fun provideBgLooper(): Looper { + val thread = HandlerThread("LauncherBg", Process.THREAD_PRIORITY_BACKGROUND) + thread.start() + thread + .getLooper() + .setSlowLogThresholdMs(BG_SLOW_DISPATCH_THRESHOLD, BG_SLOW_DELIVERY_THRESHOLD) + return thread.getLooper() + } + + /** + * Background Handler. + * + * Prefer the Background Executor when possible. + */ + @Provides + @Background + fun provideBgHandler(@Background bgLooper: Looper): Handler = Handler(bgLooper) + + /** CoroutineDispatcher provider. */ + @Provides fun provideCoroutineDispatcherProvider(): DispatcherProvider = ProductionDispatchers + + /** Background CoroutineScope provider. */ + @Provides + @Background + fun provideBgCoroutineScope(dispatcherProvider: DispatcherProvider) = + CoroutineScope( + SupervisorJob() + dispatcherProvider.background + CoroutineName("LauncherBg") + ) +} diff --git a/quickstep/src/com/android/launcher3/dagger/PerDisplayModule.kt b/quickstep/src/com/android/launcher3/dagger/PerDisplayModule.kt new file mode 100644 index 0000000000..5a80c527ff --- /dev/null +++ b/quickstep/src/com/android/launcher3/dagger/PerDisplayModule.kt @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2025 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.launcher3.dagger + +import android.content.Context +import android.hardware.display.DisplayManager +import android.os.Handler +import android.util.Log +import android.view.Display.DEFAULT_DISPLAY +import com.android.app.displaylib.DisplayLibBackground +import com.android.app.displaylib.DisplayLibComponent +import com.android.app.displaylib.DisplayRepository +import com.android.app.displaylib.PerDisplayInstanceRepositoryImpl +import com.android.app.displaylib.PerDisplayRepository +import com.android.app.displaylib.SingleInstanceRepositoryImpl +import com.android.app.displaylib.createDisplayLibComponent +import com.android.launcher3.Flags.enableOverviewOnConnectedDisplays +import com.android.launcher3.util.coroutines.DispatcherProvider +import com.android.quickstep.RecentsAnimationDeviceState +import com.android.quickstep.TaskAnimationManager +import com.android.systemui.dagger.qualifiers.Background +import dagger.Binds +import dagger.Module +import dagger.Provides +import kotlinx.coroutines.CoroutineScope + +@Module(includes = [DisplayLibModule::class, PerDisplayRepositoriesModule::class]) +interface PerDisplayModule { + @Binds + @DisplayLibBackground + abstract fun bindDisplayLibBackground(@Background bgScope: CoroutineScope): CoroutineScope +} + +@Module +object PerDisplayRepositoriesModule { + @Provides + fun provideRecentsAnimationDeviceStateRepo( + repositoryFactory: PerDisplayInstanceRepositoryImpl.Factory, + instanceFactory: RecentsAnimationDeviceState.Factory, + ): PerDisplayRepository { + return if (enableOverviewOnConnectedDisplays()) { + repositoryFactory.create("RecentsAnimationDeviceStateRepo", instanceFactory::create) + } else { + SingleInstanceRepositoryImpl( + "RecentsAnimationDeviceStateRepo", + instanceFactory.create(DEFAULT_DISPLAY), + ) + } + } + + @Provides + fun provideTaskAnimationManagerRepo( + repositoryFactory: PerDisplayInstanceRepositoryImpl.Factory, + instanceFactory: TaskAnimationManager.Factory, + ): PerDisplayRepository { + return if (enableOverviewOnConnectedDisplays()) { + repositoryFactory.create("TaskAnimationManagerRepo", instanceFactory::create) + } else { + SingleInstanceRepositoryImpl( + "TaskAnimationManager", + instanceFactory.create(DEFAULT_DISPLAY), + ) + } + } + + @Provides + fun dumpRegistrationLambda(): PerDisplayRepository.InitCallback = + PerDisplayRepository.InitCallback { debugName, _ -> + Log.d("PerDisplayInitCallback", debugName) + } +} + +/** + * Module to bind the DisplayRepository from displaylib to the LauncherAppSingleton dagger graph. + */ +@Module +object DisplayLibModule { + @Provides + @LauncherAppSingleton + fun displayLibComponent( + @ApplicationContext context: Context, + @Background bgHandler: Handler, + @Background bgApplicationScope: CoroutineScope, + coroutineDispatcherProvider: DispatcherProvider, + ): DisplayLibComponent { + val displayManager = context.getSystemService(DisplayManager::class.java) + return createDisplayLibComponent( + displayManager, + bgHandler, + bgApplicationScope, + coroutineDispatcherProvider.background, + ) + } + + @Provides + @LauncherAppSingleton + fun providesDisplayRepositoryFromLib( + displayLibComponent: DisplayLibComponent + ): DisplayRepository { + return displayLibComponent.displayRepository + } +} diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 48630b11d3..15f2496285 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -380,12 +380,12 @@ public abstract class AbsSwipeUpHandler< private final MSDLPlayerWrapper mMSDLPlayerWrapper; public AbsSwipeUpHandler(Context context, - TaskAnimationManager taskAnimationManager, GestureState gestureState, + TaskAnimationManager taskAnimationManager, RecentsAnimationDeviceState deviceState, + GestureState gestureState, long touchTimeMs, boolean continuingLastGesture, InputConsumerController inputConsumer, MSDLPlayerWrapper msdlPlayerWrapper) { super(context, gestureState); - mDeviceState = RecentsAnimationDeviceState.INSTANCE.get(mContext); mContainerInterface = gestureState.getContainerInterface(); mContextInitListener = mContainerInterface.createActivityInitListener(this::onActivityInit); @@ -400,6 +400,7 @@ public abstract class AbsSwipeUpHandler< endLauncherTransitionController(); }, new InputProxyHandlerFactory(mContainerInterface, mGestureState)); mTaskAnimationManager = taskAnimationManager; + mDeviceState = deviceState; mTouchTimeMs = touchTimeMs; mContinuingLastGesture = continuingLastGesture; @@ -2787,6 +2788,7 @@ public abstract class AbsSwipeUpHandler< } public interface Factory { - AbsSwipeUpHandler newHandler(GestureState gestureState, long touchTimeMs); + @Nullable + AbsSwipeUpHandler newHandler(GestureState gestureState, long touchTimeMs); } } diff --git a/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java b/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java index 9365383880..bc60124e74 100644 --- a/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java +++ b/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java @@ -102,11 +102,12 @@ public class FallbackSwipeHandler extends private boolean mAppCanEnterPip; - public FallbackSwipeHandler(Context context, - TaskAnimationManager taskAnimationManager, GestureState gestureState, long touchTimeMs, + public FallbackSwipeHandler(Context context, TaskAnimationManager taskAnimationManager, + RecentsAnimationDeviceState deviceState, + GestureState gestureState, long touchTimeMs, boolean continuingLastGesture, InputConsumerController inputConsumer, MSDLPlayerWrapper msdlPlayerWrapper) { - super(context, taskAnimationManager, gestureState, touchTimeMs, + super(context, taskAnimationManager, deviceState, gestureState, touchTimeMs, continuingLastGesture, inputConsumer, msdlPlayerWrapper); mRunningOverHome = mGestureState.getRunningTask() != null diff --git a/quickstep/src/com/android/quickstep/LauncherDisplayRepository.kt b/quickstep/src/com/android/quickstep/LauncherDisplayRepository.kt new file mode 100644 index 0000000000..c56d2781f4 --- /dev/null +++ b/quickstep/src/com/android/quickstep/LauncherDisplayRepository.kt @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2025 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 + +import com.android.launcher3.util.DaggerSingletonObject +import com.android.quickstep.dagger.QuickstepBaseAppComponent + +object LauncherDisplayRepository { + @JvmStatic val INSTANCE = DaggerSingletonObject(QuickstepBaseAppComponent::getDisplayRepository) +} diff --git a/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java b/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java index 4c56f35d90..90557e5316 100644 --- a/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java +++ b/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java @@ -69,9 +69,10 @@ public class LauncherSwipeHandlerV2 extends AbsSwipeUpHandler< QuickstepLauncher, RecentsView, LauncherState> { public LauncherSwipeHandlerV2(Context context, TaskAnimationManager taskAnimationManager, + RecentsAnimationDeviceState deviceState, GestureState gestureState, long touchTimeMs, boolean continuingLastGesture, InputConsumerController inputConsumer, MSDLPlayerWrapper msdlPlayerWrapper) { - super(context, taskAnimationManager, gestureState, touchTimeMs, + super(context, taskAnimationManager, deviceState, gestureState, touchTimeMs, continuingLastGesture, inputConsumer, msdlPlayerWrapper); } diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt b/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt index e37fb145ca..0aea994e69 100644 --- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt +++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt @@ -28,6 +28,7 @@ import android.window.TransitionInfo import androidx.annotation.BinderThread import androidx.annotation.UiThread import androidx.annotation.VisibleForTesting +import com.android.app.displaylib.PerDisplayRepository import com.android.app.tracing.traceSection import com.android.internal.jank.Cuj import com.android.launcher3.Flags.enableLargeDesktopWindowingTile @@ -77,6 +78,7 @@ constructor( private val dispatcherProvider: DispatcherProvider = ProductionDispatchers, private val recentsDisplayModel: RecentsDisplayModel, private val taskbarManager: TaskbarManager, + private val taskAnimationManagerRepository: PerDisplayRepository, ) { private val coroutineScope = CoroutineScope(SupervisorJob() + dispatcherProvider.background) @@ -416,6 +418,12 @@ constructor( touchInteractionService .getSwipeUpHandlerFactory(command.displayId) .newHandler(gestureState, command.createTime) + if (interactionHandler == null) { + // Can happen e.g. when a display is disconnected, so try to handle gracefully. + Log.d(TAG, "AbsSwipeUpHandler not available for displayId=${command.displayId})") + ActiveGestureProtoLogProxy.logOnAbsSwipeUpHandlerNotAvailable(command.displayId) + return false + } interactionHandler.setGestureEndCallback { onTransitionComplete(command, interactionHandler, onCallbackResult) } @@ -461,7 +469,7 @@ constructor( } val taskAnimationManager = - recentsDisplayModel.getTaskAnimationManager(command.displayId) + taskAnimationManagerRepository.get(command.displayId) ?: run { Log.e(TAG, "No TaskAnimationManager found for display ${command.displayId}") ActiveGestureProtoLogProxy.logOnTaskAnimationManagerNotAvailable( diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java index 9bf63a0ce7..1ceb2c33cf 100644 --- a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java +++ b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java @@ -17,7 +17,6 @@ package com.android.quickstep; import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; -import static android.view.Display.DEFAULT_DISPLAY; import static android.app.ActivityTaskManager.INVALID_TASK_ID; import static com.android.launcher3.MotionEventsUtils.isTrackpadScroll; @@ -63,11 +62,9 @@ import android.view.ViewConfiguration; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.annotation.VisibleForTesting; +import com.android.app.displaylib.PerDisplayRepository; import com.android.launcher3.dagger.ApplicationContext; -import com.android.launcher3.dagger.LauncherAppComponent; -import com.android.launcher3.dagger.LauncherAppSingleton; import com.android.launcher3.util.DaggerSingletonObject; import com.android.launcher3.util.DaggerSingletonTracker; import com.android.launcher3.util.DisplayController; @@ -76,6 +73,7 @@ import com.android.launcher3.util.DisplayController.Info; import com.android.launcher3.util.NavigationMode; import com.android.launcher3.util.SettingsCache; import com.android.quickstep.TopTaskTracker.CachedTaskInfo; +import com.android.quickstep.dagger.QuickstepBaseAppComponent; import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.util.ContextualSearchStateManager; import com.android.quickstep.util.GestureExclusionManager; @@ -89,16 +87,14 @@ import com.android.systemui.shared.system.TaskStackChangeListener; import com.android.systemui.shared.system.TaskStackChangeListeners; import java.io.PrintWriter; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Inject; +import dagger.assisted.Assisted; +import dagger.assisted.AssistedFactory; +import dagger.assisted.AssistedInject; /** * Manages the state of the system during a swipe up gesture. */ -@LauncherAppSingleton public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, ExclusionListener { static final String SUPPORT_ONE_HANDED_MODE = "ro.support_one_handed_mode"; @@ -107,8 +103,9 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E private static final float QUICKSTEP_TOUCH_SLOP_RATIO_TWO_BUTTON = 3f; private static final float QUICKSTEP_TOUCH_SLOP_RATIO_GESTURAL = 1.414f; - public static DaggerSingletonObject INSTANCE = - new DaggerSingletonObject<>(LauncherAppComponent::getRecentsAnimationDeviceState); + public static final DaggerSingletonObject> + REPOSITORY_INSTANCE = new DaggerSingletonObject<>( + QuickstepBaseAppComponent::getRecentsAnimationDeviceStateRepository); private final Context mContext; private final DisplayController mDisplayController; @@ -123,7 +120,6 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E InputMethodService.canImeRenderGesturalNavButtons(); private @SystemUiStateFlags long mSystemUiStateFlags = QuickStepContract.SYSUI_STATE_AWAKE; - private final Map mSysUIStateFlagsPerDisplay = new ConcurrentHashMap<>(); private NavigationMode mMode = THREE_BUTTONS; private NavBarPosition mNavBarPosition; @@ -140,11 +136,12 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E private int mGestureBlockingTaskId = -1; private @NonNull Region mExclusionRegion = GestureExclusionManager.EMPTY_REGION; private boolean mExclusionListenerRegistered; + private final int mDisplayId; - @VisibleForTesting - @Inject + @AssistedInject RecentsAnimationDeviceState( @ApplicationContext Context context, + @Assisted int displayId, GestureExclusionManager exclusionManager, DisplayController displayController, ContextualSearchStateManager contextualSearchStateManager, @@ -152,6 +149,7 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E SettingsCache settingsCache, DaggerSingletonTracker lifeCycle) { mContext = context; + mDisplayId = displayId; mDisplayController = displayController; mExclusionManager = exclusionManager; mContextualSearchStateManager = contextualSearchStateManager; @@ -357,47 +355,28 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E * Updates the system ui state flags from SystemUI for a specific display. * * @param stateFlags the current {@link SystemUiStateFlags} for the display. - * @param displayId the display's ID. */ - public void setSysUIStateFlagsForDisplay(@SystemUiStateFlags long stateFlags, - int displayId) { - mSysUIStateFlagsPerDisplay.put(displayId, stateFlags); + public void setSysUIStateFlags(@SystemUiStateFlags long stateFlags) { + mSystemUiStateFlags = stateFlags; } /** * Clears the system ui state flags for a specific display. This is called when the display is * destroyed. * - * @param displayId the display's ID. */ - public void clearSysUIStateFlagsForDisplay(int displayId) { - mSysUIStateFlagsPerDisplay.remove(displayId); + public void clearSysUIStateFlags() { + mSystemUiStateFlags = QuickStepContract.SYSUI_STATE_AWAKE; } /** - * @return the system ui state flags for the default display. - */ - // TODO(141886704): See if we can remove this - @SystemUiStateFlags - public long getSysuiStateFlag() { - return getSystemUiStateFlags(DEFAULT_DISPLAY); - } - - /** - * @return the system ui state flags for a given display ID. + * @return the system ui state flags for this display. */ @SystemUiStateFlags - public long getSystemUiStateFlags(int displayId) { - return mSysUIStateFlagsPerDisplay.getOrDefault(displayId, - QuickStepContract.SYSUI_STATE_AWAKE); + public long getSysuiStateFlags() { + return mSystemUiStateFlags; } - /** - * @return the display ids that have sysui state. - */ - public Set getDisplaysWithSysUIState() { - return mSysUIStateFlagsPerDisplay.keySet(); - } /** * Sets the flag that indicates whether a predictive back-to-home animation is in progress */ @@ -416,8 +395,8 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E * @return whether SystemUI is in a state where we can start a system gesture. */ public boolean canStartSystemGesture() { - boolean canStartWithNavHidden = (getSysuiStateFlag() & SYSUI_STATE_NAV_BAR_HIDDEN) == 0 - || (getSysuiStateFlag() & SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY) != 0 + boolean canStartWithNavHidden = (getSysuiStateFlags() & SYSUI_STATE_NAV_BAR_HIDDEN) == 0 + || (getSysuiStateFlags() & SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY) != 0 || mRotationTouchHelper.isTaskListFrozen(); return canStartWithNavHidden && canStartAnyGesture(); } @@ -429,7 +408,7 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E */ public boolean canStartTrackpadGesture() { boolean trackpadGesturesEnabled = - (getSysuiStateFlag() & SYSUI_STATE_TOUCHPAD_GESTURES_DISABLED) == 0; + (getSysuiStateFlags() & SYSUI_STATE_TOUCHPAD_GESTURES_DISABLED) == 0; return trackpadGesturesEnabled && canStartAnyGesture(); } @@ -437,8 +416,8 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E * Common logic to determine if either trackpad or finger gesture can be started */ private boolean canStartAnyGesture() { - boolean homeOrOverviewEnabled = (getSysuiStateFlag() & SYSUI_STATE_HOME_DISABLED) == 0 - || (getSysuiStateFlag() & SYSUI_STATE_OVERVIEW_DISABLED) == 0; + boolean homeOrOverviewEnabled = (getSysuiStateFlags() & SYSUI_STATE_HOME_DISABLED) == 0 + || (getSysuiStateFlags() & SYSUI_STATE_OVERVIEW_DISABLED) == 0; long gestureDisablingStates = SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED | SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING | SYSUI_STATE_QUICK_SETTINGS_EXPANDED @@ -446,7 +425,7 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E | SYSUI_STATE_DEVICE_DREAMING | SYSUI_STATE_DISABLE_GESTURE_SPLIT_INVOCATION | SYSUI_STATE_DISABLE_GESTURE_PIP_ANIMATING; - return (gestureDisablingStates & getSysuiStateFlag()) == 0 && homeOrOverviewEnabled; + return (gestureDisablingStates & getSysuiStateFlags()) == 0 && homeOrOverviewEnabled; } /** @@ -454,35 +433,35 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E * (like camera or maps) */ public boolean isKeyguardShowingOccluded() { - return (getSysuiStateFlag() & SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED) != 0; + return (getSysuiStateFlags() & SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED) != 0; } /** * @return whether screen pinning is enabled and active */ public boolean isScreenPinningActive() { - return (getSysuiStateFlag() & SYSUI_STATE_SCREEN_PINNING) != 0; + return (getSysuiStateFlags() & SYSUI_STATE_SCREEN_PINNING) != 0; } /** * @return whether assistant gesture is constraint */ public boolean isAssistantGestureIsConstrained() { - return (getSysuiStateFlag() & SYSUI_STATE_ASSIST_GESTURE_CONSTRAINED) != 0; + return (getSysuiStateFlags() & SYSUI_STATE_ASSIST_GESTURE_CONSTRAINED) != 0; } /** * @return whether the bubble stack is expanded */ public boolean isBubblesExpanded() { - return (getSysuiStateFlag() & SYSUI_STATE_BUBBLES_EXPANDED) != 0; + return (getSysuiStateFlags() & SYSUI_STATE_BUBBLES_EXPANDED) != 0; } /** * @return whether the global actions dialog is showing */ public boolean isSystemUiDialogShowing() { - return (getSysuiStateFlag() & SYSUI_STATE_DIALOG_SHOWING) != 0; + return (getSysuiStateFlags() & SYSUI_STATE_DIALOG_SHOWING) != 0; } /** @@ -496,35 +475,35 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E * @return whether the accessibility menu is available. */ public boolean isAccessibilityMenuAvailable() { - return (getSysuiStateFlag() & SYSUI_STATE_A11Y_BUTTON_CLICKABLE) != 0; + return (getSysuiStateFlags() & SYSUI_STATE_A11Y_BUTTON_CLICKABLE) != 0; } /** * @return whether the accessibility menu shortcut is available. */ public boolean isAccessibilityMenuShortcutAvailable() { - return (getSysuiStateFlag() & SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE) != 0; + return (getSysuiStateFlags() & SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE) != 0; } /** * @return whether home is disabled (either by SUW/SysUI/device policy) */ public boolean isHomeDisabled() { - return (getSysuiStateFlag() & SYSUI_STATE_HOME_DISABLED) != 0; + return (getSysuiStateFlags() & SYSUI_STATE_HOME_DISABLED) != 0; } /** * @return whether overview is disabled (either by SUW/SysUI/device policy) */ public boolean isOverviewDisabled() { - return (getSysuiStateFlag() & SYSUI_STATE_OVERVIEW_DISABLED) != 0; + return (getSysuiStateFlags() & SYSUI_STATE_OVERVIEW_DISABLED) != 0; } /** * @return whether one-handed mode is enabled and active */ public boolean isOneHandedModeActive() { - return (getSysuiStateFlag() & SYSUI_STATE_ONE_HANDED_ACTIVE) != 0; + return (getSysuiStateFlags() & SYSUI_STATE_ONE_HANDED_ACTIVE) != 0; } /** @@ -587,7 +566,7 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E */ public boolean canTriggerAssistantAction(MotionEvent ev) { return mAssistantAvailable - && !QuickStepContract.isAssistantGestureDisabled(getSysuiStateFlag()) + && !QuickStepContract.isAssistantGestureDisabled(getSysuiStateFlags()) && mRotationTouchHelper.touchInAssistantRegion(ev) && !isTrackpadScroll(ev) && !isLockToAppActive(); @@ -627,7 +606,7 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E /** Returns whether IME is rendering nav buttons, and IME is currently showing. */ public boolean isImeRenderingNavButtons() { return mCanImeRenderGesturalNavButtons && mMode == NO_BUTTON - && ((getSysuiStateFlag() & SYSUI_STATE_IME_VISIBLE) != 0); + && ((getSysuiStateFlags() & SYSUI_STATE_IME_VISIBLE) != 0); } /** @@ -661,7 +640,7 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E /** Returns a string representation of the system ui state flags for the default display. */ public String getSystemUiStateString() { - return getSystemUiStateString(getSysuiStateFlag()); + return getSystemUiStateString(getSysuiStateFlags()); } /** Returns a string representation of the system ui state flags. */ @@ -672,24 +651,29 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E public void dump(PrintWriter pw) { pw.println("DeviceState:"); pw.println(" canStartSystemGesture=" + canStartSystemGesture()); - pw.println(" systemUiFlagsForDefaultDisplay=" + getSysuiStateFlag()); + pw.println(" systemUiFlagsForDefaultDisplay=" + getSysuiStateFlags()); pw.println(" systemUiFlagsDesc=" + getSystemUiStateString()); pw.println(" assistantAvailable=" + mAssistantAvailable); pw.println(" assistantDisabled=" - + QuickStepContract.isAssistantGestureDisabled(getSysuiStateFlag())); + + QuickStepContract.isAssistantGestureDisabled(getSysuiStateFlags())); pw.println(" isOneHandedModeEnabled=" + mIsOneHandedModeEnabled); pw.println(" isSwipeToNotificationEnabled=" + mIsSwipeToNotificationEnabled); pw.println(" deferredGestureRegion=" + mDeferredGestureRegion.getBounds()); pw.println(" exclusionRegion=" + mExclusionRegion.getBounds()); pw.println(" pipIsActive=" + mPipIsActive); pw.println(" predictiveBackToHomeInProgress=" + mIsPredictiveBackToHomeInProgress); - for (int displayId : mSysUIStateFlagsPerDisplay.keySet()) { - pw.println(" systemUiFlagsForDisplay" + displayId + "=" + getSystemUiStateFlags( - displayId)); - pw.println(" systemUiFlagsForDisplay" + displayId + "Desc=" + getSystemUiStateString( - getSystemUiStateFlags(displayId))); - } pw.println(" RotationTouchHelper:"); mRotationTouchHelper.dump(pw); } -} + + public int getDisplayId() { + return mDisplayId; + } + + @AssistedFactory + public interface Factory { + /** Creates a new instance of [RecentsAnimationDeviceState] for a given [displayId]. */ + RecentsAnimationDeviceState create(int displayId); + } + +} \ No newline at end of file diff --git a/quickstep/src/com/android/quickstep/TaskAnimationManager.java b/quickstep/src/com/android/quickstep/TaskAnimationManager.java index cf0a3d570f..2a6b38722a 100644 --- a/quickstep/src/com/android/quickstep/TaskAnimationManager.java +++ b/quickstep/src/com/android/quickstep/TaskAnimationManager.java @@ -41,11 +41,15 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread; +import com.android.app.displaylib.PerDisplayRepository; import com.android.internal.util.ArrayUtils; import com.android.launcher3.Utilities; import com.android.launcher3.config.FeatureFlags; +import com.android.launcher3.dagger.ApplicationContext; import com.android.launcher3.taskbar.TaskbarUIController; +import com.android.launcher3.util.DaggerSingletonObject; import com.android.launcher3.util.DisplayController; +import com.android.quickstep.dagger.QuickstepBaseAppComponent; import com.android.quickstep.fallback.window.RecentsDisplayModel; import com.android.quickstep.fallback.window.RecentsWindowFlags; import com.android.quickstep.fallback.window.RecentsWindowManager; @@ -61,6 +65,10 @@ import java.io.PrintWriter; import java.util.HashMap; import java.util.Locale; +import dagger.assisted.Assisted; +import dagger.assisted.AssistedFactory; +import dagger.assisted.AssistedInject; + public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAnimationListener { public static final boolean SHELL_TRANSITIONS_ROTATION = SystemProperties.getBoolean("persist.wm.debug.shell_transit_rotate", false); @@ -69,7 +77,6 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn private RecentsAnimationCallbacks mCallbacks; private RecentsAnimationTargets mTargets; private TransitionInfo mTransitionInfo; - private RecentsAnimationDeviceState mDeviceState; // Temporary until we can hook into gesture state events private GestureState mLastGestureState; @@ -80,6 +87,10 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn private boolean mShouldIgnoreMotionEvents = false; private final int mDisplayId; + public static final DaggerSingletonObject> + REPOSITORY_INSTANCE = new DaggerSingletonObject<>( + QuickstepBaseAppComponent::getTaskAnimationManagerRepository); + private final TaskStackChangeListener mLiveTileRestartListener = new TaskStackChangeListener() { @Override public void onActivityRestartAttempt(ActivityManager.RunningTaskInfo task, @@ -103,10 +114,11 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn } }; - public TaskAnimationManager(Context ctx, RecentsAnimationDeviceState deviceState, - int displayId) { + @AssistedInject + public TaskAnimationManager( + @ApplicationContext Context ctx, + @Assisted int displayId) { mCtx = ctx; - mDeviceState = deviceState; mDisplayId = displayId; } @@ -524,4 +536,11 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn mLastGestureState.dump(prefix + '\t', pw); } } + + @AssistedFactory + public interface Factory { + /** Creates a new instance of [TaskAnimationManager] for a given [displayId]. */ + TaskAnimationManager create(int displayId); + } + } diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index 6abb681b9c..b059b330ed 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -68,6 +68,8 @@ import androidx.annotation.Nullable; import androidx.annotation.UiThread; import androidx.annotation.VisibleForTesting; +import com.android.app.displaylib.DisplayRepository; +import com.android.app.displaylib.PerDisplayRepository; import com.android.launcher3.ConstantItem; import com.android.launcher3.EncryptionType; import com.android.launcher3.Flags; @@ -94,7 +96,6 @@ import com.android.launcher3.util.TraceHelper; import com.android.quickstep.OverviewCommandHelper.CommandType; import com.android.quickstep.OverviewComponentObserver.OverviewChangeListener; import com.android.quickstep.fallback.window.RecentsDisplayModel; -import com.android.quickstep.fallback.window.RecentsDisplayModel.RecentsDisplayResource; import com.android.quickstep.fallback.window.RecentsWindowSwipeHandler; import com.android.quickstep.inputconsumers.BubbleBarInputConsumer; import com.android.quickstep.inputconsumers.OneHandedModeInputConsumer; @@ -215,12 +216,15 @@ public class TouchInteractionService extends Service { public void onOverviewToggle() { TestLogging.recordEvent(TestProtocol.SEQUENCE_MAIN, "onOverviewToggle"); executeForTouchInteractionService(tis -> { + // TODO: update for non-default displays. + RecentsAnimationDeviceState deviceState = tis.mDeviceStateRepository.get( + DEFAULT_DISPLAY); // If currently screen pinning, do not enter overview - if (tis.mDeviceState.isScreenPinningActive()) { + if (deviceState != null && deviceState.isScreenPinningActive()) { return; } TaskUtils.closeSystemWindowsAsync(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS); - tis.mOverviewCommandHelper.addCommand(CommandType.TOGGLE); + tis.mOverviewCommandHelper.addCommand(CommandType.TOGGLE, DEFAULT_DISPLAY); }); } @@ -258,7 +262,9 @@ public class TouchInteractionService extends Service { @Override public void onAssistantAvailable(boolean available, boolean longPressHomeEnabled) { MAIN_EXECUTOR.execute(() -> executeForTouchInteractionService(tis -> { - tis.mDeviceState.setAssistantAvailable(available); + tis.mDeviceStateRepository.forEach(/* createIfAbsent= */ true, deviceState -> + deviceState.setAssistantAvailable(available) + ); tis.onAssistantVisibilityChanged(); executeForTaskbarManager(taskbarManager -> taskbarManager .onLongPressHomeEnabled(longPressHomeEnabled)); @@ -269,7 +275,9 @@ public class TouchInteractionService extends Service { @Override public void onAssistantVisibilityChanged(float visibility) { MAIN_EXECUTOR.execute(() -> executeForTouchInteractionService(tis -> { - tis.mDeviceState.setAssistantVisibility(visibility); + tis.mDeviceStateRepository.forEach(/* createIfAbsent= */ true, deviceState -> + deviceState.setAssistantVisibility( + visibility)); tis.onAssistantVisibilityChanged(); })); } @@ -292,16 +300,23 @@ public class TouchInteractionService extends Service { public void onSystemUiStateChanged(@SystemUiStateFlags long stateFlags, int displayId) { MAIN_EXECUTOR.execute(() -> executeForTouchInteractionService(tis -> { // Last flags is only used for the default display case. - long lastFlags = tis.mDeviceState.getSysuiStateFlag(); - tis.mDeviceState.setSysUIStateFlagsForDisplay(stateFlags, displayId); - tis.onSystemUiFlagsChanged(lastFlags, displayId); + RecentsAnimationDeviceState deviceState = tis.mDeviceStateRepository.get(displayId); + if (deviceState != null) { + long lastFlags = deviceState.getSysuiStateFlags(); + deviceState.setSysUIStateFlags(stateFlags); + tis.onSystemUiFlagsChanged(lastFlags, displayId); + } })); } @BinderThread public void onActiveNavBarRegionChanges(Region region) { MAIN_EXECUTOR.execute(() -> executeForTouchInteractionService( - tis -> tis.mDeviceState.setDeferredGestureRegion(region))); + tis -> + tis.mDeviceStateRepository.forEach(/* createIfAbsent= */ true, + deviceState -> + deviceState.setDeferredGestureRegion(region)) + )); } @BinderThread @@ -329,7 +344,6 @@ public class TouchInteractionService extends Service { public void onDisplayRemoved(int displayId) { executeForTouchInteractionService(tis -> { tis.mSystemDecorationChangeObserver.notifyOnDisplayRemoved(displayId); - tis.mDeviceState.clearSysUIStateFlagsForDisplay(displayId); }); } @@ -486,7 +500,8 @@ public class TouchInteractionService extends Service { */ public void setPredictiveBackToHomeInProgress(boolean isInProgress) { executeForTouchInteractionService(tis -> - tis.mDeviceState.setPredictiveBackToHomeInProgress(isInProgress)); + tis.mDeviceStateRepository.forEach(/* createIfAbsent= */ true, deviceState -> + deviceState.setPredictiveBackToHomeInProgress(isInProgress))); } /** @@ -514,7 +529,11 @@ public class TouchInteractionService extends Service { */ public void setGestureBlockedTaskId(int taskId) { executeForTouchInteractionService( - tis -> tis.mDeviceState.setGestureBlockingTaskId(taskId)); + tis -> + tis.mDeviceStateRepository.forEach(/* createIfAbsent= */ true, + deviceState -> + deviceState.setGestureBlockingTaskId(taskId)) + ); } /** Refreshes the current overview target. */ @@ -561,9 +580,11 @@ public class TouchInteractionService extends Service { private OverviewCommandHelper mOverviewCommandHelper; private OverviewComponentObserver mOverviewComponentObserver; private InputConsumerController mInputConsumer; - private RecentsAnimationDeviceState mDeviceState; + private PerDisplayRepository mDeviceStateRepository; + private PerDisplayRepository mTaskAnimationManagerRepository; private @NonNull InputConsumer mUncheckedConsumer = InputConsumer.DEFAULT_NO_OP; + private @NonNull InputConsumer mConsumer = InputConsumer.DEFAULT_NO_OP; private Choreographer mMainChoreographer; private boolean mUserUnlocked = false; @@ -588,6 +609,8 @@ public class TouchInteractionService extends Service { private SystemDecorationChangeObserver mSystemDecorationChangeObserver; + private DisplayRepository mDisplayRepository; + @Override public void onCreate() { super.onCreate(); @@ -595,8 +618,10 @@ public class TouchInteractionService extends Service { + " instance=" + System.identityHashCode(this)); // Initialize anything here that is needed in direct boot mode. // Everything else should be initialized in onUserUnlocked() below. + mDisplayRepository = LauncherDisplayRepository.getINSTANCE().get(this); + mDeviceStateRepository = RecentsAnimationDeviceState.REPOSITORY_INSTANCE.get(this); + mTaskAnimationManagerRepository = TaskAnimationManager.REPOSITORY_INSTANCE.get(this); mMainChoreographer = Choreographer.getInstance(); - mDeviceState = RecentsAnimationDeviceState.INSTANCE.get(this); mRotationTouchHelper = RotationTouchHelper.INSTANCE.get(this); mRecentsDisplayModel = RecentsDisplayModel.getINSTANCE().get(this); mSystemDecorationChangeObserver = SystemDecorationChangeObserver.getINSTANCE().get(this); @@ -620,8 +645,10 @@ public class TouchInteractionService extends Service { // Call runOnUserUnlocked() before any other callbacks to ensure everything is initialized. LockedUserState.get(this).runOnUserUnlocked(mUserUnlockedRunnable); + // Assume that the navigation mode changes for all displays at once. mDisplayInfoChangeListener = - mDeviceState.addNavigationModeChangedCallback(this::onNavigationModeChanged); + mDeviceStateRepository.get(DEFAULT_DISPLAY).addNavigationModeChangedCallback( + this::onNavigationModeChanged); ScreenOnTracker.INSTANCE.get(this).addListener(mScreenOnListener); } @@ -665,9 +692,9 @@ public class TouchInteractionService extends Service { private void initInputMonitor(String reason) { disposeEventHandlers("Initializing input monitor due to: " + reason); - - if (mDeviceState.isButtonNavMode() - && !mDeviceState.supportsAssistantGestureInButtonNav() + RecentsAnimationDeviceState deviceState = mDeviceStateRepository.get(DEFAULT_DISPLAY); + if (deviceState.isButtonNavMode() + && !deviceState.supportsAssistantGestureInButtonNav() && (mTrackpadsConnected.isEmpty())) { return; } @@ -696,12 +723,13 @@ public class TouchInteractionService extends Service { + " instance=" + System.identityHashCode(this)); mOverviewComponentObserver = OverviewComponentObserver.INSTANCE.get(this); mOverviewCommandHelper = new OverviewCommandHelper(this, - mOverviewComponentObserver, mRecentsDisplayModel, mTaskbarManager); + mOverviewComponentObserver, mRecentsDisplayModel, mTaskbarManager, + mTaskAnimationManagerRepository); mUserUnlocked = true; mInputConsumer.registerInputConsumer(); - for (int displayId : mDeviceState.getDisplaysWithSysUIState()) { - onSystemUiFlagsChanged(mDeviceState.getSystemUiStateFlags(displayId), displayId); - } + mDeviceStateRepository.forEach(/* createIfAbsent= */ true, deviceState -> + onSystemUiFlagsChanged(deviceState.getSysuiStateFlags(), + deviceState.getDisplayId())); onAssistantVisibilityChanged(); // Initialize the task tracker @@ -722,7 +750,8 @@ public class TouchInteractionService extends Service { } private void resetHomeBounceSeenOnQuickstepEnabledFirstTime() { - if (!LockedUserState.get(this).isUserUnlocked() || mDeviceState.isButtonNavMode()) { + if (!LockedUserState.get(this).isUserUnlocked() || mDeviceStateRepository.get( + DEFAULT_DISPLAY).isButtonNavMode()) { // Skip if not yet unlocked (can't read user shared prefs) or if the current navigation // mode doesn't have gestures return; @@ -768,18 +797,18 @@ public class TouchInteractionService extends Service { @UiThread private void onSystemUiFlagsChanged(@SystemUiStateFlags long lastSysUIFlags, int displayId) { if (LockedUserState.get(this).isUserUnlocked()) { - long systemUiStateFlags = mDeviceState.getSystemUiStateFlags(displayId); - mTaskbarManager.onSystemUiFlagsChanged(systemUiStateFlags, displayId); - if (displayId == DEFAULT_DISPLAY) { - // The following don't care about non-default displays, at least for now. If they - // ever will, they should be taken care of. - SystemUiProxy.INSTANCE.get(this).setLastSystemUiStateFlags(systemUiStateFlags); - mOverviewComponentObserver.setHomeDisabled(mDeviceState.isHomeDisabled()); - // TODO b/399371607 - Propagate to taskAnimationManager once overview is multi - // display. - TaskAnimationManager taskAnimationManager = - mRecentsDisplayModel.getTaskAnimationManager(displayId); - if (taskAnimationManager != null) { + RecentsAnimationDeviceState deviceState = mDeviceStateRepository.get(displayId); + TaskAnimationManager taskAnimationManager = mTaskAnimationManagerRepository.get( + displayId); + if (deviceState != null && taskAnimationManager != null) { + long systemUiStateFlags = deviceState.getSysuiStateFlags(); + mTaskbarManager.onSystemUiFlagsChanged(systemUiStateFlags, displayId); + if (displayId == DEFAULT_DISPLAY) { + // The following don't care about non-default displays, at least for now. If + // they + // ever will, they should be taken care of. + SystemUiProxy.INSTANCE.get(this).setLastSystemUiStateFlags(systemUiStateFlags); + mOverviewComponentObserver.setHomeDisabled(deviceState.isHomeDisabled()); taskAnimationManager.onSystemUiFlagsChanged(lastSysUIFlags, systemUiStateFlags); } } @@ -791,7 +820,7 @@ public class TouchInteractionService extends Service { if (LockedUserState.get(this).isUserUnlocked()) { mOverviewComponentObserver.getContainerInterface( DEFAULT_DISPLAY).onAssistantVisibilityChanged( - mDeviceState.getAssistantVisibility()); + mDeviceStateRepository.get(DEFAULT_DISPLAY).getAssistantVisibility()); } } @@ -815,7 +844,8 @@ public class TouchInteractionService extends Service { mDesktopAppLaunchTransitionManager.unregisterTransitions(); } mDesktopAppLaunchTransitionManager = null; - mDeviceState.removeDisplayInfoChangeListener(mDisplayInfoChangeListener); + mDeviceStateRepository.get(DEFAULT_DISPLAY).removeDisplayInfoChangeListener( + mDisplayInfoChangeListener); LockedUserState.get(this).removeOnUserUnlockedRunnable(mUserUnlockedRunnable); ScreenOnTracker.INSTANCE.get(this).removeListener(mScreenOnListener); super.onDestroy(); @@ -855,13 +885,19 @@ public class TouchInteractionService extends Service { return; } - NavigationMode currentNavMode = mDeviceState.getMode(); + RecentsAnimationDeviceState deviceState = mDeviceStateRepository.get(displayId); + if (deviceState == null) { + Log.d(TAG, "RecentsAnimationDeviceState not available for displayId " + displayId); + return; + } + + NavigationMode currentNavMode = deviceState.getMode(); if (mGestureStartNavMode != null && mGestureStartNavMode != currentNavMode) { ActiveGestureProtoLogProxy.logOnInputEventNavModeSwitched( displayId, mGestureStartNavMode.name(), currentNavMode.name()); event.setAction(ACTION_CANCEL); - } else if (mDeviceState.isButtonNavMode() - && !mDeviceState.supportsAssistantGestureInButtonNav() + } else if (deviceState.isButtonNavMode() + && !deviceState.supportsAssistantGestureInButtonNav() && !isTrackpadMotionEvent(event)) { ActiveGestureProtoLogProxy.logOnInputEventThreeButtonNav(displayId); return; @@ -873,8 +909,7 @@ public class TouchInteractionService extends Service { boolean isHoverActionWithoutConsumer = enableCursorHoverStates() && isHoverActionWithoutConsumer(event); - TaskAnimationManager taskAnimationManager = mRecentsDisplayModel.getTaskAnimationManager( - displayId); + TaskAnimationManager taskAnimationManager = mTaskAnimationManagerRepository.get(displayId); if (taskAnimationManager == null) { Log.e(TAG, "TaskAnimationManager not available for displayId " + displayId); ActiveGestureProtoLogProxy.logOnTaskAnimationManagerNotAvailable(displayId); @@ -908,24 +943,24 @@ public class TouchInteractionService extends Service { if (action == ACTION_DOWN || isHoverActionWithoutConsumer) { mRotationTouchHelper.setOrientationTransformIfNeeded(event); - boolean isOneHandedModeActive = mDeviceState.isOneHandedModeActive(); + boolean isOneHandedModeActive = deviceState.isOneHandedModeActive(); boolean isInSwipeUpTouchRegion = mRotationTouchHelper.isInSwipeUpTouchRegion(event); TaskbarActivityContext tac = mTaskbarManager.getCurrentActivityContext(); BubbleControllers bubbleControllers = tac != null ? tac.getBubbleControllers() : null; boolean isOnBubbles = bubbleControllers != null && BubbleBarInputConsumer.isEventOnBubbles(tac, event); - if (mDeviceState.isButtonNavMode() - && mDeviceState.supportsAssistantGestureInButtonNav()) { + if (deviceState.isButtonNavMode() + && deviceState.supportsAssistantGestureInButtonNav()) { reasonString.append("in three button mode which supports Assistant gesture"); // Consume gesture event for Assistant (all other gestures should do nothing). - if (mDeviceState.canTriggerAssistantAction(event)) { + if (deviceState.canTriggerAssistantAction(event)) { reasonString.append(" and event can trigger assistant action, " + "consuming gesture for assistant action"); mGestureState = createGestureState( displayId, mGestureState, getTrackpadGestureType(event)); mUncheckedConsumer = tryCreateAssistantInputConsumer( this, - mDeviceState, + deviceState, inputMonitorCompat, mGestureState, event); @@ -951,7 +986,7 @@ public class TouchInteractionService extends Service { this, mUserUnlocked, mOverviewComponentObserver, - mDeviceState, + deviceState, prevGestureState, mGestureState, taskAnimationManager, @@ -964,9 +999,9 @@ public class TouchInteractionService extends Service { mOverviewCommandHelper, event); mUncheckedConsumer = mConsumer; - } else if ((mDeviceState.isFullyGesturalNavMode() || isTrackpadMultiFingerSwipe(event)) - && mDeviceState.canTriggerAssistantAction(event)) { - reasonString.append(mDeviceState.isFullyGesturalNavMode() + } else if ((deviceState.isFullyGesturalNavMode() || isTrackpadMultiFingerSwipe(event)) + && deviceState.canTriggerAssistantAction(event)) { + reasonString.append(deviceState.isFullyGesturalNavMode() ? "using fully gestural nav and event can trigger assistant action, " + "consuming gesture for assistant action" : "event is a trackpad multi-finger swipe and event can trigger assistant " @@ -977,15 +1012,15 @@ public class TouchInteractionService extends Service { // should not interrupt it. QuickSwitch assumes that interruption can only // happen if the next gesture is also quick switch. mUncheckedConsumer = tryCreateAssistantInputConsumer( - this, mDeviceState, inputMonitorCompat, mGestureState, event); - } else if (mDeviceState.canTriggerOneHandedAction(event)) { + this, deviceState, inputMonitorCompat, mGestureState, event); + } else if (deviceState.canTriggerOneHandedAction(event)) { reasonString.append("event can trigger one-handed action, " + "consuming gesture for one-handed action"); // Consume gesture event for triggering one handed feature. mUncheckedConsumer = new OneHandedModeInputConsumer( this, displayId, - mDeviceState, + deviceState, InputConsumer.createNoOpInputConsumer(displayId), inputMonitorCompat); } else { mUncheckedConsumer = InputConsumer.createNoOpInputConsumer(displayId); @@ -1072,8 +1107,7 @@ public class TouchInteractionService extends Service { GestureState.TrackpadGestureType trackpadGestureType) { final GestureState gestureState; TopTaskTracker.CachedTaskInfo taskInfo; - TaskAnimationManager taskAnimationManager = mRecentsDisplayModel.getTaskAnimationManager( - displayId); + TaskAnimationManager taskAnimationManager = mTaskAnimationManagerRepository.get(displayId); if (taskAnimationManager != null && taskAnimationManager.isRecentsAnimationRunning()) { gestureState = new GestureState( mOverviewComponentObserver, displayId, ActiveGestureLog.INSTANCE.getLogId()); @@ -1098,7 +1132,10 @@ public class TouchInteractionService extends Service { // Log initial state for the gesture. ActiveGestureProtoLogProxy.logRunningTaskPackage(taskInfo.getPackageName()); - ActiveGestureProtoLogProxy.logSysuiStateFlags(mDeviceState.getSystemUiStateString()); + RecentsAnimationDeviceState deviceState = mDeviceStateRepository.get(displayId); + if (deviceState != null) { + ActiveGestureProtoLogProxy.logSysuiStateFlags(deviceState.getSystemUiStateString()); + } return gestureState; } @@ -1133,7 +1170,7 @@ public class TouchInteractionService extends Service { mConsumer = mUncheckedConsumer = InputConsumerUtils.getDefaultInputConsumer( displayId, mUserUnlocked, - mRecentsDisplayModel.getTaskAnimationManager(displayId), + mTaskAnimationManagerRepository.get(displayId), mTaskbarManager, CompoundString.NO_OP); mGestureState = DEFAULT_STATE; @@ -1170,7 +1207,8 @@ public class TouchInteractionService extends Service { int newGesturalHeight = ResourceUtils.getNavbarSize( ResourceUtils.NAVBAR_BOTTOM_GESTURE_SIZE, getApplicationContext().getResources()); - mDeviceState.onOneHandedModeChanged(newGesturalHeight); + mDeviceStateRepository.forEach(/* createIfAbsent= */ true, deviceState -> + deviceState.onOneHandedModeChanged(newGesturalHeight)); return; } @@ -1187,7 +1225,6 @@ public class TouchInteractionService extends Service { if (LockedUserState.get(this).isUserUnlocked()) { PluginManagerWrapper.INSTANCE.get(getBaseContext()).dump(pw); } - mDeviceState.dump(pw); if (mOverviewComponentObserver != null) { mOverviewComponentObserver.dump(pw); } @@ -1206,9 +1243,12 @@ public class TouchInteractionService extends Service { mInputMonitorDisplayModel.dump("\t", pw); } DisplayController.INSTANCE.get(this).dump(pw); - for (RecentsDisplayResource resource : mRecentsDisplayModel.getActiveDisplayResources()) { - int displayId = resource.getDisplayId(); + mDisplayRepository.getDisplayIds().getValue().forEach(displayId -> { pw.println(String.format(Locale.ENGLISH, "TouchState (displayId %d):", displayId)); + RecentsAnimationDeviceState deviceState = mDeviceStateRepository.get(displayId); + if (deviceState != null) { + deviceState.dump(pw); + } RecentsViewContainer createdOverviewContainer = mOverviewComponentObserver == null ? null : mOverviewComponentObserver.getContainerInterface( @@ -1220,8 +1260,12 @@ public class TouchInteractionService extends Service { if (createdOverviewContainer != null) { createdOverviewContainer.getDeviceProfile().dump(this, "", pw); } - resource.getTaskAnimationManager().dump("\t", pw); - } + TaskAnimationManager taskAnimationManager = mTaskAnimationManagerRepository.get( + displayId); + if (taskAnimationManager != null) { + taskAnimationManager.dump("\t", pw); + } + }); pw.println("\tmConsumer=" + mConsumer.getName()); ActiveGestureLog.INSTANCE.dump("", pw); RecentsModel.INSTANCE.get(this).dump("", pw); @@ -1234,29 +1278,44 @@ public class TouchInteractionService extends Service { TopTaskTracker.INSTANCE.get(this).dump(pw); } - private AbsSwipeUpHandler createLauncherSwipeHandler( + private @Nullable AbsSwipeUpHandler createLauncherSwipeHandler( GestureState gestureState, long touchTimeMs) { - TaskAnimationManager taskAnimationManager = mRecentsDisplayModel.getTaskAnimationManager( + TaskAnimationManager taskAnimationManager = mTaskAnimationManagerRepository.get( gestureState.getDisplayId()); - return new LauncherSwipeHandlerV2(this, taskAnimationManager, + RecentsAnimationDeviceState deviceState = mDeviceStateRepository.get( + gestureState.getDisplayId()); + if (taskAnimationManager == null || deviceState == null) { + return null; + } + return new LauncherSwipeHandlerV2(this, taskAnimationManager, deviceState, gestureState, touchTimeMs, taskAnimationManager.isRecentsAnimationRunning(), mInputConsumer, MSDLPlayerWrapper.INSTANCE.get(this)); } - private AbsSwipeUpHandler createFallbackSwipeHandler( + private @Nullable AbsSwipeUpHandler createFallbackSwipeHandler( GestureState gestureState, long touchTimeMs) { - TaskAnimationManager taskAnimationManager = mRecentsDisplayModel.getTaskAnimationManager( + TaskAnimationManager taskAnimationManager = mTaskAnimationManagerRepository.get( gestureState.getDisplayId()); - return new FallbackSwipeHandler(this, taskAnimationManager, + RecentsAnimationDeviceState deviceState = mDeviceStateRepository.get( + gestureState.getDisplayId()); + if (taskAnimationManager == null || deviceState == null) { + return null; + } + return new FallbackSwipeHandler(this, taskAnimationManager, deviceState, gestureState, touchTimeMs, taskAnimationManager.isRecentsAnimationRunning(), mInputConsumer, MSDLPlayerWrapper.INSTANCE.get(this)); } - private AbsSwipeUpHandler createRecentsWindowSwipeHandler( + private @Nullable AbsSwipeUpHandler createRecentsWindowSwipeHandler( GestureState gestureState, long touchTimeMs) { - TaskAnimationManager taskAnimationManager = mRecentsDisplayModel.getTaskAnimationManager( + TaskAnimationManager taskAnimationManager = mTaskAnimationManagerRepository.get( gestureState.getDisplayId()); - return new RecentsWindowSwipeHandler(this, taskAnimationManager, + RecentsAnimationDeviceState deviceState = mDeviceStateRepository.get( + gestureState.getDisplayId()); + if (taskAnimationManager == null || deviceState == null) { + return null; + } + return new RecentsWindowSwipeHandler(this, taskAnimationManager, deviceState, gestureState, touchTimeMs, taskAnimationManager.isRecentsAnimationRunning(), mInputConsumer, MSDLPlayerWrapper.INSTANCE.get(this)); } diff --git a/quickstep/src/com/android/quickstep/dagger/QuickstepBaseAppComponent.java b/quickstep/src/com/android/quickstep/dagger/QuickstepBaseAppComponent.java index 23b8a82b2a..1a744aba56 100644 --- a/quickstep/src/com/android/quickstep/dagger/QuickstepBaseAppComponent.java +++ b/quickstep/src/com/android/quickstep/dagger/QuickstepBaseAppComponent.java @@ -16,6 +16,8 @@ package com.android.quickstep.dagger; +import com.android.app.displaylib.DisplayRepository; +import com.android.app.displaylib.PerDisplayRepository; import com.android.launcher3.dagger.LauncherAppComponent; import com.android.launcher3.dagger.LauncherBaseAppComponent; import com.android.launcher3.model.WellbeingModel; @@ -27,6 +29,7 @@ import com.android.quickstep.RotationTouchHelper; import com.android.quickstep.SimpleOrientationTouchTransformer; import com.android.quickstep.SystemDecorationChangeObserver; import com.android.quickstep.SystemUiProxy; +import com.android.quickstep.TaskAnimationManager; import com.android.quickstep.TopTaskTracker; import com.android.quickstep.fallback.window.RecentsDisplayModel; import com.android.quickstep.logging.SettingsChangeLogger; @@ -64,7 +67,8 @@ public interface QuickstepBaseAppComponent extends LauncherBaseAppComponent { ContextualSearchStateManager getContextualSearchStateManager(); - RecentsAnimationDeviceState getRecentsAnimationDeviceState(); + PerDisplayRepository getRecentsAnimationDeviceStateRepository(); + PerDisplayRepository getTaskAnimationManagerRepository(); RecentsModel getRecentsModel(); @@ -73,4 +77,6 @@ public interface QuickstepBaseAppComponent extends LauncherBaseAppComponent { SimpleOrientationTouchTransformer getSimpleOrientationTouchTransformer(); SystemDecorationChangeObserver getSystemDecorationChangeObserver(); + + DisplayRepository getDisplayRepository(); } diff --git a/quickstep/src/com/android/quickstep/fallback/window/RecentsDisplayModel.kt b/quickstep/src/com/android/quickstep/fallback/window/RecentsDisplayModel.kt index 5b88686cb8..205f9af8f9 100644 --- a/quickstep/src/com/android/quickstep/fallback/window/RecentsDisplayModel.kt +++ b/quickstep/src/com/android/quickstep/fallback/window/RecentsDisplayModel.kt @@ -28,8 +28,6 @@ import com.android.launcher3.util.DaggerSingletonTracker import com.android.launcher3.util.WallpaperColorHints import com.android.quickstep.DisplayModel import com.android.quickstep.FallbackWindowInterface -import com.android.quickstep.RecentsAnimationDeviceState -import com.android.quickstep.TaskAnimationManager import com.android.quickstep.dagger.QuickstepBaseAppComponent import com.android.quickstep.fallback.window.RecentsDisplayModel.RecentsDisplayResource import com.android.quickstep.fallback.window.RecentsWindowFlags.Companion.enableOverviewInWindow @@ -84,10 +82,6 @@ constructor( return getDisplayResource(displayId)?.fallbackWindowInterface } - fun getTaskAnimationManager(displayId: Int): TaskAnimationManager? { - return getDisplayResource(displayId)?.taskAnimationManager - } - val activeDisplayResources: Iterable get() = object : Iterable { @@ -104,12 +98,6 @@ constructor( else null val fallbackWindowInterface = if (enableOverviewInWindow) FallbackWindowInterface(recentsWindowManager) else null - val taskAnimationManager = - TaskAnimationManager( - displayContext, - RecentsAnimationDeviceState.INSTANCE.get(displayContext), - displayId, - ) override fun cleanup() { recentsWindowManager?.destroy() diff --git a/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowSwipeHandler.java b/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowSwipeHandler.java index 0d139b4e9f..a0d790680a 100644 --- a/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowSwipeHandler.java +++ b/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowSwipeHandler.java @@ -67,6 +67,7 @@ import com.android.launcher3.util.MSDLPlayerWrapper; import com.android.quickstep.AbsSwipeUpHandler; import com.android.quickstep.GestureState; import com.android.quickstep.RecentsAnimationController; +import com.android.quickstep.RecentsAnimationDeviceState; import com.android.quickstep.RecentsAnimationTargets; import com.android.quickstep.TaskAnimationManager; import com.android.quickstep.fallback.FallbackRecentsView; @@ -111,9 +112,10 @@ public class RecentsWindowSwipeHandler extends AbsSwipeUpHandler() init { - startDefaultScope(appContext) + startDefaultScope(appContext, dispatcherProvider) } /** @@ -52,11 +52,10 @@ class RecentsDependencies private constructor(appContext: Context) { * are global while others are per-RecentsView. The scope is used to differentiate between * RecentsViews. */ - private fun startDefaultScope(appContext: Context) { + private fun startDefaultScope(appContext: Context, dispatcherProvider: DispatcherProvider) { Log.d(TAG, "startDefaultScope") createScope(DEFAULT_SCOPE_ID).apply { set(RecentsViewData::class.java.simpleName, RecentsViewData()) - val dispatcherProvider: DispatcherProvider = ProductionDispatchers val recentsCoroutineScope = CoroutineScope( SupervisorJob() + dispatcherProvider.unconfined + CoroutineName("RecentsView") @@ -80,7 +79,7 @@ class RecentsDependencies private constructor(appContext: Context) { iconCache, taskVisualsChangedDelegate, recentsCoroutineScope, - ProductionDispatchers, + dispatcherProvider, ) } set(RecentTasksRepository::class.java.simpleName, recentTasksRepository) @@ -241,17 +240,24 @@ class RecentsDependencies private constructor(appContext: Context) { @Volatile private var instance: RecentsDependencies? = null - private fun initialize(context: Context): RecentsDependencies { + private fun initialize( + context: Context, + dispatcherProvider: DispatcherProvider, + ): RecentsDependencies { Log.d(TAG, "initializing") synchronized(this) { - val newInstance = RecentsDependencies(context.applicationContext) + val newInstance = + RecentsDependencies(context.applicationContext, dispatcherProvider) instance = newInstance return newInstance } } - fun maybeInitialize(context: Context): RecentsDependencies { - return instance ?: initialize(context) + fun maybeInitialize( + context: Context, + dispatcherProvider: DispatcherProvider, + ): RecentsDependencies { + return instance ?: initialize(context, dispatcherProvider) } fun getInstance(): RecentsDependencies { diff --git a/quickstep/src/com/android/quickstep/util/ActivityPreloadUtil.kt b/quickstep/src/com/android/quickstep/util/ActivityPreloadUtil.kt index df26b6bb90..3c7ac40a7a 100644 --- a/quickstep/src/com/android/quickstep/util/ActivityPreloadUtil.kt +++ b/quickstep/src/com/android/quickstep/util/ActivityPreloadUtil.kt @@ -46,7 +46,8 @@ object ActivityPreloadUtil { try { if (!LockedUserState.get(ctx).isUserUnlocked) return - val deviceState = RecentsAnimationDeviceState.INSTANCE[ctx] + val deviceState = + RecentsAnimationDeviceState.REPOSITORY_INSTANCE.get(ctx)[ctx.displayId] ?: return val overviewCompObserver = OverviewComponentObserver.INSTANCE[ctx] // Prevent the overview from being started before the real home on first boot diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 8ef3c8c23b..73b7d0fb9d 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -183,6 +183,7 @@ import com.android.launcher3.util.TranslateEdgeEffect; import com.android.launcher3.util.VibratorWrapper; import com.android.launcher3.util.ViewPool; import com.android.launcher3.util.coroutines.DispatcherProvider; +import com.android.launcher3.util.coroutines.ProductionDispatchers; import com.android.quickstep.BaseContainerInterface; import com.android.quickstep.GestureState; import com.android.quickstep.HighResLoadingState; @@ -888,7 +889,7 @@ public abstract class RecentsView< // Start Recents Dependency graph if (enableRefactorTaskThumbnail()) { RecentsDependencies recentsDependencies = RecentsDependencies.Companion.maybeInitialize( - context); + context, ProductionDispatchers.INSTANCE); String scopeId = recentsDependencies.createRecentsViewScope(context); mRecentsViewModel = new RecentsViewModel( recentsDependencies.inject(RecentTasksRepository.class, scopeId), diff --git a/quickstep/src_protolog/com/android/quickstep/util/ActiveGestureProtoLogProxy.java b/quickstep/src_protolog/com/android/quickstep/util/ActiveGestureProtoLogProxy.java index 2532fcf8cf..cfa3e4990c 100644 --- a/quickstep/src_protolog/com/android/quickstep/util/ActiveGestureProtoLogProxy.java +++ b/quickstep/src_protolog/com/android/quickstep/util/ActiveGestureProtoLogProxy.java @@ -561,6 +561,15 @@ public class ActiveGestureProtoLogProxy { displayId); } + public static void logOnAbsSwipeUpHandlerNotAvailable(int displayId) { + ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString( + "AbsSwipeUpHandler not available for displayId=%d", + displayId)); + if (!enableActiveGestureProtoLog() || !isProtoLogInitialized()) return; + ProtoLog.d(ACTIVE_GESTURE_LOG, "AbsSwipeUpHandler not available for displayId=%d", + displayId); + } + public static void logGestureStartSwipeHandler(@NonNull String interactionHandler) { ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString( "OtherActivityInputConsumer.startTouchTrackingForWindowAnimation: " diff --git a/quickstep/tests/multivalentTests/src/com/android/launcher3/model/data/TaskViewItemInfoTest.kt b/quickstep/tests/multivalentTests/src/com/android/launcher3/model/data/TaskViewItemInfoTest.kt index 42adfec82c..6170551420 100644 --- a/quickstep/tests/multivalentTests/src/com/android/launcher3/model/data/TaskViewItemInfoTest.kt +++ b/quickstep/tests/multivalentTests/src/com/android/launcher3/model/data/TaskViewItemInfoTest.kt @@ -30,6 +30,7 @@ import com.android.launcher3.pm.UserCache import com.android.launcher3.util.AllModulesForTest import com.android.launcher3.util.SandboxContext import com.android.launcher3.util.SplitConfigurationOptions +import com.android.launcher3.util.TestDispatcherProvider import com.android.launcher3.util.TransformingTouchDelegate import com.android.launcher3.util.UserIconInfo import com.android.quickstep.TaskOverlayFactory @@ -47,6 +48,7 @@ import com.android.systemui.shared.recents.model.Task.TaskKey import com.google.common.truth.Truth.assertThat import dagger.BindsInstance import dagger.Component +import kotlinx.coroutines.test.StandardTestDispatcher import org.junit.After import org.junit.Before import org.junit.Test @@ -64,6 +66,7 @@ class TaskViewItemInfoTest { private val overlayFactory = mock() private val userCache = mock() private val userInfo = mock() + private val dispatcher = StandardTestDispatcher() @Before fun setUp() { @@ -76,7 +79,7 @@ class TaskViewItemInfoTest { context.initDaggerComponent( DaggerTaskViewItemInfoTest_TestComponent.builder().bindUserCache(userCache) ) - RecentsDependencies.maybeInitialize(context) + RecentsDependencies.maybeInitialize(context, TestDispatcherProvider(dispatcher)) } @After diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java b/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java index 1e2f9ad21c..035c162526 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java @@ -51,7 +51,6 @@ import android.os.SystemClock; import android.platform.test.annotations.DisableFlags; import android.platform.test.annotations.EnableFlags; import android.platform.test.flag.junit.SetFlagsRule; -import android.view.Display; import android.view.RemoteAnimationTarget; import android.view.SurfaceControl; import android.view.ViewTreeObserver; @@ -136,6 +135,7 @@ public abstract class AbsSwipeUpHandlerTestCase< @Mock protected SystemUiController mSystemUiController; @Mock protected GestureState mGestureState; @Mock protected MSDLPlayerWrapper mMSDLPlayerWrapper; + @Mock protected RecentsAnimationDeviceState mDeviceState; @Rule public final MockitoRule mMockitoRule = MockitoJUnit.rule(); @@ -192,8 +192,7 @@ public abstract class AbsSwipeUpHandlerTestCase< @Before public void setUpRecentsContainer() { - mTaskAnimationManager = new TaskAnimationManager(mContext, - RecentsAnimationDeviceState.INSTANCE.get(mContext), DEFAULT_DISPLAY); + mTaskAnimationManager = new TaskAnimationManager(mContext, DEFAULT_DISPLAY); RecentsViewContainer recentsContainer = getRecentsContainer(); RECENTS_VIEW recentsView = getRecentsView(); diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/FallbackSwipeHandlerTestCase.java b/quickstep/tests/multivalentTests/src/com/android/quickstep/FallbackSwipeHandlerTestCase.java index 3489519e74..ef82ee5105 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/FallbackSwipeHandlerTestCase.java +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/FallbackSwipeHandlerTestCase.java @@ -45,6 +45,7 @@ public class FallbackSwipeHandlerTestCase extends AbsSwipeUpHandlerTestCase< return new FallbackSwipeHandler( mContext, mTaskAnimationManager, + mDeviceState, mGestureState, touchTimeMs, continuingLastGesture, diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/LauncherSwipeHandlerV2Test.kt b/quickstep/tests/multivalentTests/src/com/android/quickstep/LauncherSwipeHandlerV2Test.kt index 5661dcf699..ce142cb127 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/LauncherSwipeHandlerV2Test.kt +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/LauncherSwipeHandlerV2Test.kt @@ -53,6 +53,8 @@ class LauncherSwipeHandlerV2Test { @Mock private lateinit var taskAnimationManager: TaskAnimationManager + @Mock private lateinit var deviceState: RecentsAnimationDeviceState + private lateinit var gestureState: GestureState @Mock private lateinit var inputConsumerController: InputConsumerController @@ -89,7 +91,6 @@ class LauncherSwipeHandlerV2Test { DaggerTestComponent.builder() .bindSystemUiProxy(systemUiProxy) .bindRotationHelper(mock(RotationTouchHelper::class.java)) - .bindRecentsState(mock(RecentsAnimationDeviceState::class.java)) ) gestureState = spy( @@ -104,6 +105,7 @@ class LauncherSwipeHandlerV2Test { LauncherSwipeHandlerV2( sandboxContext, taskAnimationManager, + deviceState, gestureState, 0, false, @@ -138,8 +140,6 @@ interface TestComponent : LauncherAppComponent { @BindsInstance fun bindRotationHelper(helper: RotationTouchHelper): Builder - @BindsInstance fun bindRecentsState(state: RecentsAnimationDeviceState): Builder - override fun build(): TestComponent } } diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/LauncherSwipeHandlerV2TestCase.java b/quickstep/tests/multivalentTests/src/com/android/quickstep/LauncherSwipeHandlerV2TestCase.java index 66c4ab5ce3..0d0bec5122 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/LauncherSwipeHandlerV2TestCase.java +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/LauncherSwipeHandlerV2TestCase.java @@ -76,6 +76,7 @@ public class LauncherSwipeHandlerV2TestCase extends AbsSwipeUpHandlerTestCase< return new LauncherSwipeHandlerV2( mContext, mTaskAnimationManager, + mDeviceState, mGestureState, touchTimeMs, continuingLastGesture, diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/OverviewCommandHelperTest.kt b/quickstep/tests/multivalentTests/src/com/android/quickstep/OverviewCommandHelperTest.kt index 600a29c055..3aa1e9fd9d 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/OverviewCommandHelperTest.kt +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/OverviewCommandHelperTest.kt @@ -92,6 +92,7 @@ class OverviewCommandHelperTest { dispatcherProvider = TestDispatcherProvider(dispatcher), recentsDisplayModel = recentsDisplayModel, taskbarManager = mock(), + taskAnimationManagerRepository = mock(), ) ) diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/RecentsAnimationDeviceStateTest.kt b/quickstep/tests/multivalentTests/src/com/android/quickstep/RecentsAnimationDeviceStateTest.kt index a7370b02e9..9f8498b9ee 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/RecentsAnimationDeviceStateTest.kt +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/RecentsAnimationDeviceStateTest.kt @@ -1,6 +1,6 @@ package com.android.quickstep -import android.view.Display +import android.view.Display.DEFAULT_DISPLAY import androidx.test.annotation.UiThreadTest import androidx.test.filters.SmallTest import com.android.launcher3.dagger.LauncherComponentProvider @@ -14,7 +14,6 @@ import com.android.launcher3.util.LauncherMultivalentJUnit import com.android.launcher3.util.NavigationMode import com.android.launcher3.util.SandboxApplication import com.android.quickstep.util.GestureExclusionManager -import com.android.systemui.shared.system.QuickStepContract import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_DEVICE_DREAMING import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_DISABLE_GESTURE_SPLIT_INVOCATION @@ -61,6 +60,7 @@ class RecentsAnimationDeviceStateTest { underTest = RecentsAnimationDeviceState( context, + DEFAULT_DISPLAY, exclusionManager, component.displayController, component.contextualSearchStateManager, @@ -152,7 +152,7 @@ class RecentsAnimationDeviceStateTest { allSysUiStates().forEach { state -> val canStartGesture = !disablingStates.contains(state) - underTest.setSysUIStateFlagsForDisplay(state, Display.DEFAULT_DISPLAY) + underTest.setSysUIStateFlags(state) assertThat(underTest.canStartTrackpadGesture()).isEqualTo(canStartGesture) } } @@ -168,7 +168,7 @@ class RecentsAnimationDeviceStateTest { ) stateToExpectedResult.forEach { (state, allowed) -> - underTest.setSysUIStateFlagsForDisplay(state, Display.DEFAULT_DISPLAY) + underTest.setSysUIStateFlags(state) assertThat(underTest.canStartTrackpadGesture()).isEqualTo(allowed) } } @@ -179,7 +179,7 @@ class RecentsAnimationDeviceStateTest { allSysUiStates().forEach { state -> val canStartGesture = !disablingStates.contains(state) - underTest.setSysUIStateFlagsForDisplay(state, Display.DEFAULT_DISPLAY) + underTest.setSysUIStateFlags(state) assertThat(underTest.canStartSystemGesture()).isEqualTo(canStartGesture) } } @@ -199,42 +199,11 @@ class RecentsAnimationDeviceStateTest { ) stateToExpectedResult.forEach { (state, gestureAllowed) -> - underTest.setSysUIStateFlagsForDisplay(state, Display.DEFAULT_DISPLAY) + underTest.setSysUIStateFlags(state) assertThat(underTest.canStartSystemGesture()).isEqualTo(gestureAllowed) } } - @Test - fun getSystemUiStateFlags_defaultAwake() { - val NOT_EXISTENT_DISPLAY = 2 - assertThat(underTest.getSystemUiStateFlags(NOT_EXISTENT_DISPLAY)) - .isEqualTo(QuickStepContract.SYSUI_STATE_AWAKE) - } - - @Test - fun clearSysUIStateFlagsForDisplay_displayNotReturnedAnymore() { - underTest.setSysUIStateFlagsForDisplay(1, /* displayId= */ 1) - - assertThat(underTest.displaysWithSysUIState).contains(1) - assertThat(underTest.getSystemUiStateFlags(1)).isEqualTo(1) - - underTest.clearSysUIStateFlagsForDisplay(1) - - assertThat(underTest.displaysWithSysUIState).doesNotContain(1) - assertThat(underTest.getSystemUiStateFlags(1)) - .isEqualTo(QuickStepContract.SYSUI_STATE_AWAKE) - } - - @Test - fun setSysUIStateFlagsForDisplay_setsCorrectly() { - underTest.setSysUIStateFlagsForDisplay(1, /* displayId= */ 1) - underTest.setSysUIStateFlagsForDisplay(2, /* displayId= */ 2) - - assertThat(underTest.getSystemUiStateFlags(1)).isEqualTo(1) - assertThat(underTest.getSystemUiStateFlags(2)).isEqualTo(2) - assertThat(underTest.displaysWithSysUIState).containsAtLeast(1, 2) - } - private fun allSysUiStates(): List { // SYSUI_STATES_* are binary flags return (0..SYSUI_STATES_COUNT).map { 1L shl it } diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/RecentsWindowSwipeHandlerTestCase.java b/quickstep/tests/multivalentTests/src/com/android/quickstep/RecentsWindowSwipeHandlerTestCase.java index c1be1cee9b..e2b1a55f97 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/RecentsWindowSwipeHandlerTestCase.java +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/RecentsWindowSwipeHandlerTestCase.java @@ -63,6 +63,7 @@ public class RecentsWindowSwipeHandlerTestCase extends AbsSwipeUpHandlerTestCase return new RecentsWindowSwipeHandler( mContext, mTaskAnimationManager, + mDeviceState, mGestureState, touchTimeMs, continuingLastGesture, diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/TaskAnimationManagerTest.java b/quickstep/tests/multivalentTests/src/com/android/quickstep/TaskAnimationManagerTest.java index fd88a5cb27..11cfa09174 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/TaskAnimationManagerTest.java +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/TaskAnimationManagerTest.java @@ -54,8 +54,7 @@ public class TaskAnimationManagerTest { @Before public void setUp() { MockitoAnnotations.initMocks(this); - mTaskAnimationManager = new TaskAnimationManager(mContext, - RecentsAnimationDeviceState.INSTANCE.get(mContext), Display.DEFAULT_DISPLAY) { + mTaskAnimationManager = new TaskAnimationManager(mContext, Display.DEFAULT_DISPLAY) { @Override SystemUiProxy getSystemUiProxy() { return mSystemUiProxy; diff --git a/quickstep/tests/src/com/android/quickstep/AspectRatioSystemShortcutTests.kt b/quickstep/tests/src/com/android/quickstep/AspectRatioSystemShortcutTests.kt index 10e85e6a1b..fa5766bade 100644 --- a/quickstep/tests/src/com/android/quickstep/AspectRatioSystemShortcutTests.kt +++ b/quickstep/tests/src/com/android/quickstep/AspectRatioSystemShortcutTests.kt @@ -43,6 +43,7 @@ import com.android.launcher3.model.data.ItemInfo import com.android.launcher3.model.data.TaskViewItemInfo import com.android.launcher3.util.RunnableList import com.android.launcher3.util.SplitConfigurationOptions +import com.android.launcher3.util.TestDispatcherProvider import com.android.launcher3.util.TransformingTouchDelegate import com.android.launcher3.util.WindowBounds import com.android.quickstep.orientation.LandscapePagedViewHandler @@ -61,6 +62,7 @@ import com.android.systemui.shared.recents.model.Task import com.android.systemui.shared.recents.model.Task.TaskKey import com.android.window.flags.Flags import com.google.common.truth.Truth.assertThat +import kotlinx.coroutines.test.StandardTestDispatcher import org.junit.After import org.junit.Before import org.junit.Rule @@ -124,8 +126,9 @@ class AspectRatioSystemShortcutTests { private val orientedState: RecentsOrientedState = mock(defaultAnswer = Mockito.RETURNS_DEEP_STUBS) private val taskView: TaskView = - LayoutInflater.from(context).cloneInContext(launcher).inflate(R.layout.task, null) as - TaskView + LayoutInflater.from(context).cloneInContext(launcher).inflate(R.layout.task, null) + as TaskView + private val dispatcher = StandardTestDispatcher() @Before fun setUp() { @@ -139,17 +142,18 @@ class AspectRatioSystemShortcutTests { taskView.setLayoutParams(ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT)) if (enableRefactorTaskThumbnail()) { - val recentsDependencies = RecentsDependencies.maybeInitialize(launcher) + val recentsDependencies = + RecentsDependencies.maybeInitialize(launcher, TestDispatcherProvider(dispatcher)) val scopeId = recentsDependencies.createRecentsViewScope(launcher) recentsDependencies.provide( RecentsRotationStateRepository::class.java, scopeId, - { mock() } + { mock() }, ) recentsDependencies.provide( RecentsDeviceProfileRepository::class.java, scopeId, - { mock() } + { mock() }, ) } } diff --git a/quickstep/tests/src/com/android/quickstep/InputConsumerUtilsTest.java b/quickstep/tests/src/com/android/quickstep/InputConsumerUtilsTest.java index 655560c0a6..bdca74d4f3 100644 --- a/quickstep/tests/src/com/android/quickstep/InputConsumerUtilsTest.java +++ b/quickstep/tests/src/com/android/quickstep/InputConsumerUtilsTest.java @@ -38,6 +38,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; import androidx.test.platform.app.InstrumentationRegistry; +import com.android.app.displaylib.PerDisplayRepository; import com.android.launcher3.DeviceProfile; import com.android.launcher3.anim.AnimatedFloat; import com.android.launcher3.dagger.LauncherAppComponent; @@ -113,6 +114,7 @@ public class InputConsumerUtilsTest { @NonNull @Mock private TaskbarActivityContext mTaskbarActivityContext; @NonNull @Mock private OverviewComponentObserver mOverviewComponentObserver; @NonNull @Mock private RecentsAnimationDeviceState mDeviceState; + @NonNull @Mock private PerDisplayRepository mDeviceStateRepo; @NonNull @Mock private AbsSwipeUpHandler.Factory mSwipeUpHandlerFactory; @NonNull @Mock private TaskbarManager mTaskbarManager; @NonNull @Mock private OverviewCommandHelper mOverviewCommandHelper; @@ -128,7 +130,7 @@ public class InputConsumerUtilsTest { @Before public void setupTaskAnimationManager() { - mTaskAnimationManager = new TaskAnimationManager(mContext, mDeviceState, mDisplayId); + mTaskAnimationManager = new TaskAnimationManager(mContext, mDisplayId); } @Before @@ -136,8 +138,8 @@ public class InputConsumerUtilsTest { mContext.initDaggerComponent(DaggerInputConsumerUtilsTest_TestComponent .builder() .bindLockedState(mLockedUserState) - .bindRotationHelper(mock(RotationTouchHelper.class)) - .bindRecentsState(mDeviceState)); + .bindRotationHelper(mock(RotationTouchHelper.class))); +// .bindRecentsState(mDeviceState)); } @Before @@ -193,6 +195,7 @@ public class InputConsumerUtilsTest { @Before public void setupDeviceState() { + when(mDeviceStateRepo.get(anyInt())).thenReturn(mDeviceState); when(mDeviceState.canStartTrackpadGesture()).thenReturn(true); when(mDeviceState.canStartSystemGesture()).thenReturn(true); when(mDeviceState.isFullyGesturalNavMode()).thenReturn(true); @@ -626,7 +629,6 @@ public class InputConsumerUtilsTest { interface Builder extends LauncherAppComponent.Builder { @BindsInstance Builder bindLockedState(LockedUserState state); @BindsInstance Builder bindRotationHelper(RotationTouchHelper helper); - @BindsInstance Builder bindRecentsState(RecentsAnimationDeviceState state); @Override TestComponent build(); diff --git a/src/com/android/launcher3/dagger/LauncherAppModule.java b/src/com/android/launcher3/dagger/LauncherAppModule.java index 0fd32190c4..ef20a616a6 100644 --- a/src/com/android/launcher3/dagger/LauncherAppModule.java +++ b/src/com/android/launcher3/dagger/LauncherAppModule.java @@ -24,7 +24,9 @@ import dagger.Module; PluginManagerWrapperModule.class, StaticObjectModule.class, WidgetModule.class, - AppModule.class + AppModule.class, + PerDisplayModule.class, + LauncherConcurrencyModule.class, }) public class LauncherAppModule { } diff --git a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java index a062a54ee3..0e9ddd2ab4 100644 --- a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java +++ b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java @@ -84,6 +84,8 @@ import com.android.launcher3.dagger.AppModule; import com.android.launcher3.dagger.LauncherAppComponent; import com.android.launcher3.dagger.LauncherAppSingleton; import com.android.launcher3.dagger.LauncherComponentProvider; +import com.android.launcher3.dagger.LauncherConcurrencyModule; +import com.android.launcher3.dagger.PerDisplayModule; import com.android.launcher3.dagger.PluginManagerWrapperModule; import com.android.launcher3.dagger.StaticObjectModule; import com.android.launcher3.dagger.WindowManagerProxyModule; @@ -670,7 +672,10 @@ public class LauncherPreviewRenderer extends BaseContext ApiWrapperModule.class, PluginManagerWrapperModule.class, StaticObjectModule.class, - AppModule.class}) + AppModule.class, + PerDisplayModule.class, + LauncherConcurrencyModule.class, + }) public interface PreviewAppComponent extends LauncherAppComponent { LoaderTaskFactory getLoaderTaskFactory(); diff --git a/src_no_quickstep/com/android/launcher3/dagger/Modules.kt b/src_no_quickstep/com/android/launcher3/dagger/Modules.kt index 21d8e06cdd..244634022a 100644 --- a/src_no_quickstep/com/android/launcher3/dagger/Modules.kt +++ b/src_no_quickstep/com/android/launcher3/dagger/Modules.kt @@ -44,3 +44,7 @@ abstract class StaticObjectModule { // Module containing bindings for the final derivative app @Module abstract class AppModule {} + +@Module abstract class PerDisplayModule {} + +@Module abstract class LauncherConcurrencyModule {} diff --git a/tests/multivalentTests/src/com/android/launcher3/util/DaggerGraphs.kt b/tests/multivalentTests/src/com/android/launcher3/util/DaggerGraphs.kt index a76ccf015e..22f04f49b6 100644 --- a/tests/multivalentTests/src/com/android/launcher3/util/DaggerGraphs.kt +++ b/tests/multivalentTests/src/com/android/launcher3/util/DaggerGraphs.kt @@ -20,6 +20,8 @@ import com.android.launcher3.FakeLauncherPrefs import com.android.launcher3.LauncherPrefs import com.android.launcher3.dagger.ApiWrapperModule import com.android.launcher3.dagger.AppModule +import com.android.launcher3.dagger.LauncherConcurrencyModule +import com.android.launcher3.dagger.PerDisplayModule import com.android.launcher3.dagger.StaticObjectModule import com.android.launcher3.dagger.WidgetModule import com.android.launcher3.dagger.WindowManagerProxyModule @@ -33,34 +35,29 @@ abstract class FakePrefsModule { @Binds abstract fun bindLauncherPrefs(prefs: FakeLauncherPrefs): LauncherPrefs } -/** All modules. We also exclude the plugin module from tests */ @Module( includes = [ - ApiWrapperModule::class, - WindowManagerProxyModule::class, StaticObjectModule::class, WidgetModule::class, AppModule::class, + PerDisplayModule::class, + LauncherConcurrencyModule::class, ] ) +class CommonModulesForTest + +/** All modules. We also exclude the plugin module from tests */ +@Module( + includes = + [ApiWrapperModule::class, CommonModulesForTest::class, WindowManagerProxyModule::class] +) class AllModulesForTest /** All modules except the WMProxy */ -@Module( - includes = - [ApiWrapperModule::class, StaticObjectModule::class, AppModule::class, WidgetModule::class] -) +@Module(includes = [ApiWrapperModule::class, CommonModulesForTest::class]) class AllModulesMinusWMProxy /** All modules except the ApiWrapper */ -@Module( - includes = - [ - WindowManagerProxyModule::class, - StaticObjectModule::class, - AppModule::class, - WidgetModule::class, - ] -) +@Module(includes = [WindowManagerProxyModule::class, CommonModulesForTest::class]) class AllModulesMinusApiWrapper From cb2b925a50198e3dd04ea636fb4e95df1cb1d4c3 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Thu, 27 Mar 2025 14:21:51 -0700 Subject: [PATCH 16/21] Reland "Reduce calls to surface reparenting and set relative layer" Surface reparenting was happening on every frame since we call applyDepthAndBlur on each frame during animation. Instead we can do it only when base surface is set. mBlurSurface should always be parented to mBaseSurface so no point in calling it again and again. Relative layer changes only when we either draw above or recents. While drawing above recents, mBaseSurface relative layer should be used. mBaseSurfaceOverride otherwise. No point to call this during animation. Added perfetto traces comparison home->all apps, alongwith all other generic overview scenarios which possibly could have caused jank is added here: https://drive.google.com/drive/folders/146K_4WLaOGQcZ1gsuhCFlOCzfZ-mJBw8?resourcekey=0-r1-NnNtYGH88d8DGEvnXZg&usp=sharing Bug: 404647629 Test: Manual. Enter overview from Desktop tile / home. Flag: com.android.launcher3.enable_overview_background_wallpaper_blur Change-Id: I567d6b8615685e5c50ef7b7b15787fa56cb2da79 --- .../quickstep/util/BaseDepthController.java | 186 +++++++++++------- 1 file changed, 116 insertions(+), 70 deletions(-) diff --git a/quickstep/src/com/android/quickstep/util/BaseDepthController.java b/quickstep/src/com/android/quickstep/util/BaseDepthController.java index 89f1e33d6e..80b31b5b96 100644 --- a/quickstep/src/com/android/quickstep/util/BaseDepthController.java +++ b/quickstep/src/com/android/quickstep/util/BaseDepthController.java @@ -122,13 +122,6 @@ public class BaseDepthController { new MultiPropertyFactory<>(this, DEPTH, DEPTH_INDEX_COUNT, Float::max); stateDepth = depthProperty.get(DEPTH_INDEX_STATE_TRANSITION); widgetDepth = depthProperty.get(DEPTH_INDEX_WIDGET); - if (enableOverviewBackgroundWallpaperBlur()) { - mBlurSurface = new SurfaceControl.Builder() - .setName("Overview Blur") - .setHidden(false) - .build(); - } - } protected void setCrossWindowBlursEnabled(boolean isEnabled) { @@ -150,75 +143,74 @@ public class BaseDepthController { protected void onInvalidSurface() { } protected void applyDepthAndBlur() { - float depth = mDepth; - IBinder windowToken = mLauncher.getRootView().getWindowToken(); - if (windowToken != null) { + applyDepthAndBlur(createTransaction()); + } + + protected void applyDepthAndBlur(SurfaceControl.Transaction transaction) { + try (transaction) { + float depth = mDepth; + IBinder windowToken = mLauncher.getRootView().getWindowToken(); + if (windowToken != null) { + if (enableScalingRevealHomeAnimation()) { + mWallpaperManager.setWallpaperZoomOut(windowToken, depth); + } else { + // The API's full zoom-out is three times larger than the zoom-out we apply + // to the + // icons. To keep the two consistent throughout the animation while keeping + // Launcher's concept of full depth unchanged, we divide the depth by 3 here. + mWallpaperManager.setWallpaperZoomOut(windowToken, depth / 3); + } + } + + if (!BlurUtils.supportsBlursOnWindows()) { + return; + } + if (mBaseSurface == null) { + Log.d(TAG, "mSurface is null and mCurrentBlur is: " + mCurrentBlur); + return; + } + if (!mBaseSurface.isValid()) { + Log.d(TAG, "mSurface is not valid"); + mWaitingOnSurfaceValidity = true; + onInvalidSurface(); + return; + } + mWaitingOnSurfaceValidity = false; + boolean hasOpaqueBg = mLauncher.getScrimView().isFullyOpaque(); + boolean isSurfaceOpaque = !mHasContentBehindLauncher && hasOpaqueBg && !mPauseBlurs; + + float blurAmount; if (enableScalingRevealHomeAnimation()) { - mWallpaperManager.setWallpaperZoomOut(windowToken, depth); + blurAmount = mapDepthToBlur(depth); } else { - // The API's full zoom-out is three times larger than the zoom-out we apply to the - // icons. To keep the two consistent throughout the animation while keeping - // Launcher's concept of full depth unchanged, we divide the depth by 3 here. - mWallpaperManager.setWallpaperZoomOut(windowToken, depth / 3); + blurAmount = depth; } - } + mCurrentBlur = !mCrossWindowBlursEnabled || hasOpaqueBg || mPauseBlurs + ? 0 : (int) (blurAmount * mMaxBlurRadius); - if (!BlurUtils.supportsBlursOnWindows()) { - return; - } - if (mBaseSurface == null) { - Log.d(TAG, "mSurface is null and mCurrentBlur is: " + mCurrentBlur); - return; - } - if (!mBaseSurface.isValid()) { - Log.d(TAG, "mSurface is not valid"); - mWaitingOnSurfaceValidity = true; - onInvalidSurface(); - return; - } - mWaitingOnSurfaceValidity = false; - boolean hasOpaqueBg = mLauncher.getScrimView().isFullyOpaque(); - boolean isSurfaceOpaque = !mHasContentBehindLauncher && hasOpaqueBg && !mPauseBlurs; + SurfaceControl blurSurface = + enableOverviewBackgroundWallpaperBlur() && mBlurSurface != null ? mBlurSurface + : mBaseSurface; - float blurAmount; - if (enableScalingRevealHomeAnimation()) { - blurAmount = mapDepthToBlur(depth); - } else { - blurAmount = depth; - } - mCurrentBlur = !mCrossWindowBlursEnabled || hasOpaqueBg || mPauseBlurs - ? 0 : (int) (blurAmount * mMaxBlurRadius); + transaction.setBackgroundBlurRadius(blurSurface, mCurrentBlur) + .setOpaque(blurSurface, isSurfaceOpaque); - SurfaceControl.Transaction transaction = new SurfaceControl.Transaction(); - if (enableOverviewBackgroundWallpaperBlur() && mBlurSurface != null) { - // Reparent to launcher for full screen blur. - transaction.setBackgroundBlurRadius(mBlurSurface, mCurrentBlur) - .reparent(mBlurSurface, mBaseSurface); - // Set mBlurSurface to be 1 layer behind mBaseSurface or mBaseSurfaceOverride. - if (mBaseSurfaceOverride != null && mBaseSurfaceOverride.isValid()) { - transaction.setRelativeLayer(mBlurSurface, mBaseSurfaceOverride, -1); - } else { - transaction.setRelativeLayer(mBlurSurface, mBaseSurface, -1); + // Set early wake-up flags when we know we're executing an expensive operation, this way + // SurfaceFlinger will adjust its internal offsets to avoid jank. + boolean wantsEarlyWakeUp = depth > 0 && depth < 1; + if (wantsEarlyWakeUp && !mInEarlyWakeUp) { + transaction.setEarlyWakeupStart(); + mInEarlyWakeUp = true; + } else if (!wantsEarlyWakeUp && mInEarlyWakeUp) { + transaction.setEarlyWakeupEnd(); + mInEarlyWakeUp = false; } - } else { - transaction.setBackgroundBlurRadius(mBaseSurface, mCurrentBlur); - } - transaction.setOpaque(mBaseSurface, isSurfaceOpaque); - // Set early wake-up flags when we know we're executing an expensive operation, this way - // SurfaceFlinger will adjust its internal offsets to avoid jank. - boolean wantsEarlyWakeUp = depth > 0 && depth < 1; - if (wantsEarlyWakeUp && !mInEarlyWakeUp) { - transaction.setEarlyWakeupStart(); - mInEarlyWakeUp = true; - } else if (!wantsEarlyWakeUp && mInEarlyWakeUp) { - transaction.setEarlyWakeupEnd(); - mInEarlyWakeUp = false; - } - AttachedSurfaceControl rootSurfaceControl = - mLauncher.getRootView().getRootSurfaceControl(); - if (rootSurfaceControl != null) { - rootSurfaceControl.applyTransactionOnDraw(transaction); + AttachedSurfaceControl rootSurfaceControl = + mLauncher.getRootView().getRootSurfaceControl(); + if (rootSurfaceControl != null) { + rootSurfaceControl.applyTransactionOnDraw(transaction); + } } } @@ -244,7 +236,10 @@ public class BaseDepthController { */ public void setBaseSurfaceOverride(@Nullable SurfaceControl baseSurfaceOverride) { this.mBaseSurfaceOverride = baseSurfaceOverride; - applyDepthAndBlur(); + SurfaceControl.Transaction transaction = createTransaction(); + Log.d(TAG, "setBaseSurfaceOverride: applying blur behind leash " + baseSurfaceOverride); + updateBlurSurfaceOrder(transaction); + applyDepthAndBlur(transaction); } /** @@ -255,7 +250,54 @@ public class BaseDepthController { mBaseSurface = baseSurface; Log.d(TAG, "setSurface:\n\tmWaitingOnSurfaceValidity: " + mWaitingOnSurfaceValidity + "\n\tmBaseSurface: " + mBaseSurface); - applyDepthAndBlur(); + if (enableOverviewBackgroundWallpaperBlur()) { + SurfaceControl.Transaction transaction = createTransaction(); + if (mBaseSurface != null) { + if (mBlurSurface == null) { + mBlurSurface = new SurfaceControl.Builder() + .setName("Overview Blur") + .setHidden(false) + .build(); + Log.d(TAG, + "setBaseSurface: creating Overview Blur surface " + mBlurSurface); + } + updateBlurSurfaceParent(transaction); + updateBlurSurfaceOrder(transaction); + applyDepthAndBlur(transaction); + } else { + if (mBlurSurface != null) { + Log.d(TAG, "setBaseSurface: removing base surface " + mBlurSurface); + transaction.remove(mBlurSurface); + mBlurSurface = null; + } + } + } else { + applyDepthAndBlur(); + } + } + } + + private void updateBlurSurfaceOrder(SurfaceControl.Transaction transaction) { + SurfaceControl baseSurface = null; + if (mBaseSurfaceOverride != null && mBaseSurfaceOverride.isValid()) { + Log.d(TAG, "updateBlurSurfaceOrder: relayering to leash " + mBaseSurfaceOverride); + baseSurface = mBaseSurfaceOverride; + } else if (mBaseSurface != null && mBaseSurface.isValid()) { + Log.d(TAG, "updateBlurSurfaceOrder: relayering to base " + mBaseSurface); + baseSurface = mBaseSurface; + } + if (baseSurface != null && mBlurSurface != null) { + // Set mBlurSurface to be 1 layer behind mBaseSurface or mBaseSurfaceOverride. + transaction.setRelativeLayer(mBlurSurface, baseSurface, -1); + } + } + + private void updateBlurSurfaceParent(SurfaceControl.Transaction transaction) { + if (mBlurSurface != null) { + // Reparent to launcher for full screen blur. + Log.d(TAG, + "updateBlurSurfaceParent: reparenting " + mBlurSurface + " to " + mBaseSurface); + transaction.reparent(mBlurSurface, mBaseSurface); } } @@ -266,4 +308,8 @@ public class BaseDepthController { private static float mapDepthToBlur(float depth) { return Math.min(3 * depth, 1f); } + + private SurfaceControl.Transaction createTransaction() { + return new SurfaceControl.Transaction(); + } } From eefc673796be14d4617a6518e7246130052802df Mon Sep 17 00:00:00 2001 From: Jordan Silva Date: Fri, 28 Mar 2025 08:34:46 -0700 Subject: [PATCH 17/21] Skips same drawable for app chip to improve performance `IconView` creates a new drawable and makes it mutate for scaling it during some animations. The `setDrawable` function there also performs more logic and invalidate the view. Thus, every time `setDrawable` is called in the `IconAppChipView`, even if the same drawable is provided, it will unnecessarily create a copy of the drawable, invalidate and redraw the whole view. To prevent this inefficient behavior, a hash check has been introduced in `IconAppChipView`. This hash check skips the redundant logic if the same drawable is provided to `setDrawable`. Bug: 402613435 Flag: com.android.launcher3.enable_overview_icon_menu Test: OverviewImageTest Test: OverviewSplitTaskImageTest Change-Id: I3d20fa6bfc7aaf79222469ad88080985d4c1d1a0 --- quickstep/src/com/android/quickstep/views/IconAppChipView.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quickstep/src/com/android/quickstep/views/IconAppChipView.kt b/quickstep/src/com/android/quickstep/views/IconAppChipView.kt index ece31371ee..307e00cd02 100644 --- a/quickstep/src/com/android/quickstep/views/IconAppChipView.kt +++ b/quickstep/src/com/android/quickstep/views/IconAppChipView.kt @@ -147,8 +147,11 @@ constructor( override fun getDrawable(): Drawable? = iconView?.drawable + private var currentIconDrawableHash: Int = 0 override fun setDrawable(icon: Drawable?) { + if (icon.hashCode() == currentIconDrawableHash) return iconView?.drawable = icon + currentIconDrawableHash = icon.hashCode() } override fun setDrawableSize(iconWidth: Int, iconHeight: Int) { @@ -498,6 +501,7 @@ constructor( fun reset() { setText(null) setDrawable(null) + currentIconDrawableHash = 0 } override fun asView(): View = this From 41c5083dd978422c8e778b2e287c87be47acee99 Mon Sep 17 00:00:00 2001 From: Schneider Victor-Tulias Date: Fri, 28 Mar 2025 13:31:15 -0400 Subject: [PATCH 18/21] Improve input consumer selection reason logging Flag: EXEMPT debug logging Fixes: 407050156 Test: checked TIS logs Change-Id: I96cbbde1e3da32b75b7c0076719f6b1ee859fdba --- .../android/quickstep/InputConsumerUtils.kt | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/quickstep/src/com/android/quickstep/InputConsumerUtils.kt b/quickstep/src/com/android/quickstep/InputConsumerUtils.kt index af96a8b3b6..afaec37f3c 100644 --- a/quickstep/src/com/android/quickstep/InputConsumerUtils.kt +++ b/quickstep/src/com/android/quickstep/InputConsumerUtils.kt @@ -592,19 +592,18 @@ object InputConsumerUtils { previousGestureState, gestureState, event, - reasonString.append( - if (previousGestureAnimatedToLauncher) - ("%sprevious gesture animated to launcher, " + - "trying to use overview input consumer") - else - (if (launcherResumedThroughShellTransition) - ("%slauncher resumed through a shell transition, " + - "trying to use overview input consumer") - else - ("%sforceOverviewInputConsumer == true, " + - "trying to use overview input consumer")), - SUBSTRING_PREFIX, - ), + reasonString + .append( + if (previousGestureAnimatedToLauncher) + (if (previousGestureState.isRunningAnimationToLauncher) + "%sprevious gesture is still animating to launcher" + else "%spredictive back animation is still in progress") + else if (launcherResumedThroughShellTransition) + "%slauncher resumed through a shell transition" + else "%sforceOverviewInputConsumer == true", + SUBSTRING_PREFIX, + ) + .append(", trying to use overview input consumer"), ) } else if (deviceState.isGestureBlockedTask(runningTask) || launcherChildActivityResumed) { getDefaultInputConsumer( @@ -715,11 +714,12 @@ object InputConsumerUtils { reasonString.append( if (hasWindowFocus) "%sactivity has window focus" - else - (if (isPreviousGestureAnimatingToLauncher) + else if (isPreviousGestureAnimatingToLauncher) + (if (previousGestureState.isRunningAnimationToLauncher) "%sprevious gesture is still animating to launcher" - else if (isInLiveTileMode) "%sdevice is in live mode" - else "%sall overview focus conditions failed"), + else "%spredictive back animation is still in progress") + else if (isInLiveTileMode) "%sdevice is in live mode" + else "%sall overview focus conditions failed", SUBSTRING_PREFIX, ) return if (hasWindowFocus || isPreviousGestureAnimatingToLauncher || isInLiveTileMode) { From bdd3f29342b8e890756b3cc57c25152f3a8abb3e Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 27 Mar 2025 00:31:46 -0700 Subject: [PATCH 19/21] Using item inflater for predicted items and previews Bug: 406668365 Test: Verified manually in picker Flag: EXEMPT refactor Change-Id: If8ca919a19b7d1b6cbdc33823a9f294df1afa968 --- .../hybridhotseat/HotseatEduDialog.java | 4 +- .../HotseatPredictionController.java | 12 +- .../uioverrides/PredictedAppIcon.java | 26 -- .../graphics/LauncherPreviewRenderer.java | 278 +++++------------- .../graphics/PreviewSurfaceRenderer.java | 35 ++- .../android/launcher3/model/LoaderTask.java | 18 +- .../launcher3/model/WorkspaceItemProcessor.kt | 4 - .../android/launcher3/util/ItemInflater.kt | 17 +- .../model/WorkspaceItemProcessorTest.kt | 22 +- .../model/WorkspaceItemProcessorExtraTest.kt | 13 +- 10 files changed, 131 insertions(+), 298 deletions(-) diff --git a/quickstep/src/com/android/launcher3/hybridhotseat/HotseatEduDialog.java b/quickstep/src/com/android/launcher3/hybridhotseat/HotseatEduDialog.java index db225be4a9..a4c6ae03a4 100644 --- a/quickstep/src/com/android/launcher3/hybridhotseat/HotseatEduDialog.java +++ b/quickstep/src/com/android/launcher3/hybridhotseat/HotseatEduDialog.java @@ -38,7 +38,6 @@ import com.android.launcher3.Launcher; import com.android.launcher3.R; import com.android.launcher3.celllayout.CellLayoutLayoutParams; import com.android.launcher3.model.data.WorkspaceItemInfo; -import com.android.launcher3.uioverrides.PredictedAppIcon; import com.android.launcher3.views.AbstractSlideInView; import java.util.List; @@ -184,10 +183,9 @@ public class HotseatEduDialog extends AbstractSlideInView implements I private void populatePreview(List predictions) { for (int i = 0; i < mActivityContext.getDeviceProfile().numShownHotseatIcons; i++) { WorkspaceItemInfo info = predictions.get(i); - PredictedAppIcon icon = PredictedAppIcon.createIcon(mSampleHotseat, info); + View icon = mActivityContext.getItemInflater().inflateItem(info, mSampleHotseat); icon.setEnabled(false); icon.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); - icon.verifyHighRes(); CellLayoutLayoutParams lp = new CellLayoutLayoutParams(i, 0, 1, 1); mSampleHotseat.addViewToCellLayout(icon, i, info.getViewId(), lp, true); } diff --git a/quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java b/quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java index c2cabd0557..44aa764900 100644 --- a/quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +++ b/quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java @@ -47,6 +47,7 @@ import com.android.launcher3.LauncherPrefs; import com.android.launcher3.LauncherSettings; import com.android.launcher3.R; import com.android.launcher3.anim.AnimationSuccessListener; +import com.android.launcher3.celllayout.CellLayoutLayoutParams; import com.android.launcher3.dragndrop.DragController; import com.android.launcher3.dragndrop.DragOptions; import com.android.launcher3.graphics.DragPreviewProvider; @@ -232,7 +233,7 @@ public class HotseatPredictionController implements DragController.DragListener, if (icon.applyFromWorkspaceItemWithAnimation(predictedItem, numViewsAnimated)) { numViewsAnimated++; } - icon.finishBinding(mPredictionLongClickListener); + finishBinding(icon); } else { newItems.add(predictedItem); } @@ -246,9 +247,9 @@ public class HotseatPredictionController implements DragController.DragListener, private void bindItems(List itemsToAdd, boolean animate) { AnimatorSet animationSet = new AnimatorSet(); for (WorkspaceItemInfo item : itemsToAdd) { - PredictedAppIcon icon = PredictedAppIcon.createIcon(mHotseat, item); + View icon = mLauncher.getItemInflater().inflateItem(item, mHotseat); mLauncher.getWorkspace().addInScreenFromBind(icon, item); - icon.finishBinding(mPredictionLongClickListener); + finishBinding(icon); if (animate) { animationSet.play(ObjectAnimator.ofFloat(icon, SCALE_PROPERTY, 0.2f, 1)); } @@ -262,6 +263,11 @@ public class HotseatPredictionController implements DragController.DragListener, } } + private void finishBinding(View view) { + view.setOnLongClickListener(mPredictionLongClickListener); + ((CellLayoutLayoutParams) view.getLayoutParams()).canReorder = false; + } + private void removeOutlineDrawings() { if (mOutlineDrawings.isEmpty()) return; for (PredictedAppIcon.PredictedIconOutlineDrawing outlineDrawing : mOutlineDrawings) { diff --git a/quickstep/src/com/android/launcher3/uioverrides/PredictedAppIcon.java b/quickstep/src/com/android/launcher3/uioverrides/PredictedAppIcon.java index 42c3526e5e..050358b546 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/PredictedAppIcon.java +++ b/quickstep/src/com/android/launcher3/uioverrides/PredictedAppIcon.java @@ -39,14 +39,11 @@ import android.util.AttributeSet; import android.util.FloatProperty; import android.util.Log; import android.util.Property; -import android.view.LayoutInflater; -import android.view.ViewGroup; import androidx.core.graphics.ColorUtils; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Flags; -import com.android.launcher3.Launcher; import com.android.launcher3.R; import com.android.launcher3.anim.AnimatedFloat; import com.android.launcher3.anim.AnimatorListeners; @@ -279,16 +276,6 @@ public class PredictedAppIcon extends DoubleShadowBubbleTextView { invalidate(); } - /** - * prepares prediction icon for usage after bind - */ - public void finishBinding(OnLongClickListener longClickListener) { - setOnLongClickListener(longClickListener); - ((CellLayoutLayoutParams) getLayoutParams()).canReorder = false; - setTextVisibility(false); - verifyHighRes(); - } - @Override public void getIconBounds(Rect outBounds) { super.getIconBounds(outBounds); @@ -458,19 +445,6 @@ public class PredictedAppIcon extends DoubleShadowBubbleTextView { }; } - /** - * Creates and returns a new instance of PredictedAppIcon from WorkspaceItemInfo - */ - public static PredictedAppIcon createIcon(ViewGroup parent, WorkspaceItemInfo info) { - PredictedAppIcon icon = (PredictedAppIcon) LayoutInflater.from(parent.getContext()) - .inflate(R.layout.predicted_app_icon, parent, false); - icon.applyFromWorkspaceItem(info); - Launcher launcher = Launcher.getLauncher(parent.getContext()); - icon.setOnClickListener(launcher.getItemOnClickListener()); - icon.setOnFocusChangeListener(launcher.getFocusHandler()); - return icon; - } - private class AnimColorHolder { public final AnimatedFloat progress = new AnimatedFloat(this::onUpdate, 1); diff --git a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java index a062a54ee3..f865162513 100644 --- a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java +++ b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java @@ -20,25 +20,21 @@ import static android.view.View.MeasureSpec.EXACTLY; import static android.view.View.MeasureSpec.makeMeasureSpec; import static android.view.View.VISIBLE; -import static com.android.launcher3.BubbleTextView.DISPLAY_TASKBAR; -import static com.android.launcher3.BubbleTextView.DISPLAY_WORKSPACE; import static com.android.launcher3.DeviceProfile.DEFAULT_SCALE; import static com.android.launcher3.Flags.extendibleThemeManager; import static com.android.launcher3.Hotseat.ALPHA_CHANNEL_PREVIEW_RENDERER; import static com.android.launcher3.LauncherPrefs.GRID_NAME; -import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT; import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION; import static com.android.launcher3.Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET; import static com.android.launcher3.graphics.ThemeManager.PREF_ICON_SHAPE; import static com.android.launcher3.model.ModelUtils.currentScreenContentFilter; import static com.android.launcher3.widget.LauncherWidgetHolder.APPWIDGET_HOST_ID; +import static java.util.Comparator.comparingDouble; + import android.app.Fragment; import android.app.WallpaperColors; import android.app.WallpaperManager; -import android.appwidget.AppWidgetHost; -import android.appwidget.AppWidgetHostView; -import android.appwidget.AppWidgetProviderInfo; import android.content.Context; import android.content.res.Configuration; import android.content.res.TypedArray; @@ -57,25 +53,23 @@ import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; -import android.widget.FrameLayout; import android.widget.TextClock; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.lifecycle.DefaultLifecycleObserver; +import androidx.lifecycle.LifecycleOwner; -import com.android.launcher3.BubbleTextView; import com.android.launcher3.CellLayout; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Hotseat; import com.android.launcher3.InsettableFrameLayout; import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.LauncherPrefs; -import com.android.launcher3.LauncherSettings.Favorites; import com.android.launcher3.ProxyPrefs; import com.android.launcher3.R; import com.android.launcher3.Workspace; import com.android.launcher3.WorkspaceLayoutManager; -import com.android.launcher3.apppairs.AppPairIcon; import com.android.launcher3.celllayout.CellLayoutLayoutParams; import com.android.launcher3.celllayout.CellPosMapper; import com.android.launcher3.config.FeatureFlags; @@ -87,32 +81,24 @@ import com.android.launcher3.dagger.LauncherComponentProvider; import com.android.launcher3.dagger.PluginManagerWrapperModule; import com.android.launcher3.dagger.StaticObjectModule; import com.android.launcher3.dagger.WindowManagerProxyModule; -import com.android.launcher3.folder.FolderIcon; import com.android.launcher3.model.BaseLauncherBinder.BaseLauncherBinderFactory; import com.android.launcher3.model.BgDataModel; import com.android.launcher3.model.BgDataModel.FixedContainerItems; import com.android.launcher3.model.LayoutParserFactory; import com.android.launcher3.model.LayoutParserFactory.XmlLayoutParserFactory; import com.android.launcher3.model.LoaderTask.LoaderTaskFactory; -import com.android.launcher3.model.data.AppPairInfo; -import com.android.launcher3.model.data.CollectionInfo; -import com.android.launcher3.model.data.FolderInfo; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.LauncherAppWidgetInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.util.BaseContext; -import com.android.launcher3.util.ComponentKey; import com.android.launcher3.util.DisplayController; -import com.android.launcher3.util.IntArray; import com.android.launcher3.util.IntSet; +import com.android.launcher3.util.ItemInflater; import com.android.launcher3.util.SandboxContext; import com.android.launcher3.util.Themes; -import com.android.launcher3.util.WindowBounds; import com.android.launcher3.util.window.WindowManagerProxy; import com.android.launcher3.views.ActivityContext; import com.android.launcher3.views.BaseDragLayer; -import com.android.launcher3.widget.BaseLauncherAppWidgetHostView; -import com.android.launcher3.widget.LauncherAppWidgetProviderInfo; import com.android.launcher3.widget.LauncherWidgetHolder; import com.android.launcher3.widget.LauncherWidgetHolder.WidgetHolderFactory; import com.android.launcher3.widget.LocalColorExtractor; @@ -128,10 +114,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.UUID; -import java.util.stream.Collectors; -import java.util.stream.IntStream; /** * Utility class for generating the preview of Launcher for a given InvariantDeviceProfile. @@ -213,7 +196,6 @@ public class LauncherPreviewRenderer extends BaseContext } private final Handler mUiHandler; - private final Context mContext; private final InvariantDeviceProfile mIdp; private final DeviceProfile mDp; private final DeviceProfile mDpOrig; @@ -222,28 +204,24 @@ public class LauncherPreviewRenderer extends BaseContext private final InsettableFrameLayout mRootView; private final Hotseat mHotseat; private final Map mWorkspaceScreens = new HashMap<>(); - private final AppWidgetHost mAppWidgetHost; - private final SparseIntArray mWallpaperColorResources; + private final ItemInflater mItemInflater; private final SparseArray mLauncherWidgetSpanInfo; public LauncherPreviewRenderer(Context context, InvariantDeviceProfile idp, - int widgetHostId, WallpaperColors wallpaperColorsOverride, @Nullable final SparseArray launcherWidgetSpanInfo) { - this(context, idp, widgetHostId, null, wallpaperColorsOverride, launcherWidgetSpanInfo); + this(context, idp, null, wallpaperColorsOverride, launcherWidgetSpanInfo); } public LauncherPreviewRenderer(Context context, InvariantDeviceProfile idp, - int widgetHostId, SparseIntArray previewColorOverride, WallpaperColors wallpaperColorsOverride, @Nullable final SparseArray launcherWidgetSpanInfo) { super(context, Themes.getActivityThemeRes(context)); mUiHandler = new Handler(Looper.getMainLooper()); - mContext = context; mIdp = idp; mDp = getDeviceProfileForPreview(context).toBuilder(context).setViewScaleProvider( this::getAppWidgetScale).build(); @@ -296,16 +274,17 @@ public class LauncherPreviewRenderer extends BaseContext mWorkspaceScreens.put(Workspace.SECOND_SCREEN_ID, rightPanel); } + SparseIntArray wallpaperColorResources; if (Flags.newCustomizationPickerUi()) { if (previewColorOverride != null) { - mWallpaperColorResources = previewColorOverride; + wallpaperColorResources = previewColorOverride; } else if (wallpaperColorsOverride != null) { - mWallpaperColorResources = LocalColorExtractor.newInstance( + wallpaperColorResources = LocalColorExtractor.newInstance( context).generateColorsOverride(wallpaperColorsOverride); } else { WallpaperColors wallpaperColors = WallpaperManager.getInstance( context).getWallpaperColors(FLAG_SYSTEM); - mWallpaperColorResources = wallpaperColors != null + wallpaperColorResources = wallpaperColors != null ? LocalColorExtractor.newInstance(context).generateColorsOverride( wallpaperColors) : null; @@ -314,18 +293,33 @@ public class LauncherPreviewRenderer extends BaseContext WallpaperColors wallpaperColors = wallpaperColorsOverride != null ? wallpaperColorsOverride : WallpaperManager.getInstance(context).getWallpaperColors(FLAG_SYSTEM); - mWallpaperColorResources = wallpaperColors != null + wallpaperColorResources = wallpaperColors != null ? LocalColorExtractor.newInstance(context).generateColorsOverride( wallpaperColors) : null; } - mAppWidgetHost = new LauncherPreviewAppWidgetHost(context, widgetHostId); - onViewCreated(); - - if (widgetHostId != APPWIDGET_HOST_ID) { - mAppWidgetHost.stopListening(); + LauncherWidgetHolder widgetHolder = LauncherComponentProvider.get(this) + .getWidgetHolderFactory().newInstance(this); + if (wallpaperColorResources != null) { + widgetHolder.setOnViewCreationCallback( + v -> v.setColorResources(wallpaperColorResources)); } + + mItemInflater = new ItemInflater<>( + this, + widgetHolder, + view -> { }, + (view, b) -> { }, + mHotseat + ); + onViewCreated(); + getLifecycle().addObserver(new DefaultLifecycleObserver() { + @Override + public void onDestroy(@NonNull LifecycleOwner owner) { + widgetHolder.destroy(); + } + }); } @Override @@ -352,27 +346,14 @@ public class LauncherPreviewRenderer extends BaseContext * Returns the insets of the screen closest to the display given by the context */ private Rect getInsets(Context context) { - DisplayController.Info info = DisplayController.INSTANCE.get(context).getInfo(); - float maxDiff = Float.MAX_VALUE; Display display = context.getDisplay(); - Rect insets = new Rect(); - for (WindowBounds supportedBound : info.supportedBounds) { - double diff = Math.pow(display.getWidth() - supportedBound.availableSize.x, 2) - + Math.pow(display.getHeight() - supportedBound.availableSize.y, 2); - if (supportedBound.rotationHint == context.getDisplay().getRotation() - && diff < maxDiff) { - maxDiff = (float) diff; - insets = supportedBound.insets; - } - } - return new Rect(insets); - } - - /** Populate preview and render it. */ - public View getRenderedView(BgDataModel dataModel, - Map widgetProviderInfoMap) { - populate(dataModel, widgetProviderInfoMap); - return mRootView; + return DisplayController.INSTANCE.get(context).getInfo().supportedBounds.stream() + .filter(w -> w.rotationHint == display.getRotation()) + .min(comparingDouble(w -> + Math.pow(display.getWidth() - w.availableSize.x, 2) + + Math.pow(display.getHeight() - w.availableSize.y, 2))) + .map(w -> new Rect(w.insets)) + .orElse(new Rect()); } @Override @@ -398,6 +379,7 @@ public class LauncherPreviewRenderer extends BaseContext View view = f.onCreateView(LayoutInflater.from(context), (ViewGroup) parent, null); view.setId(ta.getInt(R.styleable.PreviewFragment_android_id, View.NO_ID)); + ta.recycle(); return view; } @@ -450,60 +432,11 @@ public class LauncherPreviewRenderer extends BaseContext return CellPosMapper.DEFAULT; } - private void inflateAndAddIcon(WorkspaceItemInfo info) { - CellLayout screen = mWorkspaceScreens.get(info.screenId); - BubbleTextView icon = (BubbleTextView) mHomeElementInflater.inflate( - R.layout.app_icon, screen, false); - icon.applyFromWorkspaceItem(info); - addInScreenFromBind(icon, info); - } - - private void inflateAndAddCollectionIcon(CollectionInfo info) { - boolean isOnDesktop = info.container == Favorites.CONTAINER_DESKTOP; - CellLayout screen = isOnDesktop - ? mWorkspaceScreens.get(info.screenId) - : mHotseat; - FrameLayout collectionIcon = info.itemType == Favorites.ITEM_TYPE_FOLDER - ? FolderIcon.inflateIcon(R.layout.folder_icon, this, screen, (FolderInfo) info) - : AppPairIcon.inflateIcon(R.layout.app_pair_icon, this, screen, (AppPairInfo) info, - isOnDesktop ? DISPLAY_WORKSPACE : DISPLAY_TASKBAR); - addInScreenFromBind(collectionIcon, info); - } - - private void inflateAndAddWidgets( - LauncherAppWidgetInfo info, - Map widgetProviderInfoMap) { - if (widgetProviderInfoMap == null) { - return; - } - AppWidgetProviderInfo providerInfo = widgetProviderInfoMap.get( - new ComponentKey(info.providerName, info.user)); - if (providerInfo == null) { - return; - } - inflateAndAddWidgets(info, LauncherAppWidgetProviderInfo.fromProviderInfo( - getApplicationContext(), providerInfo)); - } - - private void inflateAndAddWidgets( - LauncherAppWidgetInfo info, LauncherAppWidgetProviderInfo providerInfo) { - AppWidgetHostView view = mAppWidgetHost.createView( - mContext, info.appWidgetId, providerInfo); - - if (mWallpaperColorResources != null) { - view.setColorResources(mWallpaperColorResources); - } - - view.setTag(info); - addInScreenFromBind(view, info); - } - @NonNull private PointF getAppWidgetScale(@Nullable ItemInfo itemInfo) { - if (!(itemInfo instanceof LauncherAppWidgetInfo)) { + if (!(itemInfo instanceof LauncherAppWidgetInfo info)) { return DEFAULT_SCALE; } - LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) itemInfo; final Size launcherWidgetSize = mLauncherWidgetSpanInfo.get(info.appWidgetId); if (launcherWidgetSize == null) { return DEFAULT_SCALE; @@ -515,14 +448,6 @@ public class LauncherPreviewRenderer extends BaseContext (float) newSize.getHeight() / origSize.getHeight()); } - private void inflateAndAddPredictedIcon(WorkspaceItemInfo info) { - CellLayout screen = mWorkspaceScreens.get(info.screenId); - BubbleTextView icon = (BubbleTextView) mHomeElementInflater.inflate( - R.layout.predicted_app_icon, screen, false); - icon.applyFromWorkspaceItem(info); - addInScreenFromBind(icon, info); - } - private void dispatchVisibilityAggregated(View view, boolean isVisible) { // Similar to View.dispatchVisibilityAggregated implementation. final boolean thisVisible = view.getVisibility() == VISIBLE; @@ -530,9 +455,8 @@ public class LauncherPreviewRenderer extends BaseContext view.onVisibilityAggregated(isVisible); } - if (view instanceof ViewGroup) { + if (view instanceof ViewGroup vg) { isVisible = thisVisible && isVisible; - ViewGroup vg = (ViewGroup) view; int count = vg.getChildCount(); for (int i = 0; i < count; i++) { @@ -541,66 +465,14 @@ public class LauncherPreviewRenderer extends BaseContext } } - private void populate(BgDataModel dataModel, - Map widgetProviderInfoMap) { - IntSet missingHotseatRank = new IntSet(); - IntStream.range(0, mDp.numShownHotseatIcons).forEach(missingHotseatRank::add); - - Map[] widgetsMap = new Map[] { widgetProviderInfoMap}; - + /** Populate preview and render it. */ + public void populate(BgDataModel dataModel) { // Separate the items that are on the current screen, and the other remaining items. dataModel.itemsIdMap.stream() .filter(currentScreenContentFilter(IntSet.wrap(mWorkspaceScreens.keySet()))) - .forEach(itemInfo -> { - switch (itemInfo.itemType) { - case Favorites.ITEM_TYPE_APPLICATION: - case Favorites.ITEM_TYPE_DEEP_SHORTCUT: - inflateAndAddIcon((WorkspaceItemInfo) itemInfo); - break; - case Favorites.ITEM_TYPE_FOLDER: - case Favorites.ITEM_TYPE_APP_PAIR: - inflateAndAddCollectionIcon((CollectionInfo) itemInfo); - break; - case Favorites.ITEM_TYPE_APPWIDGET: - case Favorites.ITEM_TYPE_CUSTOM_APPWIDGET: - if (widgetsMap[0] == null) { - widgetsMap[0] = dataModel.widgetsModel.getWidgetsByComponentKey() - .entrySet() - .stream() - .filter(entry -> entry.getValue().widgetInfo != null) - .collect(Collectors.toMap( - Entry::getKey, - entry -> entry.getValue().widgetInfo - )); - } - inflateAndAddWidgets((LauncherAppWidgetInfo) itemInfo, widgetsMap[0]); - break; - default: - break; - } + .forEach(this::inflateAndAdd); + populateHotseatPredictions(dataModel); - if (itemInfo.container == CONTAINER_HOTSEAT) { - missingHotseatRank.remove(itemInfo.screenId); - } - }); - - IntArray ranks = missingHotseatRank.getArray(); - FixedContainerItems hotseatPredictions = - dataModel.extraItems.get(CONTAINER_HOTSEAT_PREDICTION); - List predictions = hotseatPredictions == null - ? Collections.emptyList() : hotseatPredictions.items; - int count = Math.min(ranks.size(), predictions.size()); - for (int i = 0; i < count; i++) { - int rank = ranks.get(i); - WorkspaceItemInfo itemInfo = - new WorkspaceItemInfo((WorkspaceItemInfo) predictions.get(i)); - itemInfo.container = CONTAINER_HOTSEAT_PREDICTION; - itemInfo.rank = rank; - itemInfo.cellX = mHotseat.getCellXFromOrder(rank); - itemInfo.cellY = mHotseat.getCellYFromOrder(rank); - itemInfo.screenId = rank; - inflateAndAddPredictedIcon(itemInfo); - } // Add first page QSB if (FeatureFlags.QSB_ON_FIRST_SCREEN && dataModel.isFirstPagePinnedItemEnabled @@ -621,37 +493,43 @@ public class LauncherPreviewRenderer extends BaseContext measureView(mRootView, mDp.widthPx, mDp.heightPx); } + private void populateHotseatPredictions(BgDataModel dataModel) { + FixedContainerItems hotseatPredictions = + dataModel.extraItems.get(CONTAINER_HOTSEAT_PREDICTION); + List predictions = hotseatPredictions == null + ? Collections.emptyList() : hotseatPredictions.items; + + int predictionIndex = 0; + for (int rank = 0; rank < mDp.numShownHotseatIcons; rank++) { + if (predictions.size() <= predictionIndex) continue; + + int cellX = mHotseat.getCellXFromOrder(rank); + int cellY = mHotseat.getCellYFromOrder(rank); + if (mHotseat.isOccupied(cellX, cellY)) continue; + + WorkspaceItemInfo itemInfo = + new WorkspaceItemInfo((WorkspaceItemInfo) predictions.get(predictionIndex)); + predictionIndex++; + itemInfo.rank = rank; + itemInfo.cellX = cellX; + itemInfo.cellY = cellY; + itemInfo.screenId = rank; + inflateAndAdd(itemInfo); + } + } + + private void inflateAndAdd(ItemInfo itemInfo) { + View view = mItemInflater.inflateItem(itemInfo); + if (view != null) { + addInScreenFromBind(view, itemInfo); + } + } + private static void measureView(View view, int width, int height) { view.measure(makeMeasureSpec(width, EXACTLY), makeMeasureSpec(height, EXACTLY)); view.layout(0, 0, width, height); } - private class LauncherPreviewAppWidgetHost extends AppWidgetHost { - - private LauncherPreviewAppWidgetHost(Context context, int hostId) { - super(context, hostId); - } - - @Override - protected AppWidgetHostView onCreateView( - Context context, - int appWidgetId, - AppWidgetProviderInfo appWidget) { - return new LauncherPreviewAppWidgetHostView(LauncherPreviewRenderer.this); - } - } - - private static class LauncherPreviewAppWidgetHostView extends BaseLauncherAppWidgetHostView { - private LauncherPreviewAppWidgetHostView(Context context) { - super(context); - } - - @Override - protected boolean shouldAllowDirectClick() { - return false; - } - } - /** Root layout for launcher preview that intercepts all touch events. */ public static class LauncherPreviewLayout extends InsettableFrameLayout { public LauncherPreviewLayout(Context context, AttributeSet attrs) { diff --git a/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java b/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java index 93e5f325bf..7010abc5ec 100644 --- a/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java +++ b/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java @@ -32,7 +32,6 @@ import static com.android.launcher3.widget.LauncherWidgetHolder.APPWIDGET_HOST_I import android.app.WallpaperColors; import android.appwidget.AppWidgetHost; -import android.appwidget.AppWidgetProviderInfo; import android.content.Context; import android.content.res.Configuration; import android.database.Cursor; @@ -71,14 +70,11 @@ import com.android.launcher3.model.BgDataModel.Callbacks; import com.android.launcher3.model.LoaderTask; import com.android.launcher3.model.ModelDbController; import com.android.launcher3.model.UserManagerState; -import com.android.launcher3.util.ComponentKey; import com.android.launcher3.util.RunnableList; import com.android.launcher3.util.Themes; import com.android.launcher3.widget.LocalColorExtractor; import com.android.systemui.shared.Flags; -import java.util.HashMap; -import java.util.Map; import java.util.concurrent.TimeUnit; /** Render preview using surface view. */ @@ -121,6 +117,8 @@ public class PreviewSurfaceRenderer { private final RunnableList mLifeCycleTracker; private final SurfaceControlViewHost mSurfaceControlViewHost; + private LauncherPreviewRenderer mCurrentRenderer; + public PreviewSurfaceRenderer(Context context, RunnableList lifecycleTracker, Bundle bundle, int callingPid) throws Exception { mContext = context; @@ -171,8 +169,16 @@ public class PreviewSurfaceRenderer { return mSurfaceControlViewHost.getSurfacePackage(); } + private void setCurrentRenderer(LauncherPreviewRenderer renderer) { + if (mCurrentRenderer != null) { + mCurrentRenderer.onViewDestroyed(); + } + mCurrentRenderer = renderer; + } + private void destroy() { mDestroyed = true; + setCurrentRenderer(null); } /** @@ -378,20 +384,17 @@ public class PreviewSurfaceRenderer { String query = deviceProfile.isTwoPanels ? selectionForWorkspaceScreen(FIRST_SCREEN_ID, SECOND_SCREEN_ID) : selectionForWorkspaceScreen(FIRST_SCREEN_ID); - Map widgetProviderInfoMap = new HashMap<>(); - task.loadWorkspaceForPreview(query, widgetProviderInfoMap); + task.loadWorkspaceForPreview(query); final SparseArray spanInfo = getLoadedLauncherWidgetInfo(); MAIN_EXECUTOR.execute(() -> { - renderView(previewContext, appComponent.getDataModel(), widgetHostId, - widgetProviderInfoMap, spanInfo, idp); + renderView(previewContext, appComponent.getDataModel(), spanInfo, idp); mLifeCycleTracker.add(previewContext::onDestroy); }); } else { LauncherAppState.getInstance(inflationContext).getModel().loadAsync(dataModel -> { if (dataModel != null) { MAIN_EXECUTOR.execute(() -> renderView(inflationContext, dataModel, - APPWIDGET_HOST_ID, null, null, - LauncherAppState.getIDP(inflationContext))); + null, LauncherAppState.getIDP(inflationContext))); } else { Log.e(TAG, "Model loading failed"); } @@ -400,22 +403,24 @@ public class PreviewSurfaceRenderer { } @UiThread - private void renderView(Context inflationContext, BgDataModel dataModel, int widgetHostId, - Map widgetProviderInfoMap, + private void renderView(Context inflationContext, BgDataModel dataModel, @Nullable final SparseArray launcherWidgetSpanInfo, InvariantDeviceProfile idp) { if (mDestroyed) { return; } LauncherPreviewRenderer renderer; if (Flags.newCustomizationPickerUi()) { - renderer = new LauncherPreviewRenderer(inflationContext, idp, widgetHostId, + renderer = new LauncherPreviewRenderer(inflationContext, idp, mPreviewColorOverride, mWallpaperColors, launcherWidgetSpanInfo); } else { - renderer = new LauncherPreviewRenderer(inflationContext, idp, widgetHostId, + renderer = new LauncherPreviewRenderer(inflationContext, idp, mWallpaperColors, launcherWidgetSpanInfo); } renderer.hideBottomRow(mHideQsb); - View view = renderer.getRenderedView(dataModel, widgetProviderInfoMap); + renderer.populate(dataModel); + + View view = renderer.getRootView(); + setCurrentRenderer(renderer); view.setPivotX(0); view.setPivotY(0); diff --git a/src/com/android/launcher3/model/LoaderTask.java b/src/com/android/launcher3/model/LoaderTask.java index 6dc20de490..f54c56e83d 100644 --- a/src/com/android/launcher3/model/LoaderTask.java +++ b/src/com/android/launcher3/model/LoaderTask.java @@ -96,7 +96,6 @@ import com.android.launcher3.shortcuts.ShortcutKey; import com.android.launcher3.shortcuts.ShortcutRequest; import com.android.launcher3.shortcuts.ShortcutRequest.QueryResult; import com.android.launcher3.util.ApiWrapper; -import com.android.launcher3.util.ComponentKey; import com.android.launcher3.util.IOUtils; import com.android.launcher3.util.IntArray; import com.android.launcher3.util.IntSet; @@ -275,7 +274,7 @@ public class LoaderTask implements Runnable { } try (LauncherModel.LoaderTransaction transaction = mModel.beginLoader(this)) { List allShortcuts = new ArrayList<>(); - loadWorkspace(allShortcuts, "", new HashMap<>(), memoryLogger, restoreEventLogger); + loadWorkspace(allShortcuts, "", memoryLogger, restoreEventLogger); // Sanitize data re-syncs widgets/shortcuts based on the workspace loaded from db. // sanitizeData should not be invoked if the workspace is loaded from a db different @@ -419,22 +418,19 @@ public class LoaderTask implements Runnable { this.notify(); } - public void loadWorkspaceForPreview(String selection, - Map widgetProviderInfoMap) { - loadWorkspace(new ArrayList<>(), selection, widgetProviderInfoMap, null, null); + public void loadWorkspaceForPreview(String selection) { + loadWorkspace(new ArrayList<>(), selection, null, null); } private void loadWorkspace( List allDeepShortcuts, String selection, - Map widgetProviderInfoMap, @Nullable LoaderMemoryLogger memoryLogger, @Nullable LauncherRestoreEventLogger restoreEventLogger ) { Trace.beginSection("LoadWorkspace"); try { - loadWorkspaceImpl(allDeepShortcuts, selection, widgetProviderInfoMap, - memoryLogger, restoreEventLogger); + loadWorkspaceImpl(allDeepShortcuts, selection, memoryLogger, restoreEventLogger); } finally { Trace.endSection(); } @@ -448,7 +444,6 @@ public class LoaderTask implements Runnable { private void loadWorkspaceImpl( List allDeepShortcuts, String selection, - Map widgetProviderInfoMap, @Nullable LoaderMemoryLogger memoryLogger, @Nullable LauncherRestoreEventLogger restoreEventLogger) { final boolean isSdCardReady = Utilities.isBootCompleted(); @@ -498,9 +493,8 @@ public class LoaderTask implements Runnable { mUserCache, mUserManagerState, mLauncherApps, mPendingPackages, mShortcutKeyToPinnedShortcuts, mContext, mIDP, mIconCache, mIsSafeModeEnabled, mBgDataModel, - widgetProviderInfoMap, installingPkgs, isSdCardReady, - widgetInflater, mPmHelper, mWorkspaceIconRequestInfos, unlockedUsers, - allDeepShortcuts); + installingPkgs, isSdCardReady, widgetInflater, mPmHelper, + mWorkspaceIconRequestInfos, unlockedUsers, allDeepShortcuts); if (mStopped) { Log.w(TAG, "loadWorkspaceImpl: Loader stopped, skipping item processing"); diff --git a/src/com/android/launcher3/model/WorkspaceItemProcessor.kt b/src/com/android/launcher3/model/WorkspaceItemProcessor.kt index bf71099f41..235ca9fc56 100644 --- a/src/com/android/launcher3/model/WorkspaceItemProcessor.kt +++ b/src/com/android/launcher3/model/WorkspaceItemProcessor.kt @@ -16,7 +16,6 @@ package com.android.launcher3.model import android.annotation.SuppressLint -import android.appwidget.AppWidgetProviderInfo import android.content.ComponentName import android.content.Context import android.content.Intent @@ -49,7 +48,6 @@ import com.android.launcher3.shortcuts.ShortcutKey import com.android.launcher3.shortcuts.ShortcutRequest import com.android.launcher3.util.ApiWrapper import com.android.launcher3.util.ApplicationInfoWrapper -import com.android.launcher3.util.ComponentKey import com.android.launcher3.util.PackageManagerHelper import com.android.launcher3.util.PackageUserKey import com.android.launcher3.widget.LauncherAppWidgetProviderInfo @@ -76,7 +74,6 @@ class WorkspaceItemProcessor( private val iconCache: IconCache, private val isSafeMode: Boolean, private val bgDataModel: BgDataModel, - private val widgetProvidersMap: MutableMap, private val installingPkgs: HashMap, private val isSdCardReady: Boolean, private val widgetInflater: WidgetInflater, @@ -584,7 +581,6 @@ class WorkspaceItemProcessor( .commit() } if (lapi != null) { - widgetProvidersMap[ComponentKey(lapi.provider, lapi.user)] = inflationResult.widgetInfo if (appWidgetInfo.spanX < lapi.minSpanX || appWidgetInfo.spanY < lapi.minSpanY) { FileLog.d( TAG, diff --git a/src/com/android/launcher3/util/ItemInflater.kt b/src/com/android/launcher3/util/ItemInflater.kt index 647c26c522..b26a490356 100644 --- a/src/com/android/launcher3/util/ItemInflater.kt +++ b/src/com/android/launcher3/util/ItemInflater.kt @@ -61,10 +61,10 @@ class ItemInflater( Favorites.ITEM_TYPE_DEEP_SHORTCUT, Favorites.ITEM_TYPE_SEARCH_ACTION -> { var info = - if (item is WorkspaceItemFactory) { - (item as WorkspaceItemFactory).makeWorkspaceItem(context) - } else { - item as WorkspaceItemInfo + when (item) { + is WorkspaceItemFactory -> item.makeWorkspaceItem(context) + is WorkspaceItemInfo -> item + else -> return null } if (info.container == Favorites.CONTAINER_PREDICTION) { // Came from all apps prediction row -- make a copy @@ -104,12 +104,17 @@ class ItemInflater( * @return A View inflated from layoutResId. */ private fun createShortcut(info: WorkspaceItemInfo, parent: ViewGroup): View { + val layout = + if (info.container == Favorites.CONTAINER_HOTSEAT_PREDICTION) + R.layout.predicted_app_icon + else R.layout.app_icon val favorite = - LayoutInflater.from(parent.context).inflate(R.layout.app_icon, parent, false) - as BubbleTextView + LayoutInflater.from(parent.context).inflate(layout, parent, false) as BubbleTextView favorite.applyFromWorkspaceItem(info) favorite.setOnClickListener(clickListener) favorite.onFocusChangeListener = focusListener + + if (info.container == Favorites.CONTAINER_HOTSEAT_PREDICTION) favorite.verifyHighRes() return favorite } diff --git a/tests/multivalentTests/src/com/android/launcher3/model/WorkspaceItemProcessorTest.kt b/tests/multivalentTests/src/com/android/launcher3/model/WorkspaceItemProcessorTest.kt index 09deb59905..571265879f 100644 --- a/tests/multivalentTests/src/com/android/launcher3/model/WorkspaceItemProcessorTest.kt +++ b/tests/multivalentTests/src/com/android/launcher3/model/WorkspaceItemProcessorTest.kt @@ -16,7 +16,6 @@ package com.android.launcher3.model -import android.appwidget.AppWidgetProviderInfo import android.content.ComponentName import android.content.Intent import android.content.pm.ApplicationInfo @@ -52,7 +51,6 @@ import com.android.launcher3.model.data.WorkspaceItemInfo.FLAG_RESTORED_ICON import com.android.launcher3.model.data.WorkspaceItemInfo.FLAG_RESTORE_STARTED import com.android.launcher3.pm.UserCache import com.android.launcher3.shortcuts.ShortcutKey -import com.android.launcher3.util.ComponentKey import com.android.launcher3.util.ContentWriter import com.android.launcher3.util.PackageManagerHelper import com.android.launcher3.util.PackageUserKey @@ -107,8 +105,6 @@ class WorkspaceItemProcessorTest { private var mKeyToPinnedShortcutsMap: MutableMap = mutableMapOf() private var mInstallingPkgs: HashMap = hashMapOf() private var mAllDeepShortcuts: MutableList = mutableListOf() - private var mWidgetProvidersMap: MutableMap = - mutableMapOf() private var mPendingPackages: MutableSet = mutableSetOf() private lateinit var itemProcessorUnderTest: WorkspaceItemProcessor @@ -153,7 +149,6 @@ class WorkspaceItemProcessorTest { mKeyToPinnedShortcutsMap = mutableMapOf() mInstallingPkgs = hashMapOf() mAllDeepShortcuts = mutableListOf() - mWidgetProvidersMap = mutableMapOf() mIconRequestInfos = mutableListOf() mPendingPackages = mutableSetOf() } @@ -171,7 +166,6 @@ class WorkspaceItemProcessorTest { launcherApps: LauncherApps = mLauncherApps, shortcutKeyToPinnedShortcuts: Map = mKeyToPinnedShortcutsMap, bgDataModel: BgDataModel = mockBgDataModel, - widgetProvidersMap: MutableMap = mWidgetProvidersMap, widgetInflater: WidgetInflater = mockWidgetInflater, pmHelper: PackageManagerHelper = mockPmHelper, iconRequestInfos: MutableList> = mIconRequestInfos, @@ -189,7 +183,6 @@ class WorkspaceItemProcessorTest { launcherApps = launcherApps, context = mContext, bgDataModel = bgDataModel, - widgetProvidersMap = widgetProvidersMap, widgetInflater = widgetInflater, pmHelper = pmHelper, unlockedUsers = unlockedUsers, @@ -647,8 +640,7 @@ class WorkspaceItemProcessorTest { mInstallingPkgs[packageUserKey] = PackageInstaller.SessionInfo() // When - itemProcessorUnderTest = - createWorkspaceItemProcessorUnderTest(widgetProvidersMap = mWidgetProvidersMap) + itemProcessorUnderTest = createWorkspaceItemProcessorUnderTest() itemProcessorUnderTest.processItem() // Then @@ -662,9 +654,6 @@ class WorkspaceItemProcessorTest { assertThat(targetComponent).isEqualTo(expectedWidgetInfo.targetComponent) assertThat(appWidgetId).isEqualTo(expectedWidgetInfo.appWidgetId) } - val expectedComponentKey = - ComponentKey(expectedWidgetProviderInfo.provider, expectedWidgetProviderInfo.user) - assertThat(mWidgetProvidersMap[expectedComponentKey]).isEqualTo(expectedWidgetProviderInfo) } @Test @@ -702,8 +691,7 @@ class WorkspaceItemProcessorTest { mock().apply { whenever(inflateAppWidget(any())).thenReturn(inflationResult) } - itemProcessorUnderTest = - createWorkspaceItemProcessorUnderTest(widgetProvidersMap = mWidgetProvidersMap) + itemProcessorUnderTest = createWorkspaceItemProcessorUnderTest() // When itemProcessorUnderTest.processItem() @@ -743,8 +731,7 @@ class WorkspaceItemProcessorTest { val expectedComponentName = ComponentName.unflattenFromString(expectedProvider) // When - itemProcessorUnderTest = - createWorkspaceItemProcessorUnderTest(widgetProvidersMap = mWidgetProvidersMap) + itemProcessorUnderTest = createWorkspaceItemProcessorUnderTest() itemProcessorUnderTest.processItem() // Then @@ -783,8 +770,7 @@ class WorkspaceItemProcessorTest { mock().apply { whenever(inflateAppWidget(any())).thenReturn(inflationResult) } - itemProcessorUnderTest = - createWorkspaceItemProcessorUnderTest(widgetProvidersMap = mWidgetProvidersMap) + itemProcessorUnderTest = createWorkspaceItemProcessorUnderTest() // When itemProcessorUnderTest.processItem() diff --git a/tests/src/com/android/launcher3/model/WorkspaceItemProcessorExtraTest.kt b/tests/src/com/android/launcher3/model/WorkspaceItemProcessorExtraTest.kt index fd44023de4..9d234190e6 100644 --- a/tests/src/com/android/launcher3/model/WorkspaceItemProcessorExtraTest.kt +++ b/tests/src/com/android/launcher3/model/WorkspaceItemProcessorExtraTest.kt @@ -16,7 +16,6 @@ package com.android.launcher3.model -import android.appwidget.AppWidgetProviderInfo import android.content.ComponentName import android.content.Context import android.content.Intent @@ -44,7 +43,6 @@ import com.android.launcher3.model.data.LauncherAppWidgetInfo.FLAG_UI_NOT_READY import com.android.launcher3.model.data.WorkspaceItemInfo import com.android.launcher3.pm.UserCache import com.android.launcher3.shortcuts.ShortcutKey -import com.android.launcher3.util.ComponentKey import com.android.launcher3.util.PackageManagerHelper import com.android.launcher3.util.PackageUserKey import com.android.launcher3.util.UserIconInfo @@ -89,8 +87,6 @@ class WorkspaceItemProcessorExtraTest { private var mKeyToPinnedShortcutsMap: MutableMap = mutableMapOf() private var mInstallingPkgs: HashMap = hashMapOf() private var mAllDeepShortcuts: MutableList = mutableListOf() - private var mWidgetProvidersMap: MutableMap = - mutableMapOf() private var mPendingPackages: MutableSet = mutableSetOf() private lateinit var itemProcessorUnderTest: WorkspaceItemProcessor @@ -141,7 +137,6 @@ class WorkspaceItemProcessorExtraTest { mKeyToPinnedShortcutsMap = mutableMapOf() mInstallingPkgs = hashMapOf() mAllDeepShortcuts = mutableListOf() - mWidgetProvidersMap = mutableMapOf() mIconRequestInfos = mutableListOf() mPendingPackages = mutableSetOf() } @@ -186,8 +181,7 @@ class WorkspaceItemProcessorExtraTest { mInstallingPkgs[packageUserKey] = PackageInstaller.SessionInfo() // When - itemProcessorUnderTest = - createWorkspaceItemProcessorUnderTest(widgetProvidersMap = mWidgetProvidersMap) + itemProcessorUnderTest = createWorkspaceItemProcessorUnderTest() itemProcessorUnderTest.processItem() // Then @@ -251,8 +245,7 @@ class WorkspaceItemProcessorExtraTest { mock().apply { whenever(inflateAppWidget(any())).thenReturn(inflationResult) } - itemProcessorUnderTest = - createWorkspaceItemProcessorUnderTest(widgetProvidersMap = mWidgetProvidersMap) + itemProcessorUnderTest = createWorkspaceItemProcessorUnderTest() // When itemProcessorUnderTest.processItem() @@ -270,7 +263,6 @@ class WorkspaceItemProcessorExtraTest { shortcutKeyToPinnedShortcuts: Map = mKeyToPinnedShortcutsMap, context: Context = mockContext, bgDataModel: BgDataModel = mockBgDataModel, - widgetProvidersMap: MutableMap = mWidgetProvidersMap, widgetInflater: WidgetInflater = mockWidgetInflater, pmHelper: PackageManagerHelper = mockPmHelper, iconRequestInfos: MutableList> = mIconRequestInfos, @@ -288,7 +280,6 @@ class WorkspaceItemProcessorExtraTest { userManagerState = userManagerState, launcherApps = launcherApps, bgDataModel = bgDataModel, - widgetProvidersMap = widgetProvidersMap, widgetInflater = widgetInflater, pmHelper = pmHelper, unlockedUsers = unlockedUsers, From 612aac88cbdf6482dfdde2eb2fddc5cedf83fdcc Mon Sep 17 00:00:00 2001 From: Jordan Silva Date: Fri, 28 Mar 2025 18:40:45 +0000 Subject: [PATCH 20/21] Update marquee to show only when chip is expanded - Introduced title and titleCollapsed to change the text when expanded and collapsed using only 2 dots for truncate the text, similar to ellipsize="marquee". - Removed ellipsize="marquee" from the XML to prevent chip relayout when entering in Overview. See b/406969521. Fix: 406969521 Fix: 403193877 Flag: com.android.launcher3.enable_overview_icon_menu Test: OverviewImageTest Test: OverviewSplitTaskImageTest Change-Id: Ia95eb8b7ec6d22b9d576defe7c66a4950ee1dca3 --- quickstep/res/layout/icon_app_chip_view.xml | 5 +- quickstep/res/values/dimens.xml | 4 + .../quickstep/views/IconAppChipView.kt | 74 +++++++++++-------- 3 files changed, 52 insertions(+), 31 deletions(-) diff --git a/quickstep/res/layout/icon_app_chip_view.xml b/quickstep/res/layout/icon_app_chip_view.xml index 3173528248..0dfe0e493c 100644 --- a/quickstep/res/layout/icon_app_chip_view.xml +++ b/quickstep/res/layout/icon_app_chip_view.xml @@ -57,10 +57,11 @@ android:gravity="start|center_vertical" android:maxLines="1" android:singleLine="true" - android:ellipsize="marquee" + android:ellipsize="none" android:textAlignment="viewStart" android:importantForAccessibility="no" - android:fadingEdge="horizontal" + android:requiresFadingEdge="horizontal" + android:fadingEdgeLength="@dimen/task_thumbnail_icon_menu_text_fading_size" android:marqueeRepeatLimit="1" android:scrollHorizontally="true" style="@style/IconAppChipMenuTextStyle" /> diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml index 9bde865b2e..640c94ef5d 100644 --- a/quickstep/res/values/dimens.xml +++ b/quickstep/res/values/dimens.xml @@ -66,6 +66,8 @@ 8dp 8dp + + 12dp 2dp @@ -81,6 +83,8 @@ 44dp 4dp + + 20dp 30dp 18dp diff --git a/quickstep/src/com/android/quickstep/views/IconAppChipView.kt b/quickstep/src/com/android/quickstep/views/IconAppChipView.kt index 307e00cd02..ff9f99fa30 100644 --- a/quickstep/src/com/android/quickstep/views/IconAppChipView.kt +++ b/quickstep/src/com/android/quickstep/views/IconAppChipView.kt @@ -23,7 +23,7 @@ import android.content.Context import android.graphics.Outline import android.graphics.Rect import android.graphics.drawable.Drawable -import android.text.TextUtils +import android.text.TextUtils.TruncateAt import android.util.AttributeSet import android.view.View import android.view.ViewAnimationUtils @@ -87,10 +87,14 @@ constructor( ) // Contents dimensions - private val appNameHorizontalMargin = + private val appNameHorizontalMarginCollapsed = resources.getDimensionPixelSize( R.dimen.task_thumbnail_icon_menu_app_name_margin_horizontal_collapsed ) + private val appNameHorizontalMarginExpanded = + resources.getDimensionPixelSize( + R.dimen.task_thumbnail_icon_menu_app_name_margin_horizontal_expanded + ) private val arrowMarginEnd = resources.getDimensionPixelSize(R.dimen.task_thumbnail_icon_menu_arrow_margin) private val iconViewMarginStart = @@ -148,6 +152,7 @@ constructor( override fun getDrawable(): Drawable? = iconView?.drawable private var currentIconDrawableHash: Int = 0 + override fun setDrawable(icon: Drawable?) { if (icon.hashCode() == currentIconDrawableHash) return iconView?.drawable = icon @@ -209,18 +214,12 @@ constructor( // Layout Params for the collapsed Icon Text View val textMarginStart = - iconMarginStartRelativeToParent + appIconSize + appNameHorizontalMargin + iconMarginStartRelativeToParent + appIconSize + appNameHorizontalMarginCollapsed val iconTextCollapsedParams = appTitle!!.layoutParams as LayoutParams orientationHandler.setIconAppChipChildrenParams(iconTextCollapsedParams, textMarginStart) iconTextCollapsedParams.width = calculateCollapsedTextWidth(collapsedBackgroundBounds.width()) - appTitle!!.layoutParams = iconTextCollapsedParams - // select to enable marquee and disable it when is running test harness. - if (Utilities.isRunningInTestHarness()) { - disableAppTitleMarquee() - } else { - appTitle!!.isSelected = true - } + appTitle?.layoutParams = iconTextCollapsedParams // Layout Params for the Icon Arrow View val iconArrowParams = iconArrowView!!.layoutParams as LayoutParams @@ -240,12 +239,12 @@ constructor( ) } - private fun disableAppTitleMarquee() { + private fun enableMarquee(isEnabled: Boolean) { + // Marquee should not be enabled when is running test harness. + val isMarqueeEnabled = isEnabled && !Utilities.isRunningInTestHarness() appTitle?.let { - it.isHorizontalFadingEdgeEnabled = false - it.ellipsize = TextUtils.TruncateAt.END - it.horizontallyScrolling = false - it.isSelected = false + it.ellipsize = if (isMarqueeEnabled) TruncateAt.MARQUEE else null + it.isSelected = isMarqueeEnabled } } @@ -265,13 +264,21 @@ constructor( iconViewMarginStart - appIconSize - arrowSize - - appNameHorizontalMargin - + appNameHorizontalMarginCollapsed - arrowMarginEnd) val spaceLeftForText = maxWidth - minWidthAllowed - return minOf(collapsedTextWidth, spaceLeftForText) + return minOf(collapsedTextWidth, spaceLeftForText).coerceAtLeast(0) } + private fun calculateExpandedTextWidth(width: Int): Int = + width - + iconViewMarginStart - + iconViewDrawableExpandedSize - + arrowSize - + appNameHorizontalMarginExpanded - + arrowMarginEnd + override fun setIconColorTint(color: Int, amount: Float) { // RecentsView's COLOR_TINT animates between 0 and 0.5f, we want to hide the app chip menu. val colorTintAlpha = Utilities.mapToRange(amount, 0f, 0.5f, 1f, 0f, Interpolators.LINEAR) @@ -339,13 +346,14 @@ constructor( val isRtl = isLayoutRtl bringToFront() // Clip expanded text with reveal animation so it doesn't go beyond the edge of the menu + val expandedAppTitleWidth = calculateExpandedTextWidth(expandedBackgroundBounds.width()) val expandedTextRevealAnim = ViewAnimationUtils.createCircularReveal( appTitle, 0, appTitle!!.height / 2, appTitle!!.width.toFloat(), - expandedMaxTextWidth.toFloat(), + expandedAppTitleWidth.toFloat(), ) // Animate background clipping val backgroundAnimator = @@ -359,9 +367,9 @@ constructor( val iconViewScaling = iconViewDrawableExpandedSize / appIconSize.toFloat() val arrowTranslationX = (expandedBackgroundBounds.right - collapsedBackgroundBounds.right).toFloat() - val iconCenterToTextCollapsed = appIconSize / 2f + appNameHorizontalMargin + val iconCenterToTextCollapsed = appIconSize / 2f + appNameHorizontalMarginCollapsed val iconCenterToTextExpanded = - iconViewDrawableExpandedSize / 2f + appNameHorizontalMargin + iconViewDrawableExpandedSize / 2f + appNameHorizontalMarginCollapsed val textTranslationX = iconCenterToTextExpanded - iconCenterToTextCollapsed val textTranslationXWithRtl = if (isRtl) -textTranslationX else textTranslationX @@ -414,14 +422,23 @@ constructor( if (!animated) animator!!.duration = 0 animator!!.interpolator = Interpolators.EMPHASIZED + + // Increase the chip and appTitle size before the animation starts when it's expanding. + // And decrease the size after the animation when is collapsing. animator!!.addListener( onStart = { - appTitle!!.isSelected = false - if (status == AppChipStatus.Expanded) updateChipSize() + when (status) { + AppChipStatus.Expanded -> updateChipSize() + // Disable marquee before chip is collapsed + AppChipStatus.Collapsed -> enableMarquee(false) + } }, onEnd = { - if (status == AppChipStatus.Collapsed) updateChipSize() - appTitle!!.isSelected = true + when (status) { + AppChipStatus.Collapsed -> updateChipSize() + // Enable marquee after chip is fully expanded + AppChipStatus.Expanded -> enableMarquee(true) + } }, ) animator!!.start() @@ -444,7 +461,7 @@ constructor( when (status) { AppChipStatus.Expanded -> { updateLayoutParams { width = chipWidth } - appTitle!!.updateLayoutParams { width = expandedMaxTextWidth } + appTitle!!.updateLayoutParams { width = calculateExpandedTextWidth(chipWidth) } } AppChipStatus.Collapsed -> { appTitle!!.updateLayoutParams { @@ -491,17 +508,16 @@ constructor( if (mParent == null) return null return when (direction) { FOCUS_RIGHT, - FOCUS_DOWN -> mParent.focusSearch(this, View.FOCUS_FORWARD) + FOCUS_DOWN -> mParent.focusSearch(this, FOCUS_FORWARD) FOCUS_UP, - FOCUS_LEFT -> mParent.focusSearch(this, View.FOCUS_BACKWARD) + FOCUS_LEFT -> mParent.focusSearch(this, FOCUS_BACKWARD) else -> super.focusSearch(direction) } } fun reset() { setText(null) - setDrawable(null) - currentIconDrawableHash = 0 + drawable = null } override fun asView(): View = this From 20d700385e5de7976a74ce214dee787daf75621a Mon Sep 17 00:00:00 2001 From: Jordan Silva Date: Fri, 28 Mar 2025 18:41:09 +0000 Subject: [PATCH 21/21] Fix chip elevation when expanded Update the chip z-index of IconAppChipView when bringing it to front or sending it back. This change fixes the elevation when chip is expanded over another chip for split tasks. Update the task z-index when bottom row chip is expanded to guarantee the chip will be displayed above other TaskVIews. Fix: 406696829 Fix: 317007147 Flag: com.android.launcher3.enable_overview_icon_menu Test: OverviewImageTest Test: OverviewSplitTaskImageTest Change-Id: Ie68898beea0a012ba083fe1b950e82896ea14c41 --- .../quickstep/views/IconAppChipView.kt | 21 +++++++++++++++++++ .../com/android/quickstep/views/TaskView.kt | 3 +++ 2 files changed, 24 insertions(+) diff --git a/quickstep/src/com/android/quickstep/views/IconAppChipView.kt b/quickstep/src/com/android/quickstep/views/IconAppChipView.kt index ff9f99fa30..fbdcd674d7 100644 --- a/quickstep/src/com/android/quickstep/views/IconAppChipView.kt +++ b/quickstep/src/com/android/quickstep/views/IconAppChipView.kt @@ -418,6 +418,7 @@ constructor( ) animator!!.duration = MENU_BACKGROUND_HIDE_DURATION.toLong() status = AppChipStatus.Collapsed + sendToBack() } if (!animated) animator!!.duration = 0 @@ -504,6 +505,24 @@ constructor( } } + override fun bringToFront() { + super.bringToFront() + z += Z_INDEX_FRONT + updateParentZIndex(Z_INDEX_FRONT) + } + + private fun sendToBack() { + z -= Z_INDEX_FRONT + updateParentZIndex(-Z_INDEX_FRONT) + } + + private fun updateParentZIndex(zIndex: Float) { + val parentView = parent as? TaskView + if (parentView?.isOnGridBottomRow == true) { + parentView.z += zIndex + } + } + override fun focusSearch(direction: Int): View? { if (mParent == null) return null return when (direction) { @@ -533,6 +552,8 @@ constructor( private const val MENU_BACKGROUND_REVEAL_DURATION = 417 private const val MENU_BACKGROUND_HIDE_DURATION = 333 + private const val Z_INDEX_FRONT = 10f + private const val NUM_ALPHA_CHANNELS = 4 private const val INDEX_CONTENT_ALPHA = 0 private const val INDEX_COLOR_FILTER_ALPHA = 1 diff --git a/quickstep/src/com/android/quickstep/views/TaskView.kt b/quickstep/src/com/android/quickstep/views/TaskView.kt index fefd59df9c..e19a9af10d 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.kt +++ b/quickstep/src/com/android/quickstep/views/TaskView.kt @@ -181,6 +181,9 @@ constructor( val firstItemInfo: ItemInfo? get() = firstTaskContainer?.itemInfo + val isOnGridBottomRow: Boolean + get() = recentsView?.isOnGridBottomRow(this) == true + /** * A [TaskViewItemInfo] of this TaskView. The [firstTaskContainer] will be used to get some * specific information like user, title etc of the Task. However, these task specific