Merge "Add important dump logging Bug: 130851537 Bug: 119992316" into ub-launcher3-qt-dev
This commit is contained in:
commit
efe8475093
|
@ -49,6 +49,8 @@ import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
|
|||
import com.android.launcher3.util.TouchController;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* Handles swiping up on the nav bar to go home from launcher, e.g. overview or all apps.
|
||||
*/
|
||||
|
@ -222,4 +224,7 @@ public class NavBarToHomeTouchController implements TouchController, SwipeDetect
|
|||
mEndState.containerType,
|
||||
mLauncher.getWorkspace().getCurrentPage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(String prefix, PrintWriter writer) { }
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@ import com.android.quickstep.SysUINavigationMode;
|
|||
import com.android.quickstep.views.RecentsView;
|
||||
import com.android.quickstep.views.TaskView;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* Touch controller for handling task view card swipes
|
||||
*/
|
||||
|
@ -305,4 +307,7 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
|
|||
mPendingAnimation = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(String prefix, PrintWriter writer) { }
|
||||
}
|
||||
|
|
|
@ -32,6 +32,8 @@ import com.android.launcher3.util.TouchController;
|
|||
import com.android.quickstep.RecentsModel;
|
||||
import com.android.systemui.shared.recents.ISystemUiProxy;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* TouchController for handling touch events that get sent to the StatusBar. Once the
|
||||
* Once the event delta y passes the touch slop, the events start getting forwarded.
|
||||
|
@ -45,6 +47,7 @@ public class StatusBarTouchController implements TouchController {
|
|||
protected final TouchEventTranslator mTranslator;
|
||||
private final float mTouchSlop;
|
||||
private ISystemUiProxy mSysUiProxy;
|
||||
private int mLastAction;
|
||||
|
||||
/* If {@code false}, this controller should not handle the input {@link MotionEvent}.*/
|
||||
private boolean mCanIntercept;
|
||||
|
@ -56,9 +59,18 @@ public class StatusBarTouchController implements TouchController {
|
|||
mTranslator = new TouchEventTranslator((MotionEvent ev)-> dispatchTouchEvent(ev));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(String prefix, PrintWriter writer) {
|
||||
writer.println(prefix + "mCanIntercept:" + mCanIntercept);
|
||||
writer.println(prefix + "mLastAction:" + MotionEvent.actionToString(mLastAction));
|
||||
writer.println(prefix + "mSysUiProxy available:" + (mSysUiProxy != null));
|
||||
|
||||
}
|
||||
|
||||
private void dispatchTouchEvent(MotionEvent ev) {
|
||||
try {
|
||||
if (mSysUiProxy != null) {
|
||||
mLastAction = ev.getActionMasked();
|
||||
mSysUiProxy.onStatusBarMotionEvent(ev);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import com.android.launcher3.util.TouchController;
|
|||
import com.android.launcher3.views.ActivityContext;
|
||||
import com.android.launcher3.views.BaseDragLayer;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
|
@ -251,4 +252,7 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
|
|||
@FloatingViewType int type) {
|
||||
return getOpenView(activity, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(String prefix, PrintWriter writer) { }
|
||||
}
|
||||
|
|
|
@ -2346,7 +2346,8 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
|||
writer.println(" mPendingActivityResult=" + mPendingActivityResult);
|
||||
writer.println(" mRotationHelper: " + mRotationHelper);
|
||||
// Extra logging for b/116853349
|
||||
mDragLayer.dumpAlpha(writer);
|
||||
mDragLayer.dump(prefix, writer);
|
||||
mStateManager.dump(prefix, writer);
|
||||
dumpMisc(writer);
|
||||
|
||||
try {
|
||||
|
|
|
@ -50,6 +50,7 @@ import com.android.launcher3.anim.PropertySetter;
|
|||
import com.android.launcher3.anim.PropertySetter.AnimatedPropertySetter;
|
||||
import com.android.launcher3.uioverrides.UiFactory;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.ArrayList;
|
||||
|
@ -144,6 +145,15 @@ public class LauncherStateManager {
|
|||
return mCurrentStableState;
|
||||
}
|
||||
|
||||
public void dump(String prefix, PrintWriter writer) {
|
||||
writer.println(prefix + "LauncherState");
|
||||
writer.println(prefix + "\tmLastStableState:" + mLastStableState);
|
||||
writer.println(prefix + "\tmCurrentStableState:" + mCurrentStableState);
|
||||
writer.println(prefix + "\tmState:" + mState);
|
||||
writer.println(prefix + "\tmRestState:" + mRestState);
|
||||
writer.println(prefix + "\tisInTransition:" + (mConfig.mCurrentAnimation != null));
|
||||
}
|
||||
|
||||
public StateHandler[] getStateHandlers() {
|
||||
if (mStateHandlers == null) {
|
||||
mStateHandlers = UiFactory.getStateHandler(mLauncher);
|
||||
|
|
|
@ -46,6 +46,7 @@ import com.android.launcher3.util.Thunk;
|
|||
import com.android.launcher3.util.TouchController;
|
||||
import com.android.launcher3.util.UiThreadHelper;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
|
@ -697,4 +698,7 @@ public class DragController implements DragDriver.EventListener, TouchController
|
|||
mDropTargets.remove(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(String prefix, PrintWriter writer) { }
|
||||
|
||||
}
|
||||
|
|
|
@ -50,6 +50,8 @@ import com.android.launcher3.util.FlingBlockCheck;
|
|||
import com.android.launcher3.util.PendingAnimation;
|
||||
import com.android.launcher3.util.TouchController;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* TouchController for handling state changes
|
||||
*/
|
||||
|
@ -581,4 +583,7 @@ public abstract class AbstractStateChangeTouchController
|
|||
this.endTime = duration + SystemClock.elapsedRealtime();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(String prefix, PrintWriter writer) { }
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@ package com.android.launcher3.util;
|
|||
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
public interface TouchController {
|
||||
|
||||
/**
|
||||
|
@ -29,4 +31,6 @@ public interface TouchController {
|
|||
* Called when the draglayer receives a intercept touch event.
|
||||
*/
|
||||
boolean onControllerInterceptTouchEvent(MotionEvent ev);
|
||||
|
||||
void dump(String prefix, PrintWriter writer);
|
||||
}
|
||||
|
|
|
@ -383,8 +383,13 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
|
|||
return mMultiValueAlpha.getProperty(index);
|
||||
}
|
||||
|
||||
public void dumpAlpha(PrintWriter writer) {
|
||||
writer.println(" dragLayerAlpha : " + mMultiValueAlpha );
|
||||
public void dump(String prefix, PrintWriter writer) {
|
||||
writer.println(prefix + "DragLayer");
|
||||
if (mActiveController != null) {
|
||||
writer.println(prefix + "\tactiveController: " + mActiveController);
|
||||
mActiveController.dump(prefix + "\t", writer);
|
||||
}
|
||||
writer.println(prefix + "\tdragLayerAlpha : " + mMultiValueAlpha );
|
||||
}
|
||||
|
||||
public static class LayoutParams extends InsettableFrameLayout.LayoutParams {
|
||||
|
|
Loading…
Reference in New Issue