Loading quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java +2 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import com.android.launcher3.util.DisplayController.Info; import com.android.launcher3.util.NavigationMode; import com.android.launcher3.util.SettingsCache; import com.android.quickstep.TopTaskTracker.CachedTaskInfo; import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.util.NavBarPosition; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.QuickStepContract; Loading Loading @@ -239,6 +240,7 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener { public void onDisplayInfoChanged(Context context, Info info, int flags) { if ((flags & (CHANGE_ROTATION | CHANGE_NAVIGATION_MODE)) != 0) { mMode = info.navigationMode; ActiveGestureLog.INSTANCE.setIsFullyGesturalNavMode(isFullyGesturalNavMode()); mNavBarPosition = new NavBarPosition(mMode, info); if (mMode == NO_BUTTON) { Loading quickstep/src/com/android/quickstep/util/ActiveGestureErrorDetector.java +5 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,11 @@ public class ActiveGestureErrorDetector { @NonNull PrintWriter writer, @NonNull ActiveGestureLog.EventLog eventLog) { writer.println(prefix + "Error messages for gesture ID: " + eventLog.logId); if (!eventLog.mIsFullyGesturalNavMode) { writer.println(prefix + "\tSkipping gesture error detection because gesture navigation not enabled"); return; } boolean errorDetected = false; // Use a Set since the order is inherently checked in the loop. Loading quickstep/src/com/android/quickstep/util/ActiveGestureLog.java +10 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ public class ActiveGestureLog { public static final ActiveGestureLog INSTANCE = new ActiveGestureLog(); private boolean mIsFullyGesturalNavMode; /** * NOTE: This value should be kept same as * ActivityTaskManagerService#INTENT_EXTRA_LOG_TRACE_ID in platform Loading Loading @@ -127,7 +129,7 @@ public class ActiveGestureLog { @Nullable ActiveGestureErrorDetector.GestureEvent gestureEvent) { EventLog lastEventLog = logs[(nextIndex + logs.length - 1) % logs.length]; if (lastEventLog == null || mCurrentLogId != lastEventLog.logId) { EventLog eventLog = new EventLog(mCurrentLogId); EventLog eventLog = new EventLog(mCurrentLogId, mIsFullyGesturalNavMode); EventEntry eventEntry = new EventEntry(); eventEntry.update(type, event, extras, compoundString, gestureEvent); Loading Loading @@ -214,6 +216,10 @@ public class ActiveGestureLog { return mCurrentLogId++; } public void setIsFullyGesturalNavMode(boolean isFullyGesturalNavMode) { mIsFullyGesturalNavMode = isFullyGesturalNavMode; } /** Returns the current log ID. This should be used when a log trace is being reused. */ public int getLogId() { return mCurrentLogId; Loading Loading @@ -277,9 +283,11 @@ public class ActiveGestureLog { protected final List<EventEntry> eventEntries = new ArrayList<>(); protected final int logId; protected final boolean mIsFullyGesturalNavMode; private EventLog(int logId) { private EventLog(int logId, boolean isFullyGesturalNavMode) { this.logId = logId; mIsFullyGesturalNavMode = isFullyGesturalNavMode; } } Loading Loading
quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java +2 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import com.android.launcher3.util.DisplayController.Info; import com.android.launcher3.util.NavigationMode; import com.android.launcher3.util.SettingsCache; import com.android.quickstep.TopTaskTracker.CachedTaskInfo; import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.util.NavBarPosition; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.QuickStepContract; Loading Loading @@ -239,6 +240,7 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener { public void onDisplayInfoChanged(Context context, Info info, int flags) { if ((flags & (CHANGE_ROTATION | CHANGE_NAVIGATION_MODE)) != 0) { mMode = info.navigationMode; ActiveGestureLog.INSTANCE.setIsFullyGesturalNavMode(isFullyGesturalNavMode()); mNavBarPosition = new NavBarPosition(mMode, info); if (mMode == NO_BUTTON) { Loading
quickstep/src/com/android/quickstep/util/ActiveGestureErrorDetector.java +5 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,11 @@ public class ActiveGestureErrorDetector { @NonNull PrintWriter writer, @NonNull ActiveGestureLog.EventLog eventLog) { writer.println(prefix + "Error messages for gesture ID: " + eventLog.logId); if (!eventLog.mIsFullyGesturalNavMode) { writer.println(prefix + "\tSkipping gesture error detection because gesture navigation not enabled"); return; } boolean errorDetected = false; // Use a Set since the order is inherently checked in the loop. Loading
quickstep/src/com/android/quickstep/util/ActiveGestureLog.java +10 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ public class ActiveGestureLog { public static final ActiveGestureLog INSTANCE = new ActiveGestureLog(); private boolean mIsFullyGesturalNavMode; /** * NOTE: This value should be kept same as * ActivityTaskManagerService#INTENT_EXTRA_LOG_TRACE_ID in platform Loading Loading @@ -127,7 +129,7 @@ public class ActiveGestureLog { @Nullable ActiveGestureErrorDetector.GestureEvent gestureEvent) { EventLog lastEventLog = logs[(nextIndex + logs.length - 1) % logs.length]; if (lastEventLog == null || mCurrentLogId != lastEventLog.logId) { EventLog eventLog = new EventLog(mCurrentLogId); EventLog eventLog = new EventLog(mCurrentLogId, mIsFullyGesturalNavMode); EventEntry eventEntry = new EventEntry(); eventEntry.update(type, event, extras, compoundString, gestureEvent); Loading Loading @@ -214,6 +216,10 @@ public class ActiveGestureLog { return mCurrentLogId++; } public void setIsFullyGesturalNavMode(boolean isFullyGesturalNavMode) { mIsFullyGesturalNavMode = isFullyGesturalNavMode; } /** Returns the current log ID. This should be used when a log trace is being reused. */ public int getLogId() { return mCurrentLogId; Loading Loading @@ -277,9 +283,11 @@ public class ActiveGestureLog { protected final List<EventEntry> eventEntries = new ArrayList<>(); protected final int logId; protected final boolean mIsFullyGesturalNavMode; private EventLog(int logId) { private EventLog(int logId, boolean isFullyGesturalNavMode) { this.logId = logId; mIsFullyGesturalNavMode = isFullyGesturalNavMode; } } Loading