Add logs & dump for SysUI/Shell interfaces
- This helps us know if the interfaces are set correctly during a gesture
Bug: 286805673
Test: dumpsys activity service TouchInteractionService
Change-Id: Icebc3d49d299495beb3880eaa591d6e96fdcd27f
diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java
index 468d96a..5c475e9 100644
--- a/quickstep/src/com/android/quickstep/SystemUiProxy.java
+++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java
@@ -97,6 +97,7 @@
import com.android.wm.shell.transition.IShellTransitions;
import com.android.wm.shell.util.GroupedRecentTaskInfo;
+import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
@@ -1249,19 +1250,21 @@
}
public ArrayList<GroupedRecentTaskInfo> getRecentTasks(int numTasks, int userId) {
- if (mRecentTasks != null) {
- try {
- final GroupedRecentTaskInfo[] rawTasks = mRecentTasks.getRecentTasks(numTasks,
- RECENT_IGNORE_UNAVAILABLE, userId);
- if (rawTasks == null) {
- return new ArrayList<>();
- }
- return new ArrayList<>(Arrays.asList(rawTasks));
- } catch (RemoteException e) {
- Log.w(TAG, "Failed call getRecentTasks", e);
- }
+ if (mRecentTasks == null) {
+ Log.w(TAG, "getRecentTasks() failed due to null mRecentTasks");
+ return new ArrayList<>();
}
- return new ArrayList<>();
+ try {
+ final GroupedRecentTaskInfo[] rawTasks = mRecentTasks.getRecentTasks(numTasks,
+ RECENT_IGNORE_UNAVAILABLE, userId);
+ if (rawTasks == null) {
+ return new ArrayList<>();
+ }
+ return new ArrayList<>(Arrays.asList(rawTasks));
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed call getRecentTasks", e);
+ return new ArrayList<>();
+ }
}
/**
@@ -1405,7 +1408,7 @@
public boolean startRecentsActivity(Intent intent, ActivityOptions options,
RecentsAnimationListener listener) {
if (mRecentTasks == null) {
- ActiveGestureLog.INSTANCE.trackEvent(RECENT_TASKS_MISSING);
+ ActiveGestureLog.INSTANCE.addLog("Null mRecentTasks", RECENT_TASKS_MISSING);
return false;
}
final IRecentsAnimationRunner runner = new IRecentsAnimationRunner.Stub() {
@@ -1463,4 +1466,35 @@
return false;
}
}
+
+ public void dump(PrintWriter pw) {
+ pw.println(TAG + ":");
+
+ pw.println("\tmSystemUiProxy=" + mSystemUiProxy);
+ pw.println("\tmPip=" + mPip);
+ pw.println("\tmPipAnimationListener=" + mPipAnimationListener);
+ pw.println("\tmBubbles=" + mBubbles);
+ pw.println("\tmBubblesListener=" + mBubblesListener);
+ pw.println("\tmSplitScreen=" + mSplitScreen);
+ pw.println("\tmSplitScreenListener=" + mSplitScreenListener);
+ pw.println("\tmSplitSelectListener=" + mSplitSelectListener);
+ pw.println("\tmOneHanded=" + mOneHanded);
+ pw.println("\tmShellTransitions=" + mShellTransitions);
+ pw.println("\tmHomeTransitionListener=" + mHomeTransitionListener);
+ pw.println("\tmStartingWindow=" + mStartingWindow);
+ pw.println("\tmStartingWindowListener=" + mStartingWindowListener);
+ pw.println("\tmSysuiUnlockAnimationController=" + mSysuiUnlockAnimationController);
+ pw.println("\tmLauncherActivityClass=" + mLauncherActivityClass);
+ pw.println("\tmLauncherUnlockAnimationController=" + mLauncherUnlockAnimationController);
+ pw.println("\tmRecentTasks=" + mRecentTasks);
+ pw.println("\tmRecentTasksListener=" + mRecentTasksListener);
+ pw.println("\tmBackAnimation=" + mBackAnimation);
+ pw.println("\tmBackToLauncherCallback=" + mBackToLauncherCallback);
+ pw.println("\tmBackToLauncherRunner=" + mBackToLauncherRunner);
+ pw.println("\tmDesktopMode=" + mDesktopMode);
+ pw.println("\tmDesktopTaskListener=" + mDesktopTaskListener);
+ pw.println("\tmUnfoldAnimation=" + mUnfoldAnimation);
+ pw.println("\tmUnfoldAnimationListener=" + mUnfoldAnimationListener);
+ pw.println("\tmDragAndDrop=" + mDragAndDrop);
+ }
}
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index 7399c31..b4fe5e4 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -1374,6 +1374,7 @@
mTaskbarManager.dumpLogs("", pw);
pw.println("AssistStateManager:");
AssistStateManager.INSTANCE.get(this).dump(" ", pw);
+ SystemUiProxy.INSTANCE.get(this).dump(pw);
}
private AbsSwipeUpHandler createLauncherSwipeHandler(