mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Logging for drop bar not appearing for dragged widget
Test: presubmit Bug: 195031154 Change-Id: I19494fc3d6d9db252570697c057fdee7f7d44521
This commit is contained in:
@@ -25,6 +25,7 @@ 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,10 +33,13 @@ 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.TestProtocol;
|
||||
|
||||
/*
|
||||
* The top bar containing various drop targets: Delete/App Info/Uninstall.
|
||||
@@ -212,6 +216,9 @@ 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;
|
||||
|
||||
@@ -238,6 +245,9 @@ 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);
|
||||
}
|
||||
|
||||
@@ -261,4 +271,12 @@ public class DropTargetBar extends FrameLayout
|
||||
public ButtonDropTarget[] getDropTargets() {
|
||||
return mDropTargets;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onVisibilityChanged(@NonNull View changedView, int visibility) {
|
||||
super.onVisibilityChanged(changedView, visibility);
|
||||
if (TestProtocol.sDebugTracing && visibility == VISIBLE) {
|
||||
Log.d(TestProtocol.NO_DROP_TARGET, "9");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user