2

Running adb shell dumpsys activity activities shows the current tasks and its activities. But the tasks are grouped by "Stacks" (eg. Stack #0, Stack #1). What those Stacks means?

The following result below shows an example. I've opened Play Store (Task id #694) then browsed to an app in it and touched in the developer's e-mail, which open a new task for G-Mail (Task id #696). After that I touched in Home Button and opened G-Mail through home launcher (Task id #698)

If those tasks aren't related, then why they are in the same Stack and the Home Launcher app (Task id #693) and Recents Apps screen (Task id #697) are in different Stacks? Can someone explain what difference makes being in the same or in a different Stack?

Stack #1:
    Task id #698
    TaskRecord{9cfcd22 #698 A=com.google.android.gm U=0 StackId=1 sz=2}
        Hist #1: ActivityRecord{a926067 u0 com.google.android.gm/.welcome.SetupAddressesActivity t698}
        Hist #0: ActivityRecord{49b6dc1 u0 com.google.android.gm/.welcome.WelcomeTourActivity t698}
    Task id #696
    TaskRecord{e5e8110 #696 A=com.google.android.gm U=0 StackId=1 sz=1}
        Hist #0: ActivityRecord{2ee23f u0 com.google.android.gm/.ComposeActivityGmailExternal t696}
    Task id #694
    TaskRecord{f165f44 #694 A=com.android.vending U=0 StackId=1 sz=1}
        Hist #0: ActivityRecord{5b6ebee u0 com.android.vending/.AssetBrowserActivity t694}5,1668] }

Stack #0:
    Task id #693
    TaskRecord{e0f894 #693 I=com.motorola.launcher3/com.android.launcher3.CustomizationPanelLauncher U=0 StackId=0 sz=1}
        Hist #0: ActivityRecord{5e7d381 u0 com.motorola.launcher3/com.android.launcher3.CustomizationPanelLauncher t693}

Stack #5:
    Task id #697
    TaskRecord{a9c0639 #697 A=com.android.systemui U=0 StackId=5 sz=1}
        Hist #0: ActivityRecord{e45982b u0 com.android.systemui/.recents.RecentsActivity t697}

ResumedActivity: ActivityRecord{a926067 u0 com.google.android.gm/.welcome.SetupAddressesActivity t698}
mFocusedStack=ActivityStack{25782d stackId=1, 3 tasks} mLastFocusedStack=ActivityStack{25782d stackId=1, 3 tasks}
Samuel T.
  • 194
  • 3
  • 13

0 Answers0