dumpsys activity activities中的Task和ActivityRecord信息解读

系统开发中,我们经常通过dumpsys activity activities,或者dumpsys activity xxx,xxx为具体的Activity名,通过这些方式来查看某个或者全部Activity的信息。

recents
下面的dumpsys信息就是在上图所示的场景下,通过dumpsys activity activities得到的信息,这里截取了第一个Task,来解读Task中各个字段的信息。

  * Task{
   
   b7f40b1 #1 type=undefined U=0 visible=true visibleRequested=true mode=fullscreen translucent=false sz=1}
    * Task{
   
   c66ea45 #6 type=undefined U=0 rootTaskId=1 visible=true visibleRequested=true mode=fullscreen translucent=false sz=1}
      mLastPausedActivity: ActivityRecord{
   
   6977e8e u0 com.android.launcher3/.uioverrides.QuickstepLauncher t6}
      mLastNonFullscreenBounds=Rect(699, 77 - 1221, 1039)
      isSleeping=false
      topResumedActivity=ActivityRecord{
   
   6977e8e u0 com.android.launcher3/.uioverrides.QuickstepLauncher t6}
      * Hist  #0: ActivityRecord{6977e8e u0 com.android.launcher3/.uioverrides.QuickstepLauncher t6}
        packageName=com.android.launcher3 processName=com.android.launcher3
        launchedFromUid=0 launchedFromPackage=null launchedFromFeature=null userId=0
        app=ProcessRecord{
   
   ee55ee5 1248:com.android.launcher3/u0a74}
        Intent {
   
    act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000100 cmp=com.android.launcher3/.uioverrides.QuickstepLauncher (has extras) }
        rootOfTask=true task=Task{
   
   c66ea45 #6 type=undefined}
        taskAffinity=null
        mActivityComponent=com.android.launcher3/.uioverrides.QuickstepLauncher
        baseDir=/data/app/~~-Ma3a7ZTpeC5g9fEOgTtgw==/com.android.launcher3-5UIYMfzBrMaV5DZ1ogn43w==/base.apk
        dataDir=/data/user/0/com.android.launcher3
        stateNotNeeded=true componentSpecified=true mActivityType=home
        compat={
   
   240dpi always-compat} theme=0x7f12000c
        mLastReportedConfigurations:
          mGlobalConfig={
   
   1.0 ?mcc0mnc [en_US] ldltr sw720dp w1280dp h696dp 240dpi lrg long land night -touch qwerty/v/v dpad/v winConfig={
   
    mBounds=Rect(0, 0 - 1920, 1080) 
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值