Merge branch 'android14-release' into 14-dev
This commit is contained in:
1 parent
5931c9afec
commit
32700b0100
994 files changed
+36404
-15826
No files matched your search
@@ -18,13 +18,11 @@ 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;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@@ -32,13 +30,10 @@ import android.view.ViewDebug;
|
||||
import android.view.ViewPropertyAnimator;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.dragndrop.DragController;
|
||||
import com.android.launcher3.dragndrop.DragController.DragListener;
|
||||
import com.android.launcher3.dragndrop.DragOptions;
|
||||
import com.android.launcher3.testing.shared.TestProtocol;
|
||||
|
||||
/*
|
||||
* The top bar containing various drop targets: Delete/App Info/Uninstall.
|
||||
@@ -119,13 +114,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;
|
||||
@@ -163,6 +152,7 @@ public class DropTargetBar extends FrameLayout
|
||||
firstButton.setTextVisible(true);
|
||||
firstButton.setIconVisible(true);
|
||||
firstButton.measure(widthSpec, heightSpec);
|
||||
firstButton.resizeTextToFit();
|
||||
} else if (visibleCount == 2) {
|
||||
DeviceProfile dp = mLauncher.getDeviceProfile();
|
||||
int verticalPadding = dp.dropTargetVerticalPaddingPx;
|
||||
@@ -306,9 +296,6 @@ public class DropTargetBar extends FrameLayout
|
||||
}
|
||||
|
||||
public void animateToVisibility(boolean isVisible) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_DROP_TARGET, "8");
|
||||
}
|
||||
if (mVisible != isVisible) {
|
||||
mVisible = isVisible;
|
||||
|
||||
@@ -335,9 +322,6 @@ public class DropTargetBar extends FrameLayout
|
||||
*/
|
||||
@Override
|
||||
public void onDragStart(DropTarget.DragObject dragObject, DragOptions options) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_DROP_TARGET, "7");
|
||||
}
|
||||
animateToVisibility(true);
|
||||
}
|
||||
|
||||
@@ -361,16 +345,4 @@ public class DropTargetBar extends FrameLayout
|
||||
public ButtonDropTarget[] getDropTargets() {
|
||||
return getVisibility() == View.VISIBLE ? mDropTargets : new ButtonDropTarget[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onVisibilityChanged(@NonNull View changedView, int visibility) {
|
||||
super.onVisibilityChanged(changedView, visibility);
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
if (visibility == VISIBLE) {
|
||||
Log.d(TestProtocol.NO_DROP_TARGET, "9");
|
||||
} else {
|
||||
Log.d(TestProtocol.NO_DROP_TARGET, "Hiding drop target", new Exception());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user