Merge "Remove unused code for old mult select design" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d9a38b8d0e
@@ -19,7 +19,6 @@ package com.android.launcher3;
|
||||
import static android.animation.ValueAnimator.areAnimatorsEnabled;
|
||||
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_5;
|
||||
import static com.android.launcher3.config.FeatureFlags.SHOW_HOME_GARDENING;
|
||||
import static com.android.launcher3.dragndrop.DraggableView.DRAGGABLE_ICON;
|
||||
import static com.android.launcher3.icons.IconNormalizer.ICON_VISIBLE_AREA_FACTOR;
|
||||
import static com.android.launcher3.util.MultiTranslateDelegate.INDEX_REORDER_BOUNCE_OFFSET;
|
||||
@@ -557,9 +556,7 @@ public class CellLayout extends ViewGroup {
|
||||
public void setSpringLoadedProgress(float progress) {
|
||||
if (Float.compare(progress, mSpringLoadedProgress) != 0) {
|
||||
mSpringLoadedProgress = progress;
|
||||
if (!SHOW_HOME_GARDENING.get()) {
|
||||
updateBgAlpha();
|
||||
}
|
||||
updateBgAlpha();
|
||||
setGridAlpha(progress);
|
||||
}
|
||||
}
|
||||
@@ -584,9 +581,7 @@ public class CellLayout extends ViewGroup {
|
||||
public void setScrollProgress(float progress) {
|
||||
if (Float.compare(Math.abs(progress), mScrollProgress) != 0) {
|
||||
mScrollProgress = Math.abs(progress);
|
||||
if (!SHOW_HOME_GARDENING.get()) {
|
||||
updateBgAlpha();
|
||||
}
|
||||
updateBgAlpha();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,7 +620,7 @@ public class CellLayout extends ViewGroup {
|
||||
}
|
||||
}
|
||||
|
||||
if (mVisualizeDropLocation && !SHOW_HOME_GARDENING.get()) {
|
||||
if (mVisualizeDropLocation) {
|
||||
for (int i = 0; i < mDragOutlines.length; i++) {
|
||||
final float alpha = mDragOutlineAlphas[i];
|
||||
if (alpha <= 0) continue;
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.android.launcher3;
|
||||
|
||||
import static com.android.launcher3.ButtonDropTarget.TOOLTIP_DEFAULT;
|
||||
import static com.android.launcher3.anim.AlphaUpdateListener.updateVisibility;
|
||||
import static com.android.launcher3.config.FeatureFlags.HOME_GARDENING_WORKSPACE_BUTTONS;
|
||||
|
||||
import android.animation.TimeInterpolator;
|
||||
import android.content.Context;
|
||||
@@ -119,13 +118,7 @@ public class DropTargetBar extends FrameLayout
|
||||
lp.rightMargin = (grid.widthPx - lp.width) / 2;
|
||||
}
|
||||
lp.height = grid.dropTargetBarSizePx;
|
||||
// TODO: Add tablet support for DropTargetBar when HOME_GARDENING_WORKSPACE_BUTTONS flag
|
||||
// is on
|
||||
if (HOME_GARDENING_WORKSPACE_BUTTONS.get()) {
|
||||
lp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
|
||||
} else {
|
||||
lp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.TOP;
|
||||
}
|
||||
lp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.TOP;
|
||||
|
||||
DeviceProfile dp = mLauncher.getDeviceProfile();
|
||||
int horizontalPadding = dp.dropTargetHorizontalPaddingPx;
|
||||
|
||||
@@ -952,10 +952,6 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
return mScreenOrder;
|
||||
}
|
||||
|
||||
protected View getFirstPagePinnedItem() {
|
||||
return mFirstPagePinnedItem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the screen ID of a page that is shown together with the given page screen ID when the
|
||||
* two panel UI is enabled.
|
||||
|
||||
@@ -29,14 +29,11 @@ import static com.android.launcher3.LauncherState.FLAG_HOTSEAT_INACCESSIBLE;
|
||||
import static com.android.launcher3.LauncherState.HINT_STATE;
|
||||
import static com.android.launcher3.LauncherState.HOTSEAT_ICONS;
|
||||
import static com.android.launcher3.LauncherState.NORMAL;
|
||||
import static com.android.launcher3.LauncherState.SPRING_LOADED;
|
||||
import static com.android.launcher3.LauncherState.WORKSPACE_PAGE_INDICATOR;
|
||||
import static com.android.launcher3.anim.Interpolators.ACCEL_2;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.anim.Interpolators.ZOOM_OUT;
|
||||
import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER;
|
||||
import static com.android.launcher3.config.FeatureFlags.HOME_GARDENING_WORKSPACE_BUTTONS;
|
||||
import static com.android.launcher3.config.FeatureFlags.SHOW_HOME_GARDENING;
|
||||
import static com.android.launcher3.graphics.Scrim.SCRIM_PROGRESS;
|
||||
import static com.android.launcher3.graphics.SysUiScrim.SYSUI_PROGRESS;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_HOTSEAT_FADE;
|
||||
@@ -160,30 +157,6 @@ public class WorkspaceStateTransitionAnimation {
|
||||
float hotseatIconsAlpha = (elements & HOTSEAT_ICONS) != 0 ? 1 : 0;
|
||||
propertySetter.setViewAlpha(hotseat, hotseatIconsAlpha, hotseatFadeInterpolator);
|
||||
|
||||
if (SHOW_HOME_GARDENING.get()) {
|
||||
propertySetter.setViewAlpha(
|
||||
mWorkspace.getFirstPagePinnedItem(),
|
||||
state == SPRING_LOADED ? FIRST_PAGE_PINNED_WIDGET_DISABLED_ALPHA : 1,
|
||||
workspaceFadeInterpolator);
|
||||
propertySetter.addEndListener(success -> {
|
||||
if (success) {
|
||||
mWorkspace.getFirstPagePinnedItem().setClickable(state != SPRING_LOADED);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (HOME_GARDENING_WORKSPACE_BUTTONS.get()) {
|
||||
propertySetter.setViewAlpha(
|
||||
mLauncher.getHotseat().getQsb(),
|
||||
state == SPRING_LOADED ? 0 : 1,
|
||||
workspaceFadeInterpolator);
|
||||
propertySetter.addEndListener(success -> {
|
||||
if (success) {
|
||||
mLauncher.getHotseat().getQsb().setClickable(state != SPRING_LOADED);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Update the accessibility flags for hotseat based on launcher state.
|
||||
hotseat.setImportantForAccessibility(
|
||||
state.hasFlag(FLAG_HOTSEAT_INACCESSIBLE)
|
||||
|
||||
@@ -269,13 +269,6 @@ public final class FeatureFlags {
|
||||
public static final BooleanFlag ENABLE_SEARCH_UNINSTALLED_APPS = getReleaseFlag(270395269,
|
||||
"ENABLE_SEARCH_UNINSTALLED_APPS", DISABLED, "Search uninstalled app results.");
|
||||
|
||||
public static final BooleanFlag SHOW_HOME_GARDENING = getDebugFlag(270395183,
|
||||
"SHOW_HOME_GARDENING", DISABLED, "Show the new home gardening mode");
|
||||
|
||||
public static final BooleanFlag HOME_GARDENING_WORKSPACE_BUTTONS = getDebugFlag(270395133,
|
||||
"HOME_GARDENING_WORKSPACE_BUTTONS", DISABLED,
|
||||
"Change workspace edit buttons to reflect home gardening");
|
||||
|
||||
public static final BooleanFlag ENABLE_DOWNLOAD_APP_UX_V2 = getReleaseFlag(270395134,
|
||||
"ENABLE_DOWNLOAD_APP_UX_V2", ENABLED, "Updates the download app UX"
|
||||
+ " to have better visuals");
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.android.launcher3.states;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.SHOW_HOME_GARDENING;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_HOME;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -45,11 +44,6 @@ public class SpringLoadedState extends LauncherState {
|
||||
|
||||
@Override
|
||||
public ScaleAndTranslation getWorkspaceScaleAndTranslation(Launcher launcher) {
|
||||
|
||||
if (SHOW_HOME_GARDENING.get()) {
|
||||
return super.getWorkspaceScaleAndTranslation(launcher);
|
||||
}
|
||||
|
||||
DeviceProfile grid = launcher.getDeviceProfile();
|
||||
Workspace<?> ws = launcher.getWorkspace();
|
||||
if (ws.getChildCount() == 0) {
|
||||
@@ -68,9 +62,6 @@ public class SpringLoadedState extends LauncherState {
|
||||
|
||||
@Override
|
||||
protected float getDepthUnchecked(Context context) {
|
||||
if (SHOW_HOME_GARDENING.get()) {
|
||||
return 0;
|
||||
}
|
||||
return 0.5f;
|
||||
}
|
||||
|
||||
@@ -81,10 +72,6 @@ public class SpringLoadedState extends LauncherState {
|
||||
|
||||
@Override
|
||||
public float getWorkspaceBackgroundAlpha(Launcher launcher) {
|
||||
if (SHOW_HOME_GARDENING.get()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user