Dump nav mode with TIS

- Also skip logging touches when not handling gestures

Change-Id: Ie25f28fe62594f22ebe73f276ccef628b7f8e734
This commit is contained in:
Winson Chung 2020-04-17 15:51:42 -07:00
parent e0f58a0f79
commit e9edbabbe2
2 changed files with 11 additions and 1 deletions

View File

@ -499,7 +499,10 @@ public class TouchInteractionService extends Service implements PluginListener<O
}
}
ActiveGestureLog.INSTANCE.addLog("onMotionEvent", event.getActionMasked());
if (mUncheckedConsumer != InputConsumer.NO_OP) {
ActiveGestureLog.INSTANCE.addLog("onMotionEvent", event.getActionMasked());
}
boolean cleanUpConsumer = (action == ACTION_UP || action == ACTION_CANCEL)
&& mConsumer != null
&& !mConsumer.getActiveConsumerInHierarchy().isConsumerDetachedFromGesture();
@ -802,6 +805,7 @@ public class TouchInteractionService extends Service implements PluginListener<O
if (mGestureState != null) {
mGestureState.dump(pw);
}
SysUINavigationMode.INSTANCE.get(this).dump(pw);
pw.println("TouchState:");
BaseDraggingActivity createdOverviewActivity = mOverviewComponentObserver == null ? null
: mOverviewComponentObserver.getActivityInterface().getCreatedActivity();

View File

@ -26,6 +26,7 @@ import android.util.Log;
import com.android.launcher3.util.MainThreadInitializedObject;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
@ -128,6 +129,11 @@ public class SysUINavigationMode {
return getMode(context) != Mode.TWO_BUTTONS;
}
public void dump(PrintWriter pw) {
pw.println("SysUINavigationMode:");
pw.println(" mode=" + mMode.name());
}
public interface NavigationModeChangeListener {
void onNavigationModeChanged(Mode newMode);