Merge "Update TwoButtonNavbarTouchController logs" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
426bcc7715
+21
-6
@@ -98,23 +98,35 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont
|
||||
return mLauncher.isInState(NORMAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
|
||||
boolean intercept = super.onControllerInterceptTouchEvent(ev);
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW,
|
||||
"2 button touch controller intercept touch? " + intercept);
|
||||
}
|
||||
return intercept;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LauncherState getTargetState(LauncherState fromState, boolean isDragTowardPositive) {
|
||||
final LauncherState targetState;
|
||||
if (mIsTransposed) {
|
||||
boolean draggingFromNav =
|
||||
mLauncher.getDeviceProfile().isSeascape() == isDragTowardPositive;
|
||||
targetState = draggingFromNav ? HINT_STATE_TWO_BUTTON : NORMAL;
|
||||
return draggingFromNav ? HINT_STATE_TWO_BUTTON : NORMAL;
|
||||
} else {
|
||||
LauncherState startState = mStartState != null ? mStartState : fromState;
|
||||
targetState = isDragTowardPositive ^ (startState == OVERVIEW)
|
||||
? HINT_STATE_TWO_BUTTON : NORMAL;
|
||||
return isDragTowardPositive ^ (startState == OVERVIEW) ? HINT_STATE_TWO_BUTTON : NORMAL;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onReinitToState(LauncherState newToState) {
|
||||
super.onReinitToState(newToState);
|
||||
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW, "Target state: " + targetState);
|
||||
Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW, "onReinitToState: " + newToState);
|
||||
}
|
||||
return targetState;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -163,6 +175,9 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont
|
||||
@Override
|
||||
protected void onSwipeInteractionCompleted(LauncherState targetState) {
|
||||
super.onSwipeInteractionCompleted(targetState);
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW, "Reached state: " + targetState);
|
||||
}
|
||||
if (!mIsTransposed) {
|
||||
mContinuousTouchCount++;
|
||||
}
|
||||
|
||||
@@ -113,5 +113,5 @@ public final class TestProtocol {
|
||||
public static final String WORK_PROFILE_REMOVED = "b/159671700";
|
||||
public static final String TIS_NO_EVENTS = "b/180915942";
|
||||
public static final String GET_RECENTS_FAILED = "b/177472267";
|
||||
public static final String TWO_BUTTON_NORMAL_NOT_OVERVIEW = "b/13714484";
|
||||
public static final String TWO_BUTTON_NORMAL_NOT_OVERVIEW = "b/177316094";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user