Merge changes I6cf84ec7,Iea599651,If3238286 into sc-v2-dev
* changes:
Improve quick switch from home to taskbar
Cleanup some taskbar/hotseat handoff issues
Fix taskbar stash misalignment when going from app to overview
diff --git a/protos/launcher_atom.proto b/protos/launcher_atom.proto
index d1bf152..c559988 100644
--- a/protos/launcher_atom.proto
+++ b/protos/launcher_atom.proto
@@ -60,6 +60,7 @@
PredictedHotseatContainer predicted_hotseat_container = 10;
TaskSwitcherContainer task_switcher_container = 11;
TaskBarContainer task_bar_container = 12;
+ WallpapersContainer wallpapers_container = 13;
ExtendedContainers extended_containers = 20;
}
}
@@ -247,6 +248,12 @@
}
}
+// Represents wallpapers container for quick switching.
+message WallpapersContainer {
+ // Number of wallpapers in the container.
+ optional int32 cardinality = 1;
+}
+
// Represents state of EditText field before update.
enum FromState {
// Default value.
diff --git a/quickstep/res/values-sw720dp/dimens.xml b/quickstep/res/values-sw720dp/dimens.xml
new file mode 100644
index 0000000..2831a6f
--- /dev/null
+++ b/quickstep/res/values-sw720dp/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+-->
+<resources>
+ <dimen name="overview_grid_row_spacing">44dp</dimen>
+ <dimen name="overview_page_spacing_grid_portrait">44dp</dimen>
+ <dimen name="overview_page_spacing_grid_landscape">44dp</dimen>
+</resources>
diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml
index c37b335..3b2d44b 100644
--- a/quickstep/res/values/dimens.xml
+++ b/quickstep/res/values/dimens.xml
@@ -36,6 +36,7 @@
<dimen name="overview_task_margin">16dp</dimen>
<dimen name="overview_task_margin_focused">12dp</dimen>
<dimen name="overview_task_margin_grid">4dp</dimen>
+ <item name="overview_max_scale" format="float" type="dimen">0.7</item>
<!-- Overrideable in overlay that provides the Overview Actions. -->
<dimen name="overview_actions_height">48dp</dimen>
@@ -51,9 +52,10 @@
<dimen name="overview_grid_side_margin_portrait">60dp</dimen>
<dimen name="overview_grid_side_margin_landscape">52dp</dimen>
- <dimen name="overview_grid_row_spacing_portrait">17.13dp</dimen>
- <dimen name="overview_grid_row_spacing_landscape">13.38dp</dimen>
- <dimen name="overview_grid_focus_vertical_margin">0dp</dimen>
+ <dimen name="overview_grid_row_spacing">36dp</dimen>
+ <dimen name="overview_page_spacing">16dp</dimen>
+ <dimen name="overview_page_spacing_grid_portrait">36dp</dimen>
+ <dimen name="overview_page_spacing_grid_landscape">38dp</dimen>
<!-- These speeds are in dp/s -->
<dimen name="max_task_dismiss_drag_velocity">2.25dp</dimen>
@@ -61,8 +63,6 @@
<dimen name="default_task_dismiss_drag_velocity_grid">1dp</dimen>
<dimen name="default_task_dismiss_drag_velocity_grid_focus_task">5dp</dimen>
- <dimen name="recents_page_spacing">16dp</dimen>
- <dimen name="recents_page_spacing_grid">36dp</dimen>
<dimen name="recents_clear_all_deadzone_vertical_margin">70dp</dimen>
<!-- The speed in dp/s at which the user needs to be scrolling in recents such that we start
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
index 4984b95..b733007 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
@@ -74,8 +74,7 @@
return super.getVisibleElements(launcher)
& ~OVERVIEW_ACTIONS
& ~CLEAR_ALL_BUTTON
- & ~VERTICAL_SWIPE_INDICATOR
- | TASKBAR;
+ & ~VERTICAL_SWIPE_INDICATOR;
}
@Override
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java
index ffbb61b..969abc2 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java
@@ -58,7 +58,7 @@
@Override
public int getVisibleElements(Launcher launcher) {
- return TASKBAR;
+ return NONE;
}
@Override
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/SplitScreenSelectState.java b/quickstep/src/com/android/launcher3/uioverrides/states/SplitScreenSelectState.java
index 4f5f27a..e79d56b 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/SplitScreenSelectState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/SplitScreenSelectState.java
@@ -17,8 +17,6 @@
package com.android.launcher3.uioverrides.states;
import com.android.launcher3.Launcher;
-import com.android.launcher3.R;
-import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.quickstep.views.RecentsView;
/**
@@ -38,12 +36,6 @@
@Override
public float getSplitSelectTranslation(Launcher launcher) {
RecentsView recentsView = launcher.getOverviewPanel();
- int splitPosition = recentsView.getSplitPlaceholder().getActiveSplitStagePosition();
- if (!recentsView.shouldShiftThumbnailsForSplitSelect()) {
- return 0f;
- }
- PagedOrientationHandler orientationHandler = recentsView.getPagedOrientationHandler();
- int direction = orientationHandler.getSplitTranslationDirectionFactor(splitPosition);
- return launcher.getResources().getDimension(R.dimen.split_placeholder_size) * direction;
+ return recentsView.getSplitSelectTranslation();
}
}
diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
index a566765..1d4ed4c 100644
--- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
@@ -221,6 +221,7 @@
PointF taskDimension = getTaskDimension(context, dp);
float scale = gridRect.height() / taskDimension.y;
+ scale = Math.min(scale, res.getFloat(R.dimen.overview_max_scale));
int outWidth = Math.round(scale * taskDimension.x);
int outHeight = Math.round(scale * taskDimension.y);
diff --git a/quickstep/src/com/android/quickstep/views/FloatingTaskView.java b/quickstep/src/com/android/quickstep/views/FloatingTaskView.java
index a343e0a..0cea45e 100644
--- a/quickstep/src/com/android/quickstep/views/FloatingTaskView.java
+++ b/quickstep/src/com/android/quickstep/views/FloatingTaskView.java
@@ -129,7 +129,7 @@
public void update(RectF position, float progress, float windowRadius) {
MarginLayoutParams lp = (MarginLayoutParams) getLayoutParams();
- float dX = position.left - lp.getMarginStart();
+ float dX = position.left - mStartingPosition.left;
float dY = position.top - lp.topMargin;
setTranslationX(dX);
@@ -150,15 +150,25 @@
mOrientationHandler.setSecondaryScale(mSplitPlaceholderView.getIconView(), childScaleY);
}
+ public void updateOrientationHandler(PagedOrientationHandler orientationHandler) {
+ mOrientationHandler = orientationHandler;
+ mSplitPlaceholderView.getIconView().setRotation(mOrientationHandler.getDegreesRotated());
+ }
+
protected void initPosition(RectF pos, InsettableFrameLayout.LayoutParams lp) {
mStartingPosition.set(pos);
lp.ignoreInsets = true;
// Position the floating view exactly on top of the original
lp.topMargin = Math.round(pos.top);
- lp.setMarginStart(Math.round(pos.left));
+ if (mIsRtl) {
+ lp.setMarginStart(mLauncher.getDeviceProfile().widthPx - Math.round(pos.right));
+ } else {
+ lp.setMarginStart(Math.round(pos.left));
+ }
+
// Set the properties here already to make sure they are available when running the first
// animation frame.
- int left = lp.leftMargin;
+ int left = (int) pos.left;
layout(left, lp.topMargin, left + lp.width, lp.topMargin + lp.height);
}
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
index 3e06f55..6b7d8a5 100644
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -24,7 +24,6 @@
import android.annotation.TargetApi;
import android.content.Context;
-import android.content.res.Configuration;
import android.os.Build;
import android.util.AttributeSet;
import android.view.MotionEvent;
@@ -171,10 +170,13 @@
}
@Override
- protected void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
+ protected void onOrientationChanged() {
+ super.onOrientationChanged();
// If overview is in modal state when rotate, reset it to overview state without running
// animation.
setModalStateEnabled(false);
+ if (mActivity.isInState(OVERVIEW_SPLIT_SELECT)) {
+ onRotateInSplitSelectionState();
+ }
}
}
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index ea3c796..ed238d8 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -91,6 +91,7 @@
import android.util.AttributeSet;
import android.util.FloatProperty;
import android.util.Log;
+import android.util.Pair;
import android.util.SparseBooleanArray;
import android.view.HapticFeedbackConstants;
import android.view.KeyEvent;
@@ -1620,7 +1621,7 @@
|| !mOrientationHandler.equals(oldOrientationHandler)) {
// Changed orientations, update controllers so they intercept accordingly.
mActivity.getDragLayer().recreateControllers();
- setModalStateEnabled(false);
+ onOrientationChanged();
}
boolean isInLandscape = mOrientationState.getTouchRotation() != ROTATION_0
@@ -1639,6 +1640,9 @@
setCurrentPage(mCurrentPage);
}
+ protected void onOrientationChanged() {
+ }
+
// Update task size and padding that are dependent on DeviceProfile and insets.
private void updateSizeAndPadding() {
DeviceProfile dp = mActivity.getDeviceProfile();
@@ -3333,7 +3337,7 @@
* {@link #mFirstFloatingTaskView}.
*/
public boolean shouldShiftThumbnailsForSplitSelect() {
- return !mActivity.getDeviceProfile().isTablet;
+ return !mActivity.getDeviceProfile().isTablet || !mActivity.getDeviceProfile().isLandscape;
}
protected void onDismissAnimationEnds() {
@@ -3519,6 +3523,7 @@
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
updateRecentsRotation();
+ onOrientationChanged();
}
/**
@@ -3833,13 +3838,18 @@
* Apply scroll offset to children of RecentsView when entering split select.
*/
public void applySplitPrimaryScrollOffset() {
+ float taskSplitScrollOffsetPrimary = 0f;
+ float clearAllSplitScrollOffsetPrimar = 0f;
if (isSplitPlaceholderFirstInGrid()) {
- for (int i = 0; i < getTaskViewCount(); i++) {
- requireTaskViewAt(i).setSplitScrollOffsetPrimary(mSplitPlaceholderSize);
- }
+ taskSplitScrollOffsetPrimary = mSplitPlaceholderSize;
} else if (isSplitPlaceholderLastInGrid()) {
- mClearAllButton.setSplitSelectScrollOffsetPrimary(-mSplitPlaceholderSize);
+ clearAllSplitScrollOffsetPrimar = -mSplitPlaceholderSize;
}
+
+ for (int i = 0; i < getTaskViewCount(); i++) {
+ requireTaskViewAt(i).setSplitScrollOffsetPrimary(taskSplitScrollOffsetPrimary);
+ }
+ mClearAllButton.setSplitSelectScrollOffsetPrimary(clearAllSplitScrollOffsetPrimar);
}
/**
@@ -3990,6 +4000,41 @@
}
}
+ /**
+ * Returns how much additional translation there should be for each of the child TaskViews.
+ * Note that the translation can be its primary or secondary dimension.
+ */
+ public float getSplitSelectTranslation() {
+ int splitPosition = getSplitPlaceholder().getActiveSplitStagePosition();
+ if (!shouldShiftThumbnailsForSplitSelect()) {
+ return 0f;
+ }
+ PagedOrientationHandler orientationHandler = getPagedOrientationHandler();
+ int direction = orientationHandler.getSplitTranslationDirectionFactor(
+ splitPosition, mActivity.getDeviceProfile());
+ return mActivity.getResources().getDimension(R.dimen.split_placeholder_size) * direction;
+ }
+
+ protected void onRotateInSplitSelectionState() {
+ mOrientationHandler.getInitialSplitPlaceholderBounds(mSplitPlaceholderSize,
+ mActivity.getDeviceProfile(),
+ mSplitSelectStateController.getActiveSplitStagePosition(), mTempRect);
+ mTempRectF.set(mTempRect);
+ // TODO(194414938) set correct corner radius
+ mFirstFloatingTaskView.updateOrientationHandler(mOrientationHandler);
+ mFirstFloatingTaskView.update(mTempRectF, /*progress=*/1f, /*windowRadius=*/0f);
+
+ PagedOrientationHandler orientationHandler = getPagedOrientationHandler();
+ Pair<FloatProperty, FloatProperty> taskViewsFloat =
+ orientationHandler.getSplitSelectTaskOffset(
+ TASK_PRIMARY_SPLIT_TRANSLATION, TASK_SECONDARY_SPLIT_TRANSLATION,
+ mActivity.getDeviceProfile());
+ taskViewsFloat.first.set(this, getSplitSelectTranslation());
+ taskViewsFloat.second.set(this, 0f);
+
+ applySplitPrimaryScrollOffset();
+ }
+
private void updateDeadZoneRects() {
// Get the deadzone rect surrounding the clear all button to not dismiss overview to home
mClearAllButtonDeadZoneRect.setEmpty();
diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
index 93be6fb..7c503be 100644
--- a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
+++ b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
@@ -324,14 +324,14 @@
if (!mLauncher.isTablet()) {
return;
}
- for (int i = 2; i <= 12; i++) {
+ for (int i = 2; i <= 14; i++) {
startTestActivity(i);
}
Overview overview = mLauncher.pressHome().switchToOverview();
executeOnLauncher(
- launcher -> assertTrue("Don't have at least 11 tasks",
- getTaskCount(launcher) >= 11));
+ launcher -> assertTrue("Don't have at least 13 tasks",
+ getTaskCount(launcher) >= 13));
// Test scroll the first task off screen
overview.scrollCurrentTaskOffScreen();
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index f3c2143..6d223e7 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -342,10 +342,10 @@
<dimen name="overview_actions_margin_three_button">0dp</dimen>
<dimen name="overview_grid_side_margin_portrait">0dp</dimen>
<dimen name="overview_grid_side_margin_landscape">0dp</dimen>
- <dimen name="overview_grid_row_spacing_portrait">0dp</dimen>
- <dimen name="overview_grid_row_spacing_landscape">0dp</dimen>
- <dimen name="recents_page_spacing">0dp</dimen>
- <dimen name="recents_page_spacing_grid">0dp</dimen>
+ <dimen name="overview_grid_row_spacing">0dp</dimen>
+ <dimen name="overview_page_spacing">0dp</dimen>
+ <dimen name="overview_page_spacing_grid_portrait">0dp</dimen>
+ <dimen name="overview_page_spacing_grid_landscape">0dp</dimen>
<dimen name="split_placeholder_size">110dp</dimen>
<dimen name="task_menu_width_grid">200dp</dimen>
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 85d8247..6a399ac 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -372,11 +372,15 @@
R.dimen.overview_actions_top_margin_gesture_grid_landscape);
overviewActionsBottomMarginGesturePx = res.getDimensionPixelSize(
R.dimen.overview_actions_bottom_margin_gesture_grid_landscape);
+ overviewPageSpacing = res.getDimensionPixelSize(
+ R.dimen.overview_page_spacing_grid_landscape);
} else {
overviewActionsTopMarginGesturePx = res.getDimensionPixelSize(
R.dimen.overview_actions_top_margin_gesture_grid_portrait);
overviewActionsBottomMarginGesturePx = res.getDimensionPixelSize(
R.dimen.overview_actions_bottom_margin_gesture_grid_portrait);
+ overviewPageSpacing = res.getDimensionPixelSize(
+ R.dimen.overview_page_spacing_grid_portrait);
}
overviewActionsButtonSpacing = res.getDimensionPixelSize(
R.dimen.overview_actions_button_spacing_grid);
@@ -386,15 +390,11 @@
overviewActionsBottomMarginGesturePx = overviewActionsTopMarginGesturePx;
overviewActionsButtonSpacing = res.getDimensionPixelSize(
R.dimen.overview_actions_button_spacing);
+ overviewPageSpacing = res.getDimensionPixelSize(R.dimen.overview_page_spacing);
}
overviewActionsMarginThreeButtonPx = res.getDimensionPixelSize(
R.dimen.overview_actions_margin_three_button);
- overviewPageSpacing = overviewShowAsGrid
- ? res.getDimensionPixelSize(R.dimen.recents_page_spacing_grid)
- : res.getDimensionPixelSize(R.dimen.recents_page_spacing);
- overviewRowSpacing = isLandscape
- ? res.getDimensionPixelSize(R.dimen.overview_grid_row_spacing_landscape)
- : res.getDimensionPixelSize(R.dimen.overview_grid_row_spacing_portrait);
+ overviewRowSpacing = res.getDimensionPixelSize(R.dimen.overview_grid_row_spacing);
overviewGridSideMargin = isLandscape
? res.getDimensionPixelSize(R.dimen.overview_grid_side_margin_landscape)
: res.getDimensionPixelSize(R.dimen.overview_grid_side_margin_portrait);
diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java
index 215b4ef..be2cd88 100644
--- a/src/com/android/launcher3/LauncherState.java
+++ b/src/com/android/launcher3/LauncherState.java
@@ -57,10 +57,9 @@
public static final int ALL_APPS_CONTENT = 1 << 1;
public static final int VERTICAL_SWIPE_INDICATOR = 1 << 2;
public static final int OVERVIEW_ACTIONS = 1 << 3;
- public static final int TASKBAR = 1 << 4;
- public static final int CLEAR_ALL_BUTTON = 1 << 5;
- public static final int WORKSPACE_PAGE_INDICATOR = 1 << 6;
- public static final int SPLIT_PLACHOLDER_VIEW = 1 << 7;
+ public static final int CLEAR_ALL_BUTTON = 1 << 4;
+ public static final int WORKSPACE_PAGE_INDICATOR = 1 << 5;
+ public static final int SPLIT_PLACHOLDER_VIEW = 1 << 6;
// Flag indicating workspace has multiple pages visible.
public static final int FLAG_MULTI_PAGE = BaseState.getFlag(0);
@@ -186,7 +185,7 @@
}
public int getVisibleElements(Launcher launcher) {
- return HOTSEAT_ICONS | WORKSPACE_PAGE_INDICATOR | VERTICAL_SWIPE_INDICATOR | TASKBAR;
+ return HOTSEAT_ICONS | WORKSPACE_PAGE_INDICATOR | VERTICAL_SWIPE_INDICATOR;
}
/**
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 98cb5ae..2d31aa4 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -92,9 +92,6 @@
public static final BooleanFlag ENABLE_DEVICE_SEARCH = new DeviceFlag(
"ENABLE_DEVICE_SEARCH", true, "Allows on device search in all apps");
- public static final BooleanFlag ENABLE_ONE_SEARCH = new DeviceFlag("ENABLE_ONE_SEARCH", false,
- "Use homescreen search box to complete allApps searches");
-
public static final BooleanFlag ENABLE_TWOLINE_ALLAPPS = getDebugFlag(
"ENABLE_TWOLINE_ALLAPPS", false, "Enables two line label inside all apps.");
diff --git a/src/com/android/launcher3/model/data/ItemInfo.java b/src/com/android/launcher3/model/data/ItemInfo.java
index b72f462..e30829e 100644
--- a/src/com/android/launcher3/model/data/ItemInfo.java
+++ b/src/com/android/launcher3/model/data/ItemInfo.java
@@ -25,6 +25,7 @@
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_SETTINGS;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_SHORTCUTS;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_TASKSWITCHER;
+import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_WALLPAPERS;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_WIDGETS_TRAY;
import static com.android.launcher3.LauncherSettings.Favorites.EXTENDED_CONTAINERS;
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
@@ -55,6 +56,7 @@
import com.android.launcher3.logger.LauncherAtom.Shortcut;
import com.android.launcher3.logger.LauncherAtom.ShortcutsContainer;
import com.android.launcher3.logger.LauncherAtom.TaskSwitcherContainer;
+import com.android.launcher3.logger.LauncherAtom.WallpapersContainer;
import com.android.launcher3.logger.LauncherAtomExtensions.ExtendedContainers;
import com.android.launcher3.model.ModelWriter;
import com.android.launcher3.util.ContentWriter;
@@ -428,6 +430,10 @@
return ContainerInfo.newBuilder()
.setTaskSwitcherContainer(TaskSwitcherContainer.getDefaultInstance())
.build();
+ case CONTAINER_WALLPAPERS:
+ return ContainerInfo.newBuilder()
+ .setWallpapersContainer(WallpapersContainer.getDefaultInstance())
+ .build();
case EXTENDED_CONTAINERS:
return ContainerInfo.newBuilder()
.setExtendedContainers(getExtendedContainer())
diff --git a/src/com/android/launcher3/states/SpringLoadedState.java b/src/com/android/launcher3/states/SpringLoadedState.java
index 5fe5450..d52594e 100644
--- a/src/com/android/launcher3/states/SpringLoadedState.java
+++ b/src/com/android/launcher3/states/SpringLoadedState.java
@@ -90,9 +90,4 @@
public float getWorkspaceBackgroundAlpha(Launcher launcher) {
return 0.2f;
}
-
- @Override
- public int getVisibleElements(Launcher launcher) {
- return (super.getVisibleElements(launcher) | HOTSEAT_ICONS) & ~TASKBAR;
- }
}
diff --git a/src/com/android/launcher3/touch/LandscapePagedViewHandler.java b/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
index 0c39067..9a2d6d8 100644
--- a/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
+++ b/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
@@ -255,7 +255,7 @@
}
@Override
- public int getSplitTranslationDirectionFactor(int stagePosition) {
+ public int getSplitTranslationDirectionFactor(int stagePosition, DeviceProfile deviceProfile) {
if (stagePosition == STAGE_POSITION_BOTTOM_OR_RIGHT) {
return -1;
} else {
diff --git a/src/com/android/launcher3/touch/PagedOrientationHandler.java b/src/com/android/launcher3/touch/PagedOrientationHandler.java
index 54b30fb..95168fb 100644
--- a/src/com/android/launcher3/touch/PagedOrientationHandler.java
+++ b/src/com/android/launcher3/touch/PagedOrientationHandler.java
@@ -95,7 +95,8 @@
int getScrollOffsetStart(View view, Rect insets);
int getScrollOffsetEnd(View view, Rect insets);
int getSecondaryTranslationDirectionFactor();
- int getSplitTranslationDirectionFactor(@StagePosition int stagePosition);
+ int getSplitTranslationDirectionFactor(@StagePosition int stagePosition,
+ DeviceProfile deviceProfile);
ChildBounds getChildBounds(View child, int childStart, int pageCenter, boolean layoutChild);
void setMaxScroll(AccessibilityEvent event, int maxScroll);
boolean getRecentsRtlSetting(Resources resources);
diff --git a/src/com/android/launcher3/touch/PortraitPagedViewHandler.java b/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
index cb1ba7d..7d70f77 100644
--- a/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
+++ b/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
@@ -261,8 +261,8 @@
}
@Override
- public int getSplitTranslationDirectionFactor(int stagePosition) {
- if (stagePosition == STAGE_POSITION_BOTTOM_OR_RIGHT) {
+ public int getSplitTranslationDirectionFactor(int stagePosition, DeviceProfile deviceProfile) {
+ if (deviceProfile.isLandscape && stagePosition == STAGE_POSITION_BOTTOM_OR_RIGHT) {
return -1;
} else {
return 1;
diff --git a/src/com/android/launcher3/touch/SeascapePagedViewHandler.java b/src/com/android/launcher3/touch/SeascapePagedViewHandler.java
index ce2e136..a921f94 100644
--- a/src/com/android/launcher3/touch/SeascapePagedViewHandler.java
+++ b/src/com/android/launcher3/touch/SeascapePagedViewHandler.java
@@ -37,7 +37,6 @@
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
-import com.android.launcher3.util.SplitConfigurationOptions;
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitBounds;
import com.android.launcher3.views.BaseDragLayer;
@@ -53,7 +52,7 @@
}
@Override
- public int getSplitTranslationDirectionFactor(int stagePosition) {
+ public int getSplitTranslationDirectionFactor(int stagePosition, DeviceProfile deviceProfile) {
if (stagePosition == STAGE_POSITION_BOTTOM_OR_RIGHT) {
return -1;
} else {
diff --git a/tests/AndroidManifest-common.xml b/tests/AndroidManifest-common.xml
index 4390211..618ab41 100644
--- a/tests/AndroidManifest-common.xml
+++ b/tests/AndroidManifest-common.xml
@@ -250,5 +250,21 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
+ <activity-alias android:name="Activity13" android:exported="true"
+ android:label="TestActivity13"
+ android:targetActivity="com.android.launcher3.testcomponent.OtherBaseTestingActivity">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity-alias>
+ <activity-alias android:name="Activity14" android:exported="true"
+ android:label="TestActivity14"
+ android:targetActivity="com.android.launcher3.testcomponent.OtherBaseTestingActivity">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity-alias>
</application>
</manifest>