Snap for 13450015 from 237e594dd0 to 25Q3-release
Change-Id: I9490d4e2e0e55382d6c333f89f60ca68cdea56c3
This commit is contained in:
commit
61e772dfae
81 files changed
+282
-396
No files matched your search
@@ -209,13 +209,6 @@ flag {
|
||||
bug: "292269949"
|
||||
}
|
||||
|
||||
flag {
|
||||
name: "enable_smartspace_as_a_widget"
|
||||
namespace: "launcher"
|
||||
description: "Enables smartspace as a widget"
|
||||
bug: "300140279"
|
||||
}
|
||||
|
||||
flag {
|
||||
name: "enabled_folders_in_all_apps"
|
||||
namespace: "launcher"
|
||||
|
||||
@@ -26,11 +26,6 @@ public final class BuildConfig {
|
||||
*/
|
||||
public static final boolean QSB_ON_FIRST_SCREEN = true;
|
||||
|
||||
/**
|
||||
* Flag to state if the widget on the top of the first screen should be shown.
|
||||
*/
|
||||
public static final boolean WIDGET_ON_FIRST_SCREEN = false;
|
||||
|
||||
/**
|
||||
* Flag to control various developer centric features
|
||||
*/
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<string name="action_share" msgid="2648470652637092375">"共有"</string>
|
||||
<string name="action_screenshot" msgid="8171125848358142917">"スクリーンショット"</string>
|
||||
<string name="action_split" msgid="2098009717623550676">"分割"</string>
|
||||
<string name="action_save_app_pair" msgid="5974823919237645229">"アプリのペア設定保存"</string>
|
||||
<string name="action_save_app_pair" msgid="5974823919237645229">"アプリの組み合わせを保存"</string>
|
||||
<string name="toast_split_select_app" msgid="8464310533320556058">"分割画面を使用するには、他のアプリをタップします"</string>
|
||||
<string name="toast_contextual_split_select_app" msgid="433510957123687090">"分割画面を使用するには別のアプリを選択してください"</string>
|
||||
<string name="toast_split_select_app_cancel" msgid="1939025102486630426">"キャンセル"</string>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<string name="overview_gesture_feedback_complete_without_follow_up" msgid="2903050864432331629">"Je weet nu hoe je het gebaar Schakelen tussen apps maakt"</string>
|
||||
<string name="overview_gesture_intro_title" msgid="2902054412868489378">"Swipe om tussen apps te schakelen"</string>
|
||||
<string name="overview_gesture_intro_subtitle" msgid="4968091015637850859">"Swipe omhoog vanaf de onderkant van het scherm, houd vast en laat los om tussen apps te schakelen."</string>
|
||||
<string name="overview_gesture_tutorial_title" msgid="4125835002668708720">"Schakelen tussen apps"</string>
|
||||
<string name="overview_gesture_tutorial_title" msgid="4125835002668708720">"Wisselen van app"</string>
|
||||
<string name="overview_gesture_tutorial_subtitle" msgid="5253549754058973071">"Swipe omhoog vanaf de onderkant van het scherm, houd je vinger op het scherm en laat dan los"</string>
|
||||
<string name="overview_gesture_tutorial_success" msgid="1910267697807973076">"Goed bezig"</string>
|
||||
<string name="gesture_tutorial_confirm_title" msgid="6201516182040074092">"Klaar"</string>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<string name="recent_task_desktop" msgid="8081113562549637334">"డెస్క్టాప్"</string>
|
||||
<string name="recents_empty_message" msgid="7040467240571714191">"ఇటీవలి ఐటెమ్లు ఏవీ లేవు"</string>
|
||||
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"యాప్ వినియోగ సెట్టింగ్లు"</string>
|
||||
<string name="recents_clear_all" msgid="5328176793634888831">"అన్నీ తీసివేయండి"</string>
|
||||
<string name="recents_clear_all" msgid="5328176793634888831">"అన్నీ క్లియర్ చేయండి"</string>
|
||||
<string name="accessibility_recent_apps" msgid="4058661986695117371">"ఇటీవలి యాప్లు"</string>
|
||||
<string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
|
||||
<string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 నిమిషం"</string>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<string name="action_share" msgid="2648470652637092375">"分享"</string>
|
||||
<string name="action_screenshot" msgid="8171125848358142917">"屏幕截图"</string>
|
||||
<string name="action_split" msgid="2098009717623550676">"分屏"</string>
|
||||
<string name="action_save_app_pair" msgid="5974823919237645229">"保存应用组合"</string>
|
||||
<string name="action_save_app_pair" msgid="5974823919237645229">"保存应用对"</string>
|
||||
<string name="toast_split_select_app" msgid="8464310533320556058">"点按另一个应用即可使用分屏"</string>
|
||||
<string name="toast_contextual_split_select_app" msgid="433510957123687090">"另外选择一个应用才可使用分屏模式"</string>
|
||||
<string name="toast_split_select_app_cancel" msgid="1939025102486630426">"取消"</string>
|
||||
|
||||
@@ -110,6 +110,7 @@ import com.android.systemui.unfold.UnfoldTransitionProgressProvider;
|
||||
import com.android.systemui.unfold.util.ScopedUnfoldTransitionProgressProvider;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
@@ -1757,14 +1758,7 @@ public class TaskbarManagerImpl implements DisplayDecorationListener {
|
||||
|
||||
/** Creates a {@link PendingIntent} for showing / hiding the all apps UI. */
|
||||
public PendingIntent createAllAppsPendingIntent(Executor uiExecutor) {
|
||||
return new PendingIntent(new IIntentSender.Stub() {
|
||||
@Override
|
||||
public void send(int code, Intent intent, String resolvedType,
|
||||
IBinder allowlistToken, IIntentReceiver finishedReceiver,
|
||||
String requiredPermission, Bundle options) {
|
||||
uiExecutor.execute(TaskbarManagerImpl.this::toggleAllAppsSearch);
|
||||
}
|
||||
});
|
||||
return new PendingIntent(new AllAppsIntentSender(uiExecutor, this));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1816,4 +1810,25 @@ public class TaskbarManagerImpl implements DisplayDecorationListener {
|
||||
private final DeviceProfile.OnDeviceProfileChangeListener mDebugActivityDeviceProfileChanged =
|
||||
dp -> debugPrimaryTaskbar("mActivity onDeviceProfileChanged", true);
|
||||
|
||||
/** Use weak reference to avoid leaking TIS via {@link TaskbarManagerImpl} */
|
||||
private static class AllAppsIntentSender extends IIntentSender.Stub {
|
||||
|
||||
private final Executor mUiExecutor;
|
||||
private final WeakReference<TaskbarManagerImpl> mWeakTaskbarManager;
|
||||
|
||||
AllAppsIntentSender(Executor uiExecutor, TaskbarManagerImpl taskbarManager) {
|
||||
mUiExecutor = uiExecutor;
|
||||
mWeakTaskbarManager = new WeakReference<>(taskbarManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(int i, Intent intent, String s, IBinder iBinder,
|
||||
IIntentReceiver iIntentReceiver, String s1, Bundle bundle) {
|
||||
TaskbarManagerImpl taskbarManager = mWeakTaskbarManager.get();
|
||||
if (taskbarManager == null) {
|
||||
return;
|
||||
}
|
||||
mUiExecutor.execute(taskbarManager::toggleAllAppsSearch);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -20,7 +20,6 @@ import static com.android.app.animation.Interpolators.INSTANT;
|
||||
import static com.android.app.animation.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.MotionEventsUtils.isTrackpadMultiFingerSwipe;
|
||||
import static com.android.quickstep.AbsSwipeUpHandler.RECENTS_ATTACH_DURATION;
|
||||
import static com.android.quickstep.GestureState.GestureEndTarget.LAST_TASK;
|
||||
import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_ATTACHED_ALPHA_ANIM;
|
||||
import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_FADE_ANIM;
|
||||
import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_TRANSLATE_X_ANIM;
|
||||
@@ -40,7 +39,6 @@ import androidx.annotation.Nullable;
|
||||
import com.android.launcher3.anim.AnimatorPlaybackController;
|
||||
import com.android.launcher3.anim.PendingAnimation;
|
||||
import com.android.launcher3.statehandlers.DepthController;
|
||||
import com.android.launcher3.statehandlers.DesktopVisibilityController;
|
||||
import com.android.launcher3.statemanager.BaseState;
|
||||
import com.android.launcher3.statemanager.StatefulActivity;
|
||||
import com.android.launcher3.taskbar.TaskbarUIController;
|
||||
@@ -71,37 +69,6 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
|
||||
mTargetState = overviewState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the current gesture transition is cancelled.
|
||||
* @param activityVisible Whether the user can see the changes we make here, so try to animate.
|
||||
* @param endTarget If the gesture ended before we got cancelled, where we were headed.
|
||||
*/
|
||||
public void onTransitionCancelled(boolean activityVisible,
|
||||
@Nullable GestureState.GestureEndTarget endTarget) {
|
||||
ACTIVITY_TYPE activity = getCreatedContainer();
|
||||
if (activity == null) {
|
||||
return;
|
||||
}
|
||||
STATE_TYPE startState = activity.getStateManager().getRestState();
|
||||
if (endTarget != null) {
|
||||
// We were on our way to this state when we got canceled, end there instead.
|
||||
startState = stateFromGestureEndTarget(endTarget);
|
||||
if (DesktopVisibilityController.INSTANCE.get(activity)
|
||||
.isInDesktopModeAndNotInOverview(activity.getDisplayId())
|
||||
&& endTarget == LAST_TASK) {
|
||||
// When we are cancelling the transition and going back to last task, move to
|
||||
// rest state instead when desktop tasks are visible.
|
||||
// If a fullscreen task is visible, launcher goes to normal state when the
|
||||
// activity is stopped. This does not happen when desktop tasks are visible
|
||||
// on top of launcher. Force the launcher state to rest state here.
|
||||
startState = activity.getStateManager().getRestState();
|
||||
// Do not animate the transition
|
||||
activityVisible = false;
|
||||
}
|
||||
}
|
||||
activity.getStateManager().goToState(startState, activityVisible);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public abstract ACTIVITY_TYPE getCreatedContainer();
|
||||
|
||||
|
||||
@@ -231,30 +231,24 @@ public abstract class BaseContainerInterface<STATE_TYPE extends BaseState<STATE_
|
||||
*/
|
||||
public void onTransitionCancelled(boolean activityVisible,
|
||||
@Nullable GestureState.GestureEndTarget endTarget) {
|
||||
RecentsViewContainer container = getCreatedContainer();
|
||||
CONTAINER_TYPE container = getCreatedContainer();
|
||||
if (container == null) {
|
||||
return;
|
||||
}
|
||||
RecentsView recentsView = container.getOverviewPanel();
|
||||
BaseState startState = recentsView.getStateManager().getRestState();
|
||||
STATE_TYPE startState = container.getStateManager().getRestState();
|
||||
final var context = container.asContext();
|
||||
if (DesktopVisibilityController.INSTANCE.get(context).isInDesktopModeAndNotInOverview(
|
||||
context.getDisplayId()) && endTarget == null) {
|
||||
// When tapping on the Taskbar in Desktop mode, reset to BackgroundApp to avoid the
|
||||
// home screen icons flickering. Technically we could probably be do this for
|
||||
// non-desktop as well, but limiting to this use case to reduce risk.
|
||||
endTarget = LAST_TASK;
|
||||
}
|
||||
if (endTarget != null) {
|
||||
// We were on our way to this state when we got canceled, end there instead.
|
||||
startState = stateFromGestureEndTarget(endTarget);
|
||||
final var context = recentsView.getContext();
|
||||
if (DesktopVisibilityController.INSTANCE.get(context)
|
||||
.isInDesktopModeAndNotInOverview(context.getDisplayId())
|
||||
&& endTarget == LAST_TASK) {
|
||||
// When we are cancelling the transition and going back to last task, move to
|
||||
// rest state instead when desktop tasks are visible.
|
||||
// If a fullscreen task is visible, launcher goes to normal state when the
|
||||
// activity is stopped. This does not happen when desktop tasks are visible
|
||||
// on top of launcher. Force the launcher state to rest state here.
|
||||
startState = recentsView.getStateManager().getRestState();
|
||||
// Do not animate the transition
|
||||
activityVisible = false;
|
||||
}
|
||||
}
|
||||
recentsView.getStateManager().goToState(startState, activityVisible);
|
||||
container.getStateManager().goToState(startState, activityVisible);
|
||||
}
|
||||
|
||||
public final void calculateTaskSize(Context context, DeviceProfile dp, Rect outRect,
|
||||
|
||||
@@ -229,8 +229,8 @@ public final class TaskViewUtils {
|
||||
boolean showAsGrid = dp.isTablet;
|
||||
boolean parallaxCenterAndAdjacentTask =
|
||||
!showAsGrid && taskIndex != recentsView.getCurrentPage();
|
||||
int taskRectTranslationPrimary = recentsView.getScrollOffset(taskIndex);
|
||||
int taskRectTranslationSecondary = showAsGrid ? (int) taskView.getGridTranslationY() : 0;
|
||||
int scrollOffset = recentsView.getScrollOffset(taskIndex);
|
||||
int gridTranslationY = showAsGrid ? (int) taskView.getGridTranslationY() : 0;
|
||||
|
||||
RemoteTargetHandle[] topMostSimulators = null;
|
||||
|
||||
@@ -244,15 +244,15 @@ public final class TaskViewUtils {
|
||||
// be stale. Use the display value instead.
|
||||
int displayRotation = DisplayController.INSTANCE.get(context).getInfo().rotation;
|
||||
tvsLocal.getOrientationState().update(displayRotation, displayRotation);
|
||||
tvsLocal.calculateTaskSize();
|
||||
|
||||
tvsLocal.fullScreenProgress.value = 0;
|
||||
tvsLocal.recentsViewScale.value = 1;
|
||||
if (!enableGridOnlyOverview()) {
|
||||
tvsLocal.setIsGridTask(taskView.isGridTask());
|
||||
}
|
||||
tvsLocal.getOrientationState().getOrientationHandler().set(tvsLocal,
|
||||
TaskViewSimulator::setTaskRectTranslation, taskRectTranslationPrimary,
|
||||
taskRectTranslationSecondary);
|
||||
tvsLocal.recentsViewScroll.value = scrollOffset;
|
||||
tvsLocal.taskSecondaryTranslation.value = gridTranslationY;
|
||||
|
||||
if (taskView instanceof DesktopTaskView) {
|
||||
targetHandle.getTransformParams().setTargetAlpha(1f);
|
||||
|
||||
@@ -120,9 +120,7 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
private boolean mIsGridTask;
|
||||
private final boolean mIsDesktopTask;
|
||||
private boolean mIsAnimatingToCarousel = false;
|
||||
private int mTaskRectTranslationX;
|
||||
private int mTaskRectTranslationY;
|
||||
private int mDesktopTaskIndex = 0;
|
||||
private final int mDesktopTaskIndex;
|
||||
|
||||
@Nullable
|
||||
private Matrix mTaskRectTransform = null;
|
||||
@@ -159,7 +157,10 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
calculateTaskSize();
|
||||
}
|
||||
|
||||
private void calculateTaskSize() {
|
||||
/**
|
||||
* Updates the task size.
|
||||
*/
|
||||
public void calculateTaskSize() {
|
||||
if (mDp == null) {
|
||||
return;
|
||||
}
|
||||
@@ -211,7 +212,6 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
} else {
|
||||
mTaskRect.set(mFullTaskSize);
|
||||
}
|
||||
mTaskRect.offset(mTaskRectTranslationX, mTaskRectTranslationY);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -229,11 +229,8 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
if (mDp == null) {
|
||||
return 1;
|
||||
}
|
||||
// Copy mFullTaskSize instead of updating it directly so it could be reused next time
|
||||
// without recalculating
|
||||
Rect scaleRect = new Rect(mIsAnimatingToCarousel ? mCarouselTaskSize : mFullTaskSize);
|
||||
scaleRect.offset(mTaskRectTranslationX, mTaskRectTranslationY);
|
||||
float scale = mOrientationState.getFullScreenScaleAndPivot(scaleRect, mDp, mPivot);
|
||||
float scale = mOrientationState.getFullScreenScaleAndPivot(
|
||||
mIsAnimatingToCarousel ? mCarouselTaskSize : mFullTaskSize, mDp, mPivot);
|
||||
if (mPivotOverride != null) {
|
||||
mPivot.set(mPivotOverride);
|
||||
}
|
||||
@@ -314,16 +311,6 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
mDrawAboveOtherApps = drawsAboveOtherApps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply translations on TaskRect's starting location.
|
||||
*/
|
||||
public void setTaskRectTranslation(int taskRectTranslationX, int taskRectTranslationY) {
|
||||
mTaskRectTranslationX = taskRectTranslationX;
|
||||
mTaskRectTranslationY = taskRectTranslationY;
|
||||
// Re-calculate task size after changing translation
|
||||
calculateTaskSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the pivot used to apply scale changes.
|
||||
*/
|
||||
|
||||
@@ -29,10 +29,10 @@ import androidx.test.uiautomator.Until;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.tapl.LaunchedAppState;
|
||||
import com.android.launcher3.tapl.TestHelpers;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.uioverrides.QuickstepLauncher;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.Wait;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
import com.android.quickstep.fallback.window.RecentsWindowFlags;
|
||||
import com.android.quickstep.fallback.window.RecentsWindowManager;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
|
||||
@@ -24,10 +24,10 @@ import android.content.Intent;
|
||||
|
||||
import com.android.launcher3.tapl.LauncherInstrumentation;
|
||||
import com.android.launcher3.tapl.Taskbar;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.LauncherLayoutBuilder;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Assume;
|
||||
|
||||
@@ -23,14 +23,14 @@ import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||
import static com.android.launcher3.tapl.LauncherInstrumentation.WAIT_TIME_MS;
|
||||
import static com.android.launcher3.tapl.TestHelpers.getHomeIntentInPackage;
|
||||
import static com.android.launcher3.tapl.TestHelpers.getLauncherInMyProcess;
|
||||
import static com.android.launcher3.ui.AbstractLauncherUiTest.DEFAULT_BROADCAST_TIMEOUT_SECS;
|
||||
import static com.android.launcher3.ui.AbstractLauncherUiTest.resolveSystemApp;
|
||||
import static com.android.launcher3.ui.AbstractLauncherUiTest.startAppFast;
|
||||
import static com.android.launcher3.ui.AbstractLauncherUiTest.startTestActivity;
|
||||
import static com.android.launcher3.ui.TaplTestsLauncher3Test.getAppPackageName;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.rule.ShellCommandRule.disableHeadsUpNotification;
|
||||
import static com.android.launcher3.util.rule.ShellCommandRule.getLauncherCommand;
|
||||
import static com.android.launcher3.util.ui.AbstractLauncherUiTest.DEFAULT_BROADCAST_TIMEOUT_SECS;
|
||||
import static com.android.launcher3.util.ui.AbstractLauncherUiTest.resolveSystemApp;
|
||||
import static com.android.launcher3.util.ui.AbstractLauncherUiTest.startAppFast;
|
||||
import static com.android.launcher3.util.ui.AbstractLauncherUiTest.startTestActivity;
|
||||
import static com.android.launcher3.ui.TaplTestsLauncher3Test.getAppPackageName;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
@@ -55,7 +55,6 @@ import com.android.launcher3.tapl.LauncherInstrumentation;
|
||||
import com.android.launcher3.tapl.OverviewTask;
|
||||
import com.android.launcher3.tapl.TestHelpers;
|
||||
import com.android.launcher3.testcomponent.TestCommandReceiver;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.Wait;
|
||||
import com.android.launcher3.util.rule.FailureWatcher;
|
||||
@@ -65,6 +64,7 @@ import com.android.launcher3.util.rule.ScreenRecordRule;
|
||||
import com.android.launcher3.util.rule.TestIsolationRule;
|
||||
import com.android.launcher3.util.rule.TestStabilityRule;
|
||||
import com.android.launcher3.util.rule.ViewCaptureRule;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
import com.android.quickstep.OverviewComponentObserver.OverviewChangeListener;
|
||||
import com.android.quickstep.fallback.window.RecentsWindowFlags;
|
||||
import com.android.quickstep.fallback.window.RecentsWindowManager;
|
||||
|
||||
@@ -33,10 +33,10 @@ import androidx.test.uiautomator.UiDevice;
|
||||
|
||||
import com.android.launcher3.tapl.LauncherInstrumentation;
|
||||
import com.android.launcher3.tapl.TestHelpers;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.Wait;
|
||||
import com.android.launcher3.util.rule.FailureWatcher;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
import com.android.systemui.shared.system.QuickStepContract;
|
||||
|
||||
import org.junit.rules.TestRule;
|
||||
|
||||
@@ -35,8 +35,8 @@ import androidx.test.filters.LargeTest;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import com.android.launcher3.tapl.HomeAllApps;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.rule.SetPropRule;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch;
|
||||
import com.android.quickstep.TaskbarModeSwitchRule.TaskbarModeSwitch;
|
||||
import com.android.window.flags.Flags;
|
||||
|
||||
@@ -23,8 +23,8 @@ import androidx.test.uiautomator.Until
|
||||
import com.android.launcher3.BuildConfig
|
||||
import com.android.launcher3.tapl.LaunchedAppState
|
||||
import com.android.launcher3.tapl.OverviewTask
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape
|
||||
import com.android.launcher3.util.TestUtil
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape
|
||||
import com.google.common.truth.Truth.assertWithMessage
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
||||
@@ -47,10 +47,10 @@ import com.android.launcher3.tapl.OverviewActions;
|
||||
import com.android.launcher3.tapl.OverviewTask;
|
||||
import com.android.launcher3.tapl.SelectModeButtons;
|
||||
import com.android.launcher3.tapl.Workspace;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.Wait;
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch;
|
||||
import com.android.quickstep.TaskbarModeSwitchRule.TaskbarModeSwitch;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
|
||||
@@ -23,7 +23,7 @@ import static com.android.quickstep.TaplTestsTaskbar.TaskbarMode.TRANSIENT;
|
||||
|
||||
import androidx.test.filters.LargeTest;
|
||||
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -29,7 +29,7 @@ import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import com.android.launcher3.tapl.LauncherInstrumentation.TrackpadGestureType;
|
||||
import com.android.launcher3.tapl.Workspace;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch;
|
||||
|
||||
import org.junit.After;
|
||||
|
||||
@@ -27,9 +27,9 @@ import android.util.Log;
|
||||
|
||||
import com.android.launcher3.tapl.LauncherInstrumentation;
|
||||
import com.android.launcher3.tapl.TestHelpers;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.rule.FailureWatcher;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
|
||||
import org.junit.rules.TestRule;
|
||||
import org.junit.runner.Description;
|
||||
|
||||
@@ -20,7 +20,7 @@ import androidx.test.uiautomator.By
|
||||
import com.android.launcher3.tapl.LauncherInstrumentation
|
||||
import com.android.launcher3.tapl.Overview
|
||||
import com.android.launcher3.tapl.OverviewTask
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest
|
||||
|
||||
object SplitScreenTestUtils {
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ import android.os.UserHandle
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import com.android.launcher3.model.data.ItemInfo
|
||||
import com.android.launcher3.shortcuts.ShortcutKey
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest
|
||||
import com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest
|
||||
import com.android.quickstep.util.SplitSelectDataHolder.Companion.SPLIT_PENDINGINTENT_PENDINGINTENT
|
||||
import com.android.quickstep.util.SplitSelectDataHolder.Companion.SPLIT_PENDINGINTENT_TASK
|
||||
import com.android.quickstep.util.SplitSelectDataHolder.Companion.SPLIT_SHORTCUT_TASK
|
||||
@@ -85,7 +85,7 @@ class SplitSelectDataHolderTest {
|
||||
sampleTaskInfo,
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
null,
|
||||
null
|
||||
null,
|
||||
)
|
||||
assertTrue(splitSelectDataHolder.isSplitSelectActive())
|
||||
}
|
||||
@@ -97,7 +97,7 @@ class SplitSelectDataHolderTest {
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
INVALID_TASK_ID
|
||||
INVALID_TASK_ID,
|
||||
)
|
||||
assertTrue(splitSelectDataHolder.isSplitSelectActive())
|
||||
}
|
||||
@@ -109,7 +109,7 @@ class SplitSelectDataHolderTest {
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
sampleTaskId
|
||||
sampleTaskId,
|
||||
)
|
||||
assertTrue(splitSelectDataHolder.isSplitSelectActive())
|
||||
}
|
||||
@@ -121,7 +121,7 @@ class SplitSelectDataHolderTest {
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
INVALID_TASK_ID
|
||||
INVALID_TASK_ID,
|
||||
)
|
||||
assertTrue(splitSelectDataHolder.isSplitSelectActive())
|
||||
}
|
||||
@@ -133,7 +133,7 @@ class SplitSelectDataHolderTest {
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
INVALID_TASK_ID
|
||||
INVALID_TASK_ID,
|
||||
)
|
||||
splitSelectDataHolder.setSecondTask(sampleTaskId, sampleItemInfo2)
|
||||
assertTrue(splitSelectDataHolder.isBothSplitAppsConfirmed())
|
||||
@@ -145,7 +145,7 @@ class SplitSelectDataHolderTest {
|
||||
sampleTaskInfo,
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
null,
|
||||
null
|
||||
null,
|
||||
)
|
||||
splitSelectDataHolder.setSecondTask(sampleIntent, sampleUser, sampleItemInfo2)
|
||||
assertTrue(splitSelectDataHolder.isBothSplitAppsConfirmed())
|
||||
@@ -158,7 +158,7 @@ class SplitSelectDataHolderTest {
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
INVALID_TASK_ID
|
||||
INVALID_TASK_ID,
|
||||
)
|
||||
splitSelectDataHolder.setSecondTask(sampleShortcut, sampleUser, sampleItemInfo2)
|
||||
assertTrue(splitSelectDataHolder.isBothSplitAppsConfirmed())
|
||||
@@ -170,7 +170,7 @@ class SplitSelectDataHolderTest {
|
||||
sampleTaskInfo,
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null
|
||||
null,
|
||||
)
|
||||
splitSelectDataHolder.setSecondTask(sampleTaskId2, sampleItemInfo2)
|
||||
val launchData = splitSelectDataHolder.getSplitLaunchData()
|
||||
@@ -194,7 +194,7 @@ class SplitSelectDataHolderTest {
|
||||
sampleTaskInfo,
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null
|
||||
null,
|
||||
)
|
||||
splitSelectDataHolder.setSecondTask(sampleIntent, sampleUser, sampleItemInfo2)
|
||||
val launchData = splitSelectDataHolder.getSplitLaunchData()
|
||||
@@ -218,7 +218,7 @@ class SplitSelectDataHolderTest {
|
||||
sampleTaskInfo,
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null
|
||||
null,
|
||||
)
|
||||
splitSelectDataHolder.setSecondTask(sampleShortcut, sampleUser, sampleItemInfo2)
|
||||
val launchData = splitSelectDataHolder.getSplitLaunchData()
|
||||
@@ -243,7 +243,7 @@ class SplitSelectDataHolderTest {
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
INVALID_TASK_ID
|
||||
INVALID_TASK_ID,
|
||||
)
|
||||
splitSelectDataHolder.setSecondTask(sampleTaskId, sampleItemInfo2)
|
||||
val launchData = splitSelectDataHolder.getSplitLaunchData()
|
||||
@@ -268,7 +268,7 @@ class SplitSelectDataHolderTest {
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
INVALID_TASK_ID
|
||||
INVALID_TASK_ID,
|
||||
)
|
||||
splitSelectDataHolder.setSecondTask(sampleTaskId, sampleItemInfo2)
|
||||
val launchData = splitSelectDataHolder.getSplitLaunchData()
|
||||
@@ -293,7 +293,7 @@ class SplitSelectDataHolderTest {
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
INVALID_TASK_ID
|
||||
INVALID_TASK_ID,
|
||||
)
|
||||
splitSelectDataHolder.setSecondTask(sampleIntent2, sampleUser, sampleItemInfo2)
|
||||
val launchData = splitSelectDataHolder.getSplitLaunchData()
|
||||
@@ -317,7 +317,7 @@ class SplitSelectDataHolderTest {
|
||||
sampleTaskInfo,
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null
|
||||
null,
|
||||
)
|
||||
val launchData = splitSelectDataHolder.getFullscreenLaunchData()
|
||||
|
||||
@@ -341,7 +341,7 @@ class SplitSelectDataHolderTest {
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
INVALID_TASK_ID
|
||||
INVALID_TASK_ID,
|
||||
)
|
||||
val launchData = splitSelectDataHolder.getFullscreenLaunchData()
|
||||
|
||||
@@ -365,7 +365,7 @@ class SplitSelectDataHolderTest {
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
INVALID_TASK_ID
|
||||
INVALID_TASK_ID,
|
||||
)
|
||||
val launchData = splitSelectDataHolder.getFullscreenLaunchData()
|
||||
|
||||
@@ -388,7 +388,7 @@ class SplitSelectDataHolderTest {
|
||||
sampleTaskInfo,
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
null,
|
||||
null
|
||||
null,
|
||||
)
|
||||
splitSelectDataHolder.setSecondTask(sampleIntent, sampleUser, sampleItemInfo2)
|
||||
splitSelectDataHolder.resetState()
|
||||
@@ -398,11 +398,11 @@ class SplitSelectDataHolderTest {
|
||||
@Test
|
||||
fun clearState_intent() {
|
||||
splitSelectDataHolder.setInitialTaskSelect(
|
||||
sampleIntent,
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
INVALID_TASK_ID
|
||||
sampleIntent,
|
||||
STAGE_POSITION_TOP_OR_LEFT,
|
||||
sampleItemInfo,
|
||||
null,
|
||||
INVALID_TASK_ID,
|
||||
)
|
||||
splitSelectDataHolder.setSecondTask(sampleIntent, sampleUser, sampleItemInfo2)
|
||||
splitSelectDataHolder.resetState()
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<string name="shortcuts_count" msgid="8471715556199592381">"{count,plural, =1{# raccourci}one{# raccourci}other{# raccourcis}}"</string>
|
||||
<string name="widgets_and_shortcuts_count" msgid="7209136747878365116">"<xliff:g id="WIDGETS_COUNT">%1$s</xliff:g>, <xliff:g id="SHORTCUTS_COUNT">%2$s</xliff:g>"</string>
|
||||
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
|
||||
<string name="widgets_full_sheet_search_bar_hint" msgid="8484659090860596457">"Rechercher"</string>
|
||||
<string name="widgets_full_sheet_search_bar_hint" msgid="8484659090860596457">"Recherchez"</string>
|
||||
<string name="widgets_full_sheet_cancel_button_description" msgid="5766167035728653605">"Effacer le texte dans le champ de recherche"</string>
|
||||
<string name="no_widgets_available" msgid="4337693382501046170">"Aucun widget ou raccourci proposé"</string>
|
||||
<string name="no_search_results" msgid="3787956167293097509">"Aucun widget ni raccourci trouvé"</string>
|
||||
@@ -93,7 +93,7 @@
|
||||
<string name="all_apps_search_results" msgid="5889367432531296759">"Résultats de recherche"</string>
|
||||
<string name="all_apps_button_personal_label" msgid="1315764287305224468">"Liste des applis personnelles"</string>
|
||||
<string name="all_apps_button_work_label" msgid="7270707118948892488">"Liste des applis professionnelles"</string>
|
||||
<string name="remove_drop_target_label" msgid="7812859488053230776">"Supprimer"</string>
|
||||
<string name="remove_drop_target_label" msgid="7812859488053230776">"Retirer"</string>
|
||||
<string name="uninstall_drop_target_label" msgid="4722034217958379417">"Désinstaller"</string>
|
||||
<string name="app_info_drop_target_label" msgid="692894985365717661">"Détails de l\'appli"</string>
|
||||
<string name="install_private_system_shortcut_label" msgid="1616889277073184841">"Installer dans privé"</string>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d plotis ir %2$d aukštis"</string>
|
||||
<string name="widget_preview_context_description" msgid="9045841361655787574">"<xliff:g id="WIDGET_NAME">%1$s</xliff:g> valdiklis"</string>
|
||||
<string name="widget_preview_name_and_dims_content_description" msgid="8489038126122831595">"Valdiklis: <xliff:g id="WIDGET_NAME">%1$s</xliff:g>; %2$d pločio ir %3$d aukščio"</string>
|
||||
<string name="add_item_request_drag_hint" msgid="8730547755622776606">"Paliesdami ir palaikydami valdiklį galite judėti pagrindiniame ekrane"</string>
|
||||
<string name="add_item_request_drag_hint" msgid="8730547755622776606">"Palietę ir palaikę valdiklį galėsite jį judinti pagrindiniame ekrane"</string>
|
||||
<string name="add_to_home_screen" msgid="9168649446635919791">"Pridėti prie pagrindinio ekrano"</string>
|
||||
<string name="added_to_home_screen_accessibility_text" msgid="4451545765448884415">"Valdiklis „<xliff:g id="WIDGET_NAME">%1$s</xliff:g>“ pridėtas prie pagrindinio ekrano"</string>
|
||||
<string name="suggested_widgets_header_title" msgid="1844314680798145222">"Pasiūlymai"</string>
|
||||
|
||||
@@ -94,10 +94,10 @@
|
||||
<string name="all_apps_button_personal_label" msgid="1315764287305224468">"တစ်ကိုယ်ရေသုံး အက်ပ်စာရင်း"</string>
|
||||
<string name="all_apps_button_work_label" msgid="7270707118948892488">"အလုပ်သုံး အက်ပ်စာရင်း"</string>
|
||||
<string name="remove_drop_target_label" msgid="7812859488053230776">"ဖယ်ရှားမည်"</string>
|
||||
<string name="uninstall_drop_target_label" msgid="4722034217958379417">"ဖယ်ရှားရန်"</string>
|
||||
<string name="uninstall_drop_target_label" msgid="4722034217958379417">"ဖြုတ်ရန်"</string>
|
||||
<string name="app_info_drop_target_label" msgid="692894985365717661">"အက်ပ်အချက်အလက်"</string>
|
||||
<string name="install_private_system_shortcut_label" msgid="1616889277073184841">"သီးသန့်တွင် ထည့်သွင်းရန်"</string>
|
||||
<string name="uninstall_private_system_shortcut_label" msgid="8423460530441627982">"အက်ပ်ကို ဖယ်ရှားရန်"</string>
|
||||
<string name="uninstall_private_system_shortcut_label" msgid="8423460530441627982">"အက်ပ်ကို ဖြုတ်ရန်"</string>
|
||||
<string name="install_drop_target_label" msgid="2539096853673231757">"ထည့်သွင်းရန်"</string>
|
||||
<string name="dismiss_prediction_label" msgid="3357562989568808658">"အက်ပ်အကြံမပြုပါနှင့်"</string>
|
||||
<string name="pin_prediction" msgid="4196423321649756498">"ခန့်မှန်းချက်ကို ပင်ထိုးရန်"</string>
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
<string name="all_apps_work_tab" msgid="4884822796154055118">"कामसम्बन्धी"</string>
|
||||
<string name="all_apps_personal_tab_content_description" msgid="6286808898381807242">"\"व्यक्तिगत एपहरू\" ट्याब"</string>
|
||||
<string name="all_apps_work_tab_content_description" msgid="3835637212347968316">"\"कामसम्बन्धी एपहरू\" ट्याब"</string>
|
||||
<string name="work_profile_toggle_label" msgid="3081029915775481146">"कार्य प्रोफाइल"</string>
|
||||
<string name="work_profile_toggle_label" msgid="3081029915775481146">"वर्क प्रोफाइल"</string>
|
||||
<string name="work_profile_edu_work_apps" msgid="7895468576497746520">"कामसम्बन्धी एपहरूमा ब्याज अङ्कित हुन्छ र तपाईंका IT एड्मिन ती एप हेर्न सक्छन्"</string>
|
||||
<string name="work_profile_edu_accept" msgid="6069788082535149071">"बुझेँ"</string>
|
||||
<string name="work_apps_paused_title" msgid="3040901117349444598">"कामसम्बन्धी एपहरू पज गरिएका छन्"</string>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de largura por %2$d de altura"</string>
|
||||
<string name="widget_preview_context_description" msgid="9045841361655787574">"Widget <xliff:g id="WIDGET_NAME">%1$s</xliff:g>"</string>
|
||||
<string name="widget_preview_name_and_dims_content_description" msgid="8489038126122831595">"Widget <xliff:g id="WIDGET_NAME">%1$s</xliff:g>: %2$d de largura por %3$d de altura"</string>
|
||||
<string name="add_item_request_drag_hint" msgid="8730547755622776606">"Toque no widget e o pressione para definir a posição dele na tela inicial"</string>
|
||||
<string name="add_item_request_drag_hint" msgid="8730547755622776606">"Toque e segure o widget para mover sua posição na tela inicial"</string>
|
||||
<string name="add_to_home_screen" msgid="9168649446635919791">"Adicionar à tela inicial"</string>
|
||||
<string name="added_to_home_screen_accessibility_text" msgid="4451545765448884415">"Widget <xliff:g id="WIDGET_NAME">%1$s</xliff:g> adicionado à tela inicial"</string>
|
||||
<string name="suggested_widgets_header_title" msgid="1844314680798145222">"Sugestões"</string>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<string name="all_apps_button_personal_label" msgid="1315764287305224468">"Orodha ya programu za binafsi"</string>
|
||||
<string name="all_apps_button_work_label" msgid="7270707118948892488">"Orodha ya programu za kazini"</string>
|
||||
<string name="remove_drop_target_label" msgid="7812859488053230776">"Ondoa"</string>
|
||||
<string name="uninstall_drop_target_label" msgid="4722034217958379417">"Ondoa"</string>
|
||||
<string name="uninstall_drop_target_label" msgid="4722034217958379417">"Sakinusha"</string>
|
||||
<string name="app_info_drop_target_label" msgid="692894985365717661">"Maelezo ya programu"</string>
|
||||
<string name="install_private_system_shortcut_label" msgid="1616889277073184841">"Sakinisha faraghani"</string>
|
||||
<string name="uninstall_private_system_shortcut_label" msgid="8423460530441627982">"Ondoa programu"</string>
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
<string name="split_app_usage_settings" msgid="7214375263347964093">"%1$s的使用设置"</string>
|
||||
<string name="new_window_option_taskbar" msgid="6448780542727767211">"新窗口"</string>
|
||||
<string name="manage_windows_option_taskbar" msgid="2294109489960654212">"管理窗口"</string>
|
||||
<string name="save_app_pair" msgid="5647523853662686243">"保存应用组合"</string>
|
||||
<string name="save_app_pair" msgid="5647523853662686243">"保存应用对"</string>
|
||||
<string name="app_pair_default_title" msgid="4045241727446873529">"<xliff:g id="APP1">%1$s</xliff:g> | <xliff:g id="APP2">%2$s</xliff:g>"</string>
|
||||
<string name="app_pair_unlaunchable_at_screen_size" msgid="3446551575502685376">"在该设备上无法使用此应用对"</string>
|
||||
<string name="app_pair_needs_unfold" msgid="4588897528143807002">"展开设备即可使用此应用组合"</string>
|
||||
<string name="app_pair_needs_unfold" msgid="4588897528143807002">"展开设备即可使用此应用对"</string>
|
||||
<string name="app_pair_not_available" msgid="3556767440808032031">"应用对不可用"</string>
|
||||
<string name="long_press_widget_to_add" msgid="3587712543577675817">"轻触并按住即可移动微件。"</string>
|
||||
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"点按两次并按住微件即可移动该微件或使用自定义操作。"</string>
|
||||
|
||||
@@ -203,9 +203,6 @@
|
||||
|
||||
<dimen name="minimum_icon_label_size">8sp</dimen>
|
||||
|
||||
<!-- Used for custom widgets -->
|
||||
<array name="custom_widget_providers"/>
|
||||
|
||||
<!-- Embed parameters -->
|
||||
<dimen name="activity_split_ratio" format="float">0.5</dimen>
|
||||
<integer name="min_width_split">720</integer>
|
||||
|
||||
@@ -2488,11 +2488,6 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
mModelCallbacks.bindAllWidgets(allWidgets);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindSmartspaceWidget() {
|
||||
mModelCallbacks.bindSmartspaceWidget();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindStringCache(StringCache cache) {
|
||||
mModelCallbacks.bindStringCache(cache);
|
||||
|
||||
@@ -19,7 +19,6 @@ import android.content.Context
|
||||
import android.content.Context.MODE_PRIVATE
|
||||
import android.content.SharedPreferences
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import com.android.launcher3.BuildConfig.WIDGET_ON_FIRST_SCREEN
|
||||
import com.android.launcher3.GridType.Companion.GRID_TYPE_ANY
|
||||
import com.android.launcher3.InvariantDeviceProfile.GRID_NAME_PREFS_KEY
|
||||
import com.android.launcher3.InvariantDeviceProfile.NON_FIXED_LANDSCAPE_GRID_NAME_PREFS_KEY
|
||||
@@ -238,7 +237,6 @@ constructor(@ApplicationContext private val encryptedContext: Context) {
|
||||
|
||||
const val TASKBAR_PINNING_KEY = "TASKBAR_PINNING_KEY"
|
||||
const val TASKBAR_PINNING_DESKTOP_MODE_KEY = "TASKBAR_PINNING_DESKTOP_MODE_KEY"
|
||||
const val SHOULD_SHOW_SMARTSPACE_KEY = "SHOULD_SHOW_SMARTSPACE_KEY"
|
||||
|
||||
@JvmField
|
||||
val ENABLE_TWOLINE_ALLAPPS_TOGGLE = backedUpItem("pref_enable_two_line_toggle", false)
|
||||
@@ -270,13 +268,6 @@ constructor(@ApplicationContext private val encryptedContext: Context) {
|
||||
val GRID_TYPE =
|
||||
backedUpItem(DeviceGridState.KEY_GRID_TYPE, GRID_TYPE_ANY, EncryptionType.ENCRYPTED)
|
||||
@JvmField
|
||||
val SHOULD_SHOW_SMARTSPACE =
|
||||
backedUpItem(
|
||||
SHOULD_SHOW_SMARTSPACE_KEY,
|
||||
WIDGET_ON_FIRST_SCREEN,
|
||||
EncryptionType.DEVICE_PROTECTED,
|
||||
)
|
||||
@JvmField
|
||||
val RESTORE_DEVICE =
|
||||
backedUpItem(
|
||||
RestoreDbTask.RESTORED_DEVICE_TYPE,
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.android.launcher3.BuildConfig.QSB_ON_FIRST_SCREEN
|
||||
import com.android.launcher3.LauncherConstants.TraceEvents
|
||||
import com.android.launcher3.LauncherSettings.Favorites.CONTAINER_DESKTOP
|
||||
import com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT
|
||||
import com.android.launcher3.Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET
|
||||
import com.android.launcher3.WorkspaceLayoutManager.FIRST_SCREEN_ID
|
||||
import com.android.launcher3.allapps.AllAppsStore
|
||||
import com.android.launcher3.config.FeatureFlags
|
||||
@@ -40,7 +39,6 @@ import com.android.launcher3.util.Preconditions
|
||||
import com.android.launcher3.util.RunnableList
|
||||
import com.android.launcher3.util.TraceHelper
|
||||
import com.android.launcher3.util.ViewOnDrawExecutor
|
||||
import com.android.launcher3.widget.PendingAddWidgetInfo
|
||||
import com.android.launcher3.widget.model.WidgetsListBaseEntry
|
||||
import java.util.concurrent.Executor
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
@@ -285,49 +283,16 @@ class ModelCallbacks(private var launcher: Launcher) : BgDataModel.Callbacks {
|
||||
return result
|
||||
}
|
||||
|
||||
override fun bindSmartspaceWidget() {
|
||||
val cl: CellLayout? =
|
||||
launcher.workspace.getScreenWithId(WorkspaceLayoutManager.FIRST_SCREEN_ID)
|
||||
val spanX = InvariantDeviceProfile.INSTANCE.get(launcher).numSearchContainerColumns
|
||||
|
||||
if (cl?.isRegionVacant(0, 0, spanX, 1) != true) {
|
||||
return
|
||||
}
|
||||
|
||||
val widgetsListBaseEntry: WidgetsListBaseEntry =
|
||||
launcher.widgetPickerDataProvider.get().allWidgets.firstOrNull {
|
||||
item: WidgetsListBaseEntry ->
|
||||
item.mPkgItem.packageName == BuildConfig.APPLICATION_ID
|
||||
} ?: return
|
||||
|
||||
val info =
|
||||
PendingAddWidgetInfo(
|
||||
widgetsListBaseEntry.mWidgets[0].widgetInfo,
|
||||
LauncherSettings.Favorites.CONTAINER_DESKTOP,
|
||||
)
|
||||
launcher.addPendingItem(
|
||||
info,
|
||||
info.container,
|
||||
WorkspaceLayoutManager.FIRST_SCREEN_ID,
|
||||
intArrayOf(0, 0),
|
||||
info.spanX,
|
||||
info.spanY,
|
||||
)
|
||||
}
|
||||
|
||||
private fun bindScreens(orderedScreenIds: LIntArray) {
|
||||
launcher.workspace.pageIndicator.setPauseScroll(
|
||||
/*pause=*/ true,
|
||||
launcher.deviceProfile.isTwoPanels,
|
||||
)
|
||||
val firstScreenPosition = 0
|
||||
if (
|
||||
!SHOULD_SHOW_FIRST_PAGE_WIDGET &&
|
||||
orderedScreenIds.indexOf(FIRST_SCREEN_ID) != firstScreenPosition
|
||||
) {
|
||||
if (orderedScreenIds.indexOf(FIRST_SCREEN_ID) != firstScreenPosition) {
|
||||
orderedScreenIds.removeValue(FIRST_SCREEN_ID)
|
||||
orderedScreenIds.add(firstScreenPosition, FIRST_SCREEN_ID)
|
||||
} else if (SHOULD_SHOW_FIRST_PAGE_WIDGET && orderedScreenIds.isEmpty) {
|
||||
} else if (orderedScreenIds.isEmpty) {
|
||||
// If there are no screens, we need to have an empty screen
|
||||
launcher.workspace.addExtraEmptyScreens()
|
||||
}
|
||||
@@ -393,9 +358,7 @@ class ModelCallbacks(private var launcher: Launcher) : BgDataModel.Callbacks {
|
||||
}
|
||||
}
|
||||
orderedScreenIds
|
||||
.filterNot { screenId ->
|
||||
!SHOULD_SHOW_FIRST_PAGE_WIDGET && screenId == WorkspaceLayoutManager.FIRST_SCREEN_ID
|
||||
}
|
||||
.filter { screenId -> screenId != FIRST_SCREEN_ID }
|
||||
.forEach { screenId ->
|
||||
launcher.workspace.insertNewWorkspaceScreenBeforeEmptyScreen(screenId)
|
||||
}
|
||||
@@ -486,8 +449,7 @@ class ModelCallbacks(private var launcher: Launcher) : BgDataModel.Callbacks {
|
||||
IntSet()
|
||||
.apply {
|
||||
itemIdMap.forEach { if (it.container == CONTAINER_DESKTOP) add(it.screenId) }
|
||||
if ((QSB_ON_FIRST_SCREEN && !SHOULD_SHOW_FIRST_PAGE_WIDGET) || isEmpty)
|
||||
add(Workspace.FIRST_SCREEN_ID)
|
||||
if (QSB_ON_FIRST_SCREEN || isEmpty) add(Workspace.FIRST_SCREEN_ID)
|
||||
}
|
||||
.array
|
||||
val currentScreenIds = getPagesToBindSynchronously(orderedScreenIds)
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
|
||||
package com.android.launcher3;
|
||||
|
||||
import static com.android.launcher3.BuildConfig.WIDGET_ON_FIRST_SCREEN;
|
||||
import static com.android.launcher3.Flags.enableMouseInteractionChanges;
|
||||
import static com.android.launcher3.Flags.enableSmartspaceAsAWidget;
|
||||
import static com.android.launcher3.graphics.ShapeDelegate.DEFAULT_PATH_SIZE;
|
||||
import static com.android.launcher3.icons.BitmapInfo.FLAG_THEMED;
|
||||
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT;
|
||||
@@ -147,9 +145,6 @@ public final class Utilities {
|
||||
public static final int TRANSLATE_LEFT = 2;
|
||||
public static final int TRANSLATE_RIGHT = 3;
|
||||
|
||||
public static final boolean SHOULD_SHOW_FIRST_PAGE_WIDGET =
|
||||
enableSmartspaceAsAWidget() && WIDGET_ON_FIRST_SCREEN;
|
||||
|
||||
@IntDef({TRANSLATE_UP, TRANSLATE_DOWN, TRANSLATE_LEFT, TRANSLATE_RIGHT})
|
||||
public @interface AdjustmentDirection{}
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ package com.android.launcher3;
|
||||
import static com.android.launcher3.AbstractFloatingView.TYPE_WIDGET_RESIZE_FRAME;
|
||||
import static com.android.launcher3.BubbleTextView.DISPLAY_FOLDER;
|
||||
import static com.android.launcher3.LauncherAnimUtils.SPRING_LOADED_EXIT_DELAY;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_ALL_APPS_PREDICTION;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_DESKTOP;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_ALL_APPS_PREDICTION;
|
||||
import static com.android.launcher3.LauncherState.ALL_APPS;
|
||||
import static com.android.launcher3.LauncherState.EDIT_MODE;
|
||||
import static com.android.launcher3.LauncherState.FLAG_MULTI_PAGE;
|
||||
@@ -32,7 +32,6 @@ import static com.android.launcher3.LauncherState.HINT_STATE;
|
||||
import static com.android.launcher3.LauncherState.NORMAL;
|
||||
import static com.android.launcher3.LauncherState.SPRING_LOADED;
|
||||
import static com.android.launcher3.MotionEventsUtils.isTrackpadMultiFingerSwipe;
|
||||
import static com.android.launcher3.Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET;
|
||||
import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback;
|
||||
import static com.android.launcher3.config.FeatureFlags.FOLDABLE_SINGLE_PAGE;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_HOME;
|
||||
@@ -623,7 +622,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
* Initializes and binds the first page
|
||||
*/
|
||||
public void bindAndInitFirstWorkspaceScreen() {
|
||||
if (!FeatureFlags.QSB_ON_FIRST_SCREEN || SHOULD_SHOW_FIRST_PAGE_WIDGET) {
|
||||
if (!BuildConfig.QSB_ON_FIRST_SCREEN) {
|
||||
mFirstPagePinnedItem = null;
|
||||
return;
|
||||
}
|
||||
@@ -1053,9 +1052,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
int id = mWorkspaceScreens.keyAt(i);
|
||||
CellLayout cl = mWorkspaceScreens.valueAt(i);
|
||||
// FIRST_SCREEN_ID can never be removed.
|
||||
if (((!FeatureFlags.QSB_ON_FIRST_SCREEN
|
||||
|| SHOULD_SHOW_FIRST_PAGE_WIDGET)
|
||||
|| id > FIRST_SCREEN_ID)
|
||||
if ((!BuildConfig.QSB_ON_FIRST_SCREEN || id > FIRST_SCREEN_ID)
|
||||
&& cl.getShortcutsAndWidgets().getChildCount() == 0) {
|
||||
removeScreens.add(id);
|
||||
}
|
||||
|
||||
@@ -44,14 +44,6 @@ public final class FeatureFlags {
|
||||
@Deprecated
|
||||
public static final boolean IS_STUDIO_BUILD = BuildConfig.IS_STUDIO_BUILD;
|
||||
|
||||
/**
|
||||
* Enable moving the QSB on the 0th screen of the workspace. This is not a configuration feature
|
||||
* and should be modified at a project level.
|
||||
* @deprecated Use {@link BuildConfig#QSB_ON_FIRST_SCREEN} directly
|
||||
*/
|
||||
@Deprecated
|
||||
public static final boolean QSB_ON_FIRST_SCREEN = BuildConfig.QSB_ON_FIRST_SCREEN;
|
||||
|
||||
/**
|
||||
* Feature flag to handle define config changes dynamically instead of killing the process.
|
||||
* <p>
|
||||
|
||||
@@ -25,7 +25,6 @@ import static com.android.launcher3.Hotseat.ALPHA_CHANNEL_PREVIEW_RENDERER;
|
||||
import static com.android.launcher3.LauncherPrefs.FIXED_LANDSCAPE_MODE;
|
||||
import static com.android.launcher3.LauncherPrefs.GRID_NAME;
|
||||
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;
|
||||
@@ -60,6 +59,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.lifecycle.DefaultLifecycleObserver;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.android.launcher3.BuildConfig;
|
||||
import com.android.launcher3.CellLayout;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.Hotseat;
|
||||
@@ -73,7 +73,6 @@ import com.android.launcher3.WorkspaceLayoutManager;
|
||||
import com.android.launcher3.celllayout.CellLayoutLayoutParams;
|
||||
import com.android.launcher3.celllayout.CellPosMapper;
|
||||
import com.android.launcher3.concurrent.ExecutorsModule;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.dagger.ApiWrapperModule;
|
||||
import com.android.launcher3.dagger.AppModule;
|
||||
import com.android.launcher3.dagger.LauncherAppComponent;
|
||||
@@ -463,7 +462,7 @@ public class LauncherPreviewRenderer extends BaseContext
|
||||
|
||||
|
||||
// Add first page QSB
|
||||
if (FeatureFlags.QSB_ON_FIRST_SCREEN && !SHOULD_SHOW_FIRST_PAGE_WIDGET) {
|
||||
if (BuildConfig.QSB_ON_FIRST_SCREEN) {
|
||||
CellLayout firstScreen = mWorkspaceScreens.get(FIRST_SCREEN_ID);
|
||||
View qsb = mHomeElementInflater.inflate(R.layout.qsb_preview, firstScreen, false);
|
||||
// TODO: set bgHandler on qsb when it is BaseTemplateCard, which requires API changes.
|
||||
|
||||
@@ -154,16 +154,6 @@ public class BaseLauncherBinder {
|
||||
executeCallbacksTask(c -> c.bindAllWidgets(widgets), mUiExecutor);
|
||||
}
|
||||
|
||||
/**
|
||||
* bindWidgets is abstract because it is a no-op for the go launcher.
|
||||
*/
|
||||
public void bindSmartspaceWidget() {
|
||||
if (!WIDGETS_ENABLED) {
|
||||
return;
|
||||
}
|
||||
executeCallbacksTask(c -> c.bindSmartspaceWidget(), mUiExecutor);
|
||||
}
|
||||
|
||||
protected void executeCallbacksTask(CallbackTask task, Executor executor) {
|
||||
executor.execute(() -> {
|
||||
if (mMyBindingId != mBgDataModel.lastBindId) {
|
||||
|
||||
@@ -22,7 +22,6 @@ import android.content.pm.ShortcutInfo
|
||||
import android.os.UserHandle
|
||||
import android.util.Log
|
||||
import androidx.annotation.AnyThread
|
||||
import androidx.core.util.size
|
||||
import com.android.launcher3.BuildConfig
|
||||
import com.android.launcher3.Flags
|
||||
import com.android.launcher3.LauncherSettings.Favorites.CONTAINER_DESKTOP
|
||||
@@ -30,7 +29,6 @@ import com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT
|
||||
import com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APP_PAIR
|
||||
import com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT
|
||||
import com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_FOLDER
|
||||
import com.android.launcher3.Utilities
|
||||
import com.android.launcher3.Workspace
|
||||
import com.android.launcher3.dagger.LauncherAppSingleton
|
||||
import com.android.launcher3.logging.DumpManager
|
||||
@@ -119,10 +117,7 @@ constructor(
|
||||
val screenSet = IntSet()
|
||||
itemsIdMap.forEach { if (it.container == CONTAINER_DESKTOP) screenSet.add(it.screenId) }
|
||||
|
||||
if (
|
||||
(BuildConfig.QSB_ON_FIRST_SCREEN && !Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET) ||
|
||||
screenSet.isEmpty
|
||||
) {
|
||||
if (BuildConfig.QSB_ON_FIRST_SCREEN || screenSet.isEmpty) {
|
||||
screenSet.add(Workspace.FIRST_SCREEN_ID)
|
||||
}
|
||||
return screenSet.array
|
||||
@@ -404,8 +399,6 @@ constructor(
|
||||
/** Binds the app widgets to the providers that share widgets with the UI. */
|
||||
fun bindAllWidgets(widgets: List<@JvmSuppressWildcards WidgetsListBaseEntry>) {}
|
||||
|
||||
fun bindSmartspaceWidget() {}
|
||||
|
||||
fun bindDeepShortcutMap(deepShortcutMap: HashMap<ComponentKey, Int>) {}
|
||||
|
||||
/** Binds extra item provided any external source */
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.addTableToDb;
|
||||
import static com.android.launcher3.Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET;
|
||||
import static com.android.launcher3.provider.LauncherDbUtils.dropTable;
|
||||
|
||||
import android.content.ContentValues;
|
||||
@@ -37,10 +36,10 @@ import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.launcher3.AutoInstallsLayout;
|
||||
import com.android.launcher3.AutoInstallsLayout.LayoutParserCallback;
|
||||
import com.android.launcher3.BuildConfig;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.logging.FileLog;
|
||||
import com.android.launcher3.pm.UserCache;
|
||||
import com.android.launcher3.provider.LauncherDbUtils;
|
||||
@@ -257,8 +256,7 @@ public class DatabaseHelper extends NoLocaleSQLiteHelper implements
|
||||
Favorites.SCREEN, IntArray.wrap(-777, -778)), null);
|
||||
}
|
||||
case 30: {
|
||||
if (FeatureFlags.QSB_ON_FIRST_SCREEN
|
||||
&& !SHOULD_SHOW_FIRST_PAGE_WIDGET) {
|
||||
if (BuildConfig.QSB_ON_FIRST_SCREEN) {
|
||||
// Clean up first row in screen 0 as it might contain junk data.
|
||||
Log.d(TAG, "Cleaning up first row");
|
||||
db.delete(Favorites.TABLE_NAME,
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import static com.android.launcher3.BuildConfig.QSB_ON_FIRST_SCREEN;
|
||||
import static com.android.launcher3.GridType.GRID_TYPE_NON_ONE_GRID;
|
||||
import static com.android.launcher3.GridType.GRID_TYPE_ONE_GRID;
|
||||
import static com.android.launcher3.InvariantDeviceProfile.TYPE_TABLET;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.TABLE_NAME;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.TMP_TABLE;
|
||||
import static com.android.launcher3.Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ROW_SHIFT_GRID_MIGRATION;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ROW_SHIFT_ONE_GRID_MIGRATION;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_STANDARD_GRID_MIGRATION;
|
||||
@@ -47,7 +47,6 @@ import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.logging.StatsLogManager;
|
||||
import com.android.launcher3.provider.LauncherDbUtils.SQLiteTransaction;
|
||||
import com.android.launcher3.util.GridOccupancy;
|
||||
@@ -398,10 +397,8 @@ public class GridSizeMigrationDBController {
|
||||
@NonNull final List<DbEntry> sortedItemsToPlace, List<Integer> idsInUse) {
|
||||
final GridOccupancy occupied = new GridOccupancy(trgX, trgY);
|
||||
final Point trg = new Point(trgX, trgY);
|
||||
final Point next = new Point(0, screenId == 0
|
||||
&& (FeatureFlags.QSB_ON_FIRST_SCREEN
|
||||
&& !SHOULD_SHOW_FIRST_PAGE_WIDGET)
|
||||
? 1 /* smartspace */ : 0);
|
||||
final Point next = new Point(0,
|
||||
screenId == 0 && QSB_ON_FIRST_SCREEN ? 1 /* smartspace */ : 0);
|
||||
List<DbEntry> existedEntries = destReader.mWorkspaceEntriesByScreenId.get(screenId);
|
||||
if (existedEntries != null) {
|
||||
for (DbEntry entry : existedEntries) {
|
||||
|
||||
@@ -20,14 +20,13 @@ import android.database.sqlite.SQLiteDatabase
|
||||
import android.graphics.Point
|
||||
import android.util.Log
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import com.android.launcher3.BuildConfig
|
||||
import com.android.launcher3.Flags
|
||||
import com.android.launcher3.LauncherPrefs
|
||||
import com.android.launcher3.LauncherPrefs.Companion.get
|
||||
import com.android.launcher3.LauncherSettings
|
||||
import com.android.launcher3.LauncherSettings.Favorites.TABLE_NAME
|
||||
import com.android.launcher3.LauncherSettings.Favorites.TMP_TABLE
|
||||
import com.android.launcher3.Utilities
|
||||
import com.android.launcher3.config.FeatureFlags
|
||||
import com.android.launcher3.logging.FileLog
|
||||
import com.android.launcher3.logging.StatsLogManager
|
||||
import com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ROW_SHIFT_GRID_MIGRATION
|
||||
@@ -502,10 +501,7 @@ class GridSizeMigrationLogic {
|
||||
val occupied = GridOccupancy(trgX, trgY)
|
||||
val trg = Point(trgX, trgY)
|
||||
val next: Point =
|
||||
if (
|
||||
screenId == 0 &&
|
||||
(FeatureFlags.QSB_ON_FIRST_SCREEN && !Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET)
|
||||
) {
|
||||
if (screenId == 0 && BuildConfig.QSB_ON_FIRST_SCREEN) {
|
||||
Point(0, 1 /* smartspace */)
|
||||
} else {
|
||||
Point(0, 0)
|
||||
|
||||
@@ -22,7 +22,6 @@ import static com.android.launcher3.LauncherSettings.Favorites.DESKTOP_ICON_FLAG
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APP_PAIR;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT;
|
||||
import static com.android.launcher3.Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET;
|
||||
import static com.android.launcher3.icons.cache.CacheLookupFlag.DEFAULT_LOOKUP_FLAG;
|
||||
import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_ARCHIVED;
|
||||
|
||||
@@ -43,6 +42,7 @@ import android.util.LongSparseArray;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.launcher3.BuildConfig;
|
||||
import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherModel;
|
||||
@@ -52,7 +52,6 @@ import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.Workspace;
|
||||
import com.android.launcher3.backuprestore.LauncherRestoreEventLogger;
|
||||
import com.android.launcher3.backuprestore.LauncherRestoreEventLogger.RestoreError;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.dagger.ApplicationContext;
|
||||
import com.android.launcher3.icons.IconCache;
|
||||
import com.android.launcher3.logging.FileLog;
|
||||
@@ -635,8 +634,7 @@ public class LoaderCursor extends CursorWrapper {
|
||||
|
||||
if (!mOccupied.containsKey(item.screenId)) {
|
||||
GridOccupancy screen = new GridOccupancy(countX + 1, countY + 1);
|
||||
if (item.screenId == Workspace.FIRST_SCREEN_ID && (FeatureFlags.QSB_ON_FIRST_SCREEN
|
||||
&& !SHOULD_SHOW_FIRST_PAGE_WIDGET)) {
|
||||
if (item.screenId == Workspace.FIRST_SCREEN_ID && BuildConfig.QSB_ON_FIRST_SCREEN) {
|
||||
// Mark the first X columns (X is width of the search container) in the first row as
|
||||
// occupied (if the feature is enabled) in order to account for the search
|
||||
// container.
|
||||
|
||||
@@ -16,11 +16,8 @@
|
||||
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import static com.android.launcher3.BuildConfig.WIDGET_ON_FIRST_SCREEN;
|
||||
import static com.android.launcher3.Flags.enableLauncherBrMetricsFixed;
|
||||
import static com.android.launcher3.Flags.enableSmartspaceAsAWidget;
|
||||
import static com.android.launcher3.LauncherPrefs.IS_FIRST_LOAD_AFTER_RESTORE;
|
||||
import static com.android.launcher3.LauncherPrefs.SHOULD_SHOW_SMARTSPACE;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.DESKTOP_ICON_FLAG;
|
||||
import static com.android.launcher3.icons.CacheableShortcutInfo.convertShortcutsToCacheableShortcuts;
|
||||
import static com.android.launcher3.icons.cache.CacheLookupFlag.DEFAULT_LOOKUP_FLAG;
|
||||
@@ -370,19 +367,6 @@ public class LoaderTask implements Runnable {
|
||||
mLauncherBinder.bindWidgets();
|
||||
logASplit("bindWidgets finished");
|
||||
verifyNotStopped();
|
||||
LauncherPrefs prefs = LauncherPrefs.get(mContext);
|
||||
|
||||
if (enableSmartspaceAsAWidget() && prefs.get(SHOULD_SHOW_SMARTSPACE)) {
|
||||
mLauncherBinder.bindSmartspaceWidget();
|
||||
// Turn off pref.
|
||||
prefs.putSync(SHOULD_SHOW_SMARTSPACE.to(false));
|
||||
logASplit("bindSmartspaceWidget finished");
|
||||
verifyNotStopped();
|
||||
} else if (!enableSmartspaceAsAWidget() && WIDGET_ON_FIRST_SCREEN
|
||||
&& !prefs.get(LauncherPrefs.SHOULD_SHOW_SMARTSPACE)) {
|
||||
// Turn on pref.
|
||||
prefs.putSync(SHOULD_SHOW_SMARTSPACE.to(true));
|
||||
}
|
||||
|
||||
logASplit("saving all widgets in icon cache");
|
||||
updateHandler.updateIcons(allWidgetsList,
|
||||
|
||||
@@ -15,15 +15,14 @@
|
||||
*/
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import static com.android.launcher3.Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET;
|
||||
import static com.android.launcher3.WorkspaceLayoutManager.FIRST_SCREEN_ID;
|
||||
|
||||
import android.util.LongSparseArray;
|
||||
|
||||
import com.android.launcher3.BuildConfig;
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherModel;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.util.GridOccupancy;
|
||||
import com.android.launcher3.util.IntArray;
|
||||
@@ -81,8 +80,7 @@ public class WorkspaceItemSpaceFinder {
|
||||
int screenCount = workspaceScreens.size();
|
||||
// First check the preferred screen.
|
||||
IntSet screensToExclude = new IntSet();
|
||||
if (FeatureFlags.QSB_ON_FIRST_SCREEN
|
||||
&& !SHOULD_SHOW_FIRST_PAGE_WIDGET) {
|
||||
if (BuildConfig.QSB_ON_FIRST_SCREEN) {
|
||||
screensToExclude.add(FIRST_SCREEN_ID);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ import static android.appwidget.AppWidgetManager.ACTION_APPWIDGET_BIND;
|
||||
import static android.appwidget.AppWidgetManager.EXTRA_APPWIDGET_ID;
|
||||
import static android.appwidget.AppWidgetManager.EXTRA_APPWIDGET_PROVIDER;
|
||||
|
||||
import static com.android.launcher3.Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Fragment;
|
||||
import android.app.SearchManager;
|
||||
@@ -44,11 +42,11 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import com.android.launcher3.BuildConfig;
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherPrefs;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.graphics.FragmentWithPreview;
|
||||
import com.android.launcher3.widget.util.WidgetSizes;
|
||||
|
||||
@@ -292,8 +290,7 @@ public class QsbContainerView extends FrameLayout {
|
||||
}
|
||||
|
||||
public boolean isQsbEnabled() {
|
||||
return FeatureFlags.QSB_ON_FIRST_SCREEN
|
||||
&& !SHOULD_SHOW_FIRST_PAGE_WIDGET;
|
||||
return BuildConfig.QSB_ON_FIRST_SCREEN;
|
||||
}
|
||||
|
||||
protected Bundle createBindOptions() {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.launcher3.widget.custom;
|
||||
|
||||
import static com.android.launcher3.Flags.enableSmartspaceAsAWidget;
|
||||
import static com.android.launcher3.model.data.LauncherAppWidgetInfo.CUSTOM_WIDGET_ID;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.widget.LauncherAppWidgetProviderInfo.CLS_CUSTOM_WIDGET_PREFIX;
|
||||
@@ -27,13 +26,11 @@ import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.os.Process;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.dagger.ApplicationContext;
|
||||
import com.android.launcher3.dagger.LauncherAppSingleton;
|
||||
import com.android.launcher3.dagger.LauncherBaseAppComponent;
|
||||
@@ -46,7 +43,6 @@ import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
|
||||
import com.android.systemui.plugins.CustomWidgetPlugin;
|
||||
import com.android.systemui.plugins.PluginListener;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -90,22 +86,6 @@ public class CustomWidgetManager implements PluginListener<CustomWidgetPlugin> {
|
||||
mCustomWidgets = new ArrayList<>();
|
||||
|
||||
pluginManager.addPluginListener(this, CustomWidgetPlugin.class, true);
|
||||
if (enableSmartspaceAsAWidget()) {
|
||||
for (String s: context.getResources()
|
||||
.getStringArray(R.array.custom_widget_providers)) {
|
||||
try {
|
||||
Class<?> cls = Class.forName(s);
|
||||
CustomWidgetPlugin plugin = (CustomWidgetPlugin)
|
||||
cls.getDeclaredConstructor(Context.class).newInstance(context);
|
||||
MAIN_EXECUTOR.execute(() -> onPluginConnected(plugin, context));
|
||||
} catch (ClassNotFoundException | InstantiationException
|
||||
| IllegalAccessException
|
||||
| ClassCastException | NoSuchMethodException
|
||||
| InvocationTargetException e) {
|
||||
Log.e(TAG, "Exception found when trying to add custom widgets: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
tracker.addCloseable(() -> pluginManager.removePluginListener(this));
|
||||
}
|
||||
|
||||
|
||||
@@ -26,11 +26,6 @@ public final class BuildConfig {
|
||||
*/
|
||||
public static final boolean QSB_ON_FIRST_SCREEN = true;
|
||||
|
||||
/**
|
||||
* Flag to state if the widget on the top of the first screen should be shown.
|
||||
*/
|
||||
public static final boolean WIDGET_ON_FIRST_SCREEN = false;
|
||||
|
||||
/**
|
||||
* Flag to control various developer centric features
|
||||
*/
|
||||
|
||||
+3
-9
@@ -57,13 +57,7 @@ filegroup {
|
||||
name: "launcher-oop-tests-src",
|
||||
srcs: [
|
||||
":launcher-testing-helpers",
|
||||
"src/com/android/launcher3/allapps/TaplOpenCloseAllAppsTest.java",
|
||||
"src/com/android/launcher3/allapps/TaplAllAppsIconsWorkingTest.java",
|
||||
"src/com/android/launcher3/appiconmenu/TaplAppIconMenuTest.java",
|
||||
"src/com/android/launcher3/dragging/TaplDragTest.java",
|
||||
"src/com/android/launcher3/dragging/TaplUninstallRemoveTest.java",
|
||||
"src/com/android/launcher3/ui/TaplTestsLauncher3Test.java",
|
||||
"src/com/android/launcher3/ui/workspace/TaplWorkspaceTest.java",
|
||||
":launcher-oop-tests-only",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -158,8 +152,8 @@ filegroup {
|
||||
"src/**/*.kt",
|
||||
"multivalentTests/src/**/*.java",
|
||||
"multivalentTests/src/**/*.kt",
|
||||
"src/com/android/launcher3/ui/AbstractLauncherUiTest.java",
|
||||
"src/com/android/launcher3/ui/BaseLauncherTaplTest.java",
|
||||
"src/com/android/launcher3/util/ui/AbstractLauncherUiTest.java",
|
||||
"src/com/android/launcher3/util/ui/BaseLauncherTaplTest.java",
|
||||
"tapl/com/android/launcher3/tapl/*.java",
|
||||
"tapl/com/android/launcher3/tapl/*.kt",
|
||||
],
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
filegroup {
|
||||
name: "launcher-shared-tests-utils",
|
||||
srcs: [
|
||||
"testcomponent/AppWidgetDynamicColors.java",
|
||||
"testcomponent/AppWidgetHidden.java",
|
||||
"testcomponent/AppWidgetNoConfig.java",
|
||||
"testcomponent/AppWidgetWithConfig.java",
|
||||
"testcomponent/TouchEventGenerator.java",
|
||||
"util/ModelTestExtensions.kt",
|
||||
"util/rule/TestStabilityRule.java",
|
||||
"util/TestUtil.java",
|
||||
"util/ui/TestViewHelpers.java",
|
||||
"util/workspace/FavoriteItemsTransaction.java",
|
||||
],
|
||||
}
|
||||
+2
-2
@@ -25,13 +25,13 @@ import androidx.test.core.app.ApplicationProvider
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import com.android.launcher3.InvariantDeviceProfile
|
||||
import com.android.launcher3.LauncherSettings
|
||||
import com.android.launcher3.celllayout.FavoriteItemsTransaction
|
||||
import com.android.launcher3.model.data.AppInfo
|
||||
import com.android.launcher3.model.data.FolderInfo
|
||||
import com.android.launcher3.model.data.ItemInfo
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo
|
||||
import com.android.launcher3.ui.TestViewHelpers
|
||||
import com.android.launcher3.util.WidgetUtils
|
||||
import com.android.launcher3.util.ui.TestViewHelpers
|
||||
import com.android.launcher3.util.workspace.FavoriteItemsTransaction
|
||||
import java.util.function.Supplier
|
||||
|
||||
class TestWorkspaceBuilder(private val mContext: Context) {
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package com.android.launcher3.ui;
|
||||
package com.android.launcher3.util.ui;
|
||||
|
||||
import static android.os.Process.myUserHandle;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.launcher3.celllayout;
|
||||
package com.android.launcher3.util.workspace;
|
||||
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
|
||||
@@ -0,0 +1,59 @@
|
||||
// Should only contain test files, no utility classes
|
||||
filegroup {
|
||||
name: "launcher-e2e-tests-only",
|
||||
srcs: [
|
||||
"allapps/TaplAllAppsIconsWorkingTest.java",
|
||||
"allapps/TaplOpenCloseAllAppsTest.java",
|
||||
"appiconmenu/TaplAppIconMenuTest.java",
|
||||
"dragging/TaplDragTest.java",
|
||||
"dragging/TaplUninstallRemoveTest.java",
|
||||
"tapl/TaplUtilityTest.java",
|
||||
"widget/TaplAddWidgetTest.java",
|
||||
"ui/TaplTestsLauncher3Test.java",
|
||||
"workspace/TaplTwoPanelWorkspaceTest.java",
|
||||
"workspace/TaplWorkspaceTest.java",
|
||||
],
|
||||
}
|
||||
|
||||
filegroup {
|
||||
name: "launcher-e2e-tests-utils",
|
||||
srcs: [
|
||||
"testcomponent/TestCommandReceiver.java",
|
||||
"util/TestConstants.java",
|
||||
"util/Wait.kt",
|
||||
"util/rule/FailureWatcher.java",
|
||||
"util/rule/MutualExclusionRule.java",
|
||||
"util/rule/SamplerRule.java",
|
||||
"util/rule/ScreenRecordRule.java",
|
||||
"util/rule/ShellCommandRule.java",
|
||||
"util/rule/ViewCaptureRule.kt",
|
||||
"util/rule/TestIsolationRule.java",
|
||||
"util/ui/AbstractLauncherUiTest.java",
|
||||
"util/ui/BaseLauncherTaplTest.java",
|
||||
"util/ui/PortraitLandscapeRunner.java",
|
||||
],
|
||||
}
|
||||
|
||||
// Combination of tests and utils in the launcher3 package
|
||||
filegroup {
|
||||
name: "launcher-e2e-tests",
|
||||
srcs: [
|
||||
":launcher-e2e-tests-only",
|
||||
":launcher-e2e-tests-utils",
|
||||
":launcher-viewcapture-analysis",
|
||||
],
|
||||
}
|
||||
|
||||
// TODO(b/324261526) After the bug is completed this file group should not exists anymore
|
||||
filegroup {
|
||||
name: "launcher-oop-tests-only",
|
||||
srcs: [
|
||||
"allapps/TaplAllAppsIconsWorkingTest.java",
|
||||
"allapps/TaplOpenCloseAllAppsTest.java",
|
||||
"appiconmenu/TaplAppIconMenuTest.java",
|
||||
"dragging/TaplDragTest.java",
|
||||
"dragging/TaplUninstallRemoveTest.java",
|
||||
"ui/TaplTestsLauncher3Test.java",
|
||||
"workspace/TaplWorkspaceTest.java",
|
||||
],
|
||||
}
|
||||
@@ -24,8 +24,8 @@ import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.tapl.AppIcon;
|
||||
import com.android.launcher3.tapl.HomeAllApps;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.tapl.AllApps;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
+1
-6
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.launcher3.ui;
|
||||
package com.android.launcher3.allapps;
|
||||
|
||||
import static com.android.launcher3.LauncherPrefs.WORK_EDU_STEP;
|
||||
import static com.android.launcher3.LauncherState.ALL_APPS;
|
||||
@@ -37,11 +37,6 @@ import androidx.test.filters.LargeTest;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherPrefs;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.allapps.ActivityAllAppsContainerView;
|
||||
import com.android.launcher3.allapps.AllAppsPagedView;
|
||||
import com.android.launcher3.allapps.WorkEduCard;
|
||||
import com.android.launcher3.allapps.WorkPausedCard;
|
||||
import com.android.launcher3.allapps.WorkProfileManager;
|
||||
import com.android.launcher3.util.BaseLauncherActivityTest;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule;
|
||||
@@ -29,8 +29,8 @@ import com.android.launcher3.tapl.AllApps;
|
||||
import com.android.launcher3.tapl.AppIconMenu;
|
||||
import com.android.launcher3.tapl.AppIconMenuItem;
|
||||
import com.android.launcher3.tapl.HomeAllApps;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@ import com.android.launcher3.tapl.HomeAllApps;
|
||||
import com.android.launcher3.tapl.HomeAppIcon;
|
||||
import com.android.launcher3.tapl.HomeAppIconMenuItem;
|
||||
import com.android.launcher3.tapl.Workspace;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.tapl.HomeAllApps;
|
||||
import com.android.launcher3.tapl.HomeAppIcon;
|
||||
import com.android.launcher3.tapl.Workspace;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.Wait;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,6 @@ import com.android.launcher3.celllayout.CellLayoutTestCaseReader
|
||||
import com.android.launcher3.celllayout.CellLayoutTestCaseReader.Board
|
||||
import com.android.launcher3.celllayout.CellLayoutTestCaseReader.TestSection
|
||||
import com.android.launcher3.celllayout.CellLayoutTestUtils
|
||||
import com.android.launcher3.celllayout.FavoriteItemsTransaction
|
||||
import com.android.launcher3.celllayout.ReorderTestCase
|
||||
import com.android.launcher3.celllayout.board.CellLayoutBoard
|
||||
import com.android.launcher3.celllayout.board.TestWorkspaceBuilder
|
||||
@@ -53,6 +52,7 @@ import com.android.launcher3.util.ModelTestExtensions.clearModelDb
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord
|
||||
import com.android.launcher3.util.rule.ShellCommandRule
|
||||
import com.android.launcher3.util.workspace.FavoriteItemsTransaction
|
||||
import com.android.launcher3.widget.LauncherAppWidgetHostView
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
+4
-4
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.launcher3.ui
|
||||
package com.android.launcher3.model
|
||||
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.Drawable
|
||||
@@ -58,7 +58,7 @@ class DoubleShadowIconDrawableTest {
|
||||
keyShadowBlur = 3f,
|
||||
keyShadowOffsetX = 4f,
|
||||
keyShadowOffsetY = 5f,
|
||||
keyShadowColor = 6
|
||||
keyShadowColor = 6,
|
||||
)
|
||||
val originalDrawable: Drawable = mock()
|
||||
val iconSize = 2
|
||||
@@ -73,14 +73,14 @@ class DoubleShadowIconDrawableTest {
|
||||
shadowInfo.ambientShadowBlur,
|
||||
0f,
|
||||
0f,
|
||||
Color.alpha(shadowInfo.ambientShadowColor).toFloat()
|
||||
Color.alpha(shadowInfo.ambientShadowColor).toFloat(),
|
||||
)
|
||||
verify(shadowDrawableUnderTest)
|
||||
.createShadowRenderEffect(
|
||||
shadowInfo.keyShadowBlur,
|
||||
shadowInfo.keyShadowOffsetX,
|
||||
shadowInfo.keyShadowOffsetY,
|
||||
Color.alpha(shadowInfo.keyShadowColor).toFloat()
|
||||
Color.alpha(shadowInfo.keyShadowColor).toFloat(),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,6 @@ import com.android.launcher3.model.data.IconRequestInfo
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo
|
||||
import com.android.launcher3.pm.UserCache
|
||||
import com.android.launcher3.provider.RestoreDbTask
|
||||
import com.android.launcher3.ui.TestViewHelpers
|
||||
import com.android.launcher3.util.AllModulesForTest
|
||||
import com.android.launcher3.util.Executors.MODEL_EXECUTOR
|
||||
import com.android.launcher3.util.LooperIdleLock
|
||||
@@ -47,6 +46,7 @@ import com.android.launcher3.util.ModelTestExtensions
|
||||
import com.android.launcher3.util.SandboxApplication
|
||||
import com.android.launcher3.util.TestUtil
|
||||
import com.android.launcher3.util.UserIconInfo
|
||||
import com.android.launcher3.util.ui.TestViewHelpers
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import dagger.BindsInstance
|
||||
import dagger.Component
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.launcher3.ui
|
||||
package com.android.launcher3.model
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.TypedArray
|
||||
@@ -47,7 +47,7 @@ class ShadowInfoTest {
|
||||
keyShadowBlur = 3f,
|
||||
keyShadowOffsetX = 4f,
|
||||
keyShadowOffsetY = 5f,
|
||||
keyShadowColor = 6
|
||||
keyShadowColor = 6,
|
||||
)
|
||||
doReturn(styledAttrs)
|
||||
.whenever(mockContext)
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
* 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.
|
||||
@@ -24,10 +24,12 @@ import androidx.test.filters.LargeTest;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
// TODO(415813575) - Remove this test.
|
||||
@LargeTest
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class TaplTestsLauncher3Test extends AbstractLauncherUiTest<Launcher, View> {
|
||||
|
||||
@@ -42,10 +42,10 @@ import com.android.launcher3.model.data.LauncherAppWidgetInfo
|
||||
import com.android.launcher3.model.data.LauncherAppWidgetInfo.FLAG_ID_NOT_VALID
|
||||
import com.android.launcher3.model.data.LauncherAppWidgetInfo.FLAG_UI_NOT_READY
|
||||
import com.android.launcher3.model.data.LauncherAppWidgetInfo.RESTORE_COMPLETED
|
||||
import com.android.launcher3.ui.TestViewHelpers
|
||||
import com.android.launcher3.util.Executors.MAIN_EXECUTOR
|
||||
import com.android.launcher3.util.Executors.VIEW_PREINFLATION_EXECUTOR
|
||||
import com.android.launcher3.util.rule.ShellCommandRule
|
||||
import com.android.launcher3.util.ui.TestViewHelpers
|
||||
import com.android.launcher3.widget.LauncherAppWidgetHostView
|
||||
import com.android.launcher3.widget.LauncherWidgetHolder
|
||||
import com.android.launcher3.widget.PendingAppWidgetHostView
|
||||
|
||||
@@ -12,7 +12,7 @@ import androidx.test.uiautomator.UiDevice;
|
||||
|
||||
import com.android.app.viewcapture.data.ExportedData;
|
||||
import com.android.launcher3.tapl.LauncherInstrumentation;
|
||||
import com.android.launcher3.ui.BaseLauncherTaplTest;
|
||||
import com.android.launcher3.util.ui.BaseLauncherTaplTest;
|
||||
|
||||
import org.junit.rules.TestWatcher;
|
||||
import org.junit.runner.Description;
|
||||
|
||||
@@ -20,7 +20,7 @@ import androidx.test.InstrumentationRegistry;
|
||||
import androidx.test.uiautomator.UiDevice;
|
||||
|
||||
import com.android.launcher3.tapl.LauncherInstrumentation;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
|
||||
import org.junit.rules.TestRule;
|
||||
import org.junit.runner.Description;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package com.android.launcher3.ui;
|
||||
package com.android.launcher3.util.ui;
|
||||
|
||||
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.launcher3.ui;
|
||||
package com.android.launcher3.util.ui;
|
||||
|
||||
import static android.os.Process.myUserHandle;
|
||||
import static android.platform.test.flag.junit.SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT;
|
||||
@@ -51,7 +51,6 @@ import androidx.test.uiautomator.BySelector;
|
||||
import androidx.test.uiautomator.UiDevice;
|
||||
import androidx.test.uiautomator.Until;
|
||||
|
||||
import com.android.launcher3.celllayout.FavoriteItemsTransaction;
|
||||
import com.android.launcher3.tapl.HomeAllApps;
|
||||
import com.android.launcher3.tapl.HomeAppIcon;
|
||||
import com.android.launcher3.tapl.LauncherInstrumentation;
|
||||
@@ -65,6 +64,7 @@ import com.android.launcher3.util.rule.ScreenRecordRule;
|
||||
import com.android.launcher3.util.rule.ShellCommandRule;
|
||||
import com.android.launcher3.util.rule.TestIsolationRule;
|
||||
import com.android.launcher3.util.rule.TestStabilityRule;
|
||||
import com.android.launcher3.util.workspace.FavoriteItemsTransaction;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
+17
-1
@@ -1,4 +1,20 @@
|
||||
package com.android.launcher3.ui;
|
||||
/*
|
||||
* 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.util.ui;
|
||||
|
||||
import static com.android.launcher3.LauncherPrefs.FIXED_LANDSCAPE_MODE;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
filegroup {
|
||||
name: "launcher-viewcapture-analysis",
|
||||
srcs: [
|
||||
"FlashDetector.java",
|
||||
"AlphaJumpDetector.java",
|
||||
"AnomalyDetector.java",
|
||||
"PositionJumpDetector.java",
|
||||
"ViewCaptureAnalyzer.java",
|
||||
],
|
||||
}
|
||||
+4
-7
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.launcher3.ui.widget;
|
||||
package com.android.launcher3.widget;
|
||||
|
||||
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
|
||||
|
||||
@@ -34,21 +34,18 @@ import androidx.test.filters.LargeTest;
|
||||
|
||||
import com.android.launcher3.AbstractFloatingView;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.celllayout.FavoriteItemsTransaction;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
|
||||
import com.android.launcher3.testcomponent.WidgetConfigActivity;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.ui.TestViewHelpers;
|
||||
import com.android.launcher3.util.BaseLauncherActivityTest;
|
||||
import com.android.launcher3.util.BlockingBroadcastReceiver;
|
||||
import com.android.launcher3.util.PackageUserKey;
|
||||
import com.android.launcher3.util.Wait;
|
||||
import com.android.launcher3.util.rule.ShellCommandRule;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.ui.TestViewHelpers;
|
||||
import com.android.launcher3.util.workspace.FavoriteItemsTransaction;
|
||||
import com.android.launcher3.views.OptionsPopupView;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
|
||||
import com.android.launcher3.widget.PendingAddWidgetInfo;
|
||||
import com.android.launcher3.widget.WidgetCell;
|
||||
import com.android.launcher3.widget.picker.WidgetsFullSheet;
|
||||
import com.android.launcher3.widget.picker.WidgetsListAdapter;
|
||||
import com.android.launcher3.widget.picker.WidgetsRecyclerView;
|
||||
+3
-7
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.launcher3.ui.widget;
|
||||
package com.android.launcher3.widget;
|
||||
|
||||
import static com.android.launcher3.WorkspaceLayoutManager.FIRST_SCREEN_ID;
|
||||
import static com.android.launcher3.model.data.LauncherAppWidgetInfo.FLAG_ID_NOT_VALID;
|
||||
@@ -46,16 +46,12 @@ import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherModel;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.celllayout.FavoriteItemsTransaction;
|
||||
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
|
||||
import com.android.launcher3.pm.InstallSessionHelper;
|
||||
import com.android.launcher3.ui.TestViewHelpers;
|
||||
import com.android.launcher3.util.BaseLauncherActivityTest;
|
||||
import com.android.launcher3.util.rule.ShellCommandRule;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetHostView;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
|
||||
import com.android.launcher3.widget.PendingAppWidgetHostView;
|
||||
import com.android.launcher3.widget.WidgetManagerHelper;
|
||||
import com.android.launcher3.util.ui.TestViewHelpers;
|
||||
import com.android.launcher3.util.workspace.FavoriteItemsTransaction;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.launcher3.ui.widget;
|
||||
package com.android.launcher3.widget;
|
||||
|
||||
import static android.app.PendingIntent.FLAG_MUTABLE;
|
||||
import static android.app.PendingIntent.FLAG_ONE_SHOT;
|
||||
@@ -39,7 +39,6 @@ import androidx.test.uiautomator.BySelector;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.celllayout.FavoriteItemsTransaction;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||
@@ -53,6 +52,7 @@ import com.android.launcher3.util.LauncherBindableItemsContainer.ItemOperator;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule;
|
||||
import com.android.launcher3.util.rule.ShellCommandRule;
|
||||
import com.android.launcher3.util.workspace.FavoriteItemsTransaction;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
+5
-6
@@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package com.android.launcher3.ui.widget;
|
||||
package com.android.launcher3.widget;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
@@ -24,15 +24,14 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import androidx.test.filters.LargeTest;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.celllayout.FavoriteItemsTransaction;
|
||||
import com.android.launcher3.tapl.Widget;
|
||||
import com.android.launcher3.tapl.WidgetResizeFrame;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.ui.TestViewHelpers;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.rule.ShellCommandRule;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.ui.TestViewHelpers;
|
||||
import com.android.launcher3.util.workspace.FavoriteItemsTransaction;
|
||||
|
||||
import org.junit.Assume;
|
||||
import org.junit.Rule;
|
||||
+2
-4
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.launcher3.ui.widget;
|
||||
package com.android.launcher3.widget.picker;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
@@ -24,13 +24,11 @@ import androidx.test.filters.MediumTest;
|
||||
|
||||
import com.android.launcher3.AbstractFloatingView;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.BaseLauncherActivityTest;
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule;
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.views.OptionsPopupView;
|
||||
import com.android.launcher3.widget.picker.WidgetsFullSheet;
|
||||
import com.android.launcher3.widget.picker.WidgetsRecyclerView;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
+4
-4
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.launcher3.ui.workspace;
|
||||
package com.android.launcher3.workspace;
|
||||
|
||||
import static com.android.launcher3.util.TestConstants.AppNames.CHROME_APP_NAME;
|
||||
import static com.android.launcher3.util.TestConstants.AppNames.MAPS_APP_NAME;
|
||||
@@ -35,10 +35,10 @@ import com.android.launcher3.CellLayout;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.tapl.Workspace;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.LauncherLayoutBuilder;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -372,4 +372,4 @@ public class TaplTwoPanelWorkspaceTest extends AbstractLauncherUiTest<Launcher,
|
||||
+ itemTitleSet.stream().collect(Collectors.joining(",")),
|
||||
itemTitleSet.isEmpty());
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.launcher3.ui.workspace;
|
||||
package com.android.launcher3.workspace;
|
||||
|
||||
import static com.android.launcher3.util.TestConstants.AppNames.CHROME_APP_NAME;
|
||||
|
||||
@@ -28,10 +28,10 @@ import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.tapl.HomeAppIcon;
|
||||
import com.android.launcher3.tapl.Workspace;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.LauncherLayoutBuilder;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
|
||||
import com.android.launcher3.util.ui.AbstractLauncherUiTest;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.launcher3.ui.workspace;
|
||||
package com.android.launcher3.workspace;
|
||||
|
||||
import static com.android.launcher3.AbstractFloatingView.TYPE_ACTION_POPUP;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
@@ -35,13 +35,13 @@ import com.android.launcher3.BubbleTextView;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.allapps.AllAppsRecyclerView;
|
||||
import com.android.launcher3.celllayout.FavoriteItemsTransaction;
|
||||
import com.android.launcher3.dagger.LauncherComponentProvider;
|
||||
import com.android.launcher3.icons.mono.ThemedIconDrawable;
|
||||
import com.android.launcher3.popup.ArrowPopup;
|
||||
import com.android.launcher3.util.BaseLauncherActivityTest;
|
||||
import com.android.launcher3.util.Executors;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.workspace.FavoriteItemsTransaction;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
Reference in new issue
Block a user