Skip to content

Instantly share code, notes, and snippets.

@jasonfma
Created October 24, 2016 21:20
Show Gist options
  • Save jasonfma/1c709b7db10649e5d42f1ab537bd0fc4 to your computer and use it in GitHub Desktop.
Save jasonfma/1c709b7db10649e5d42f1ab537bd0fc4 to your computer and use it in GitHub Desktop.
React Native multiple MainActivity bug
ip-10-33-6-201:hylia jason$ adb shell dumpsys activity activities
ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
Stack #0:
Task id #1
* TaskRecord{9d3f1c80 #1 A=com.android.launcher U=0 sz=1}
numActivities=1 rootWasReset=false userId=0 mTaskType=1 numFullscreen=1 mOnTopOfHome=false
affinity=com.android.launcher
intent={act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher}
realActivity=com.android.launcher/com.android.launcher2.Launcher
Activities=[ActivityRecord{9d1182e0 u0 com.android.launcher/com.android.launcher2.Launcher t1}]
askedCompatMode=false
lastThumbnail=android.graphics.Bitmap@9d674460 lastDescription=null
lastActiveTime=88655 (inactive for 5s)
* Hist #0: ActivityRecord{9d1182e0 u0 com.android.launcher/com.android.launcher2.Launcher t1}
packageName=com.android.launcher processName=com.android.launcher
launchedFromUid=0 launchedFromPackage=null userId=0
app=ProcessRecord{9d400fc0 1683:com.android.launcher/u0a9}
Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher }
frontOfTask=true task=TaskRecord{9d3f1c80 #1 A=com.android.launcher U=0 sz=1}
taskAffinity=com.android.launcher
realActivity=com.android.launcher/com.android.launcher2.Launcher
baseDir=/system/priv-app/Launcher2.apk
dataDir=/data/user/0/com.android.launcher
stateNotNeeded=true componentSpecified=false mActivityType=1
compat={420dpi} labelRes=0x7f0d0000 icon=0x7f030001 theme=0x7f0e0001
config={1.0 310mcc260mnc en_US ldltr sw411dp w411dp h658dp 420dpi nrml port finger qwerty/v/v -nav/h s.6}
launchFailed=false launchCount=0 lastLaunchTime=-1m29s864ms
haveState=true icicle=Bundle[mParcelledData.dataSize=5444]
state=STOPPED stopped=true delayedResume=false finishing=false
keysPaused=false inHistory=true visible=false sleeping=false idle=true
fullscreen=true noDisplay=false immersive=false launchMode=2
frozenBeforeDestroy=false thumbnailNeeded=false forceNewConfig=false
mActivityType=HOME_ACTIVITY_TYPE
thumbHolder: 9d3f1c80 bm=android.graphics.Bitmap@9d674460 desc=null
waitingVisible=false nowVisible=false lastVisibleTime=-1m28s458ms
Running activities (most recent first):
TaskRecord{9d3f1c80 #1 A=com.android.launcher U=0 sz=1}
Run #0: ActivityRecord{9d1182e0 u0 com.android.launcher/com.android.launcher2.Launcher t1}
mLastPausedActivity: ActivityRecord{9d1182e0 u0 com.android.launcher/com.android.launcher2.Launcher t1}
Stack #1:
Task id #2
* TaskRecord{9d51c360 #2 A=md.reset.reSET U=0 sz=1}
numActivities=1 rootWasReset=false userId=0 mTaskType=0 numFullscreen=1 mOnTopOfHome=true
affinity=md.reset.reSET
intent={flg=0x10000000 cmp=md.reset.reSET/.MainActivity}
realActivity=md.reset.reSET/.MainActivity
Activities=[ActivityRecord{9d5226c8 u0 md.reset.reSET/.MainActivity t2}]
askedCompatMode=false
lastThumbnail=null lastDescription=null
lastActiveTime=88752 (inactive for 5s)
* Hist #0: ActivityRecord{9d5226c8 u0 md.reset.reSET/.MainActivity t2}
packageName=md.reset.reSET processName=md.reset.reSET
launchedFromUid=0 launchedFromPackage=null userId=0
app=ProcessRecord{9d4db730 2418:md.reset.reSET/u0a76}
Intent { flg=0x10000000 cmp=md.reset.reSET/.MainActivity }
frontOfTask=true task=TaskRecord{9d51c360 #2 A=md.reset.reSET U=0 sz=1}
taskAffinity=md.reset.reSET
realActivity=md.reset.reSET/.MainActivity
baseDir=/data/app/md.reset.reSET-1.apk
dataDir=/data/data/md.reset.reSET
stateNotNeeded=false componentSpecified=true mActivityType=0
compat={420dpi} labelRes=0x7f070026 icon=0x7f030000 theme=0x7f09007f
config={1.0 310mcc260mnc en_US ldltr sw411dp w411dp h658dp 420dpi nrml port finger qwerty/v/v -nav/h s.6}
launchFailed=false launchCount=1 lastLaunchTime=-5s525ms
haveState=false icicle=null
state=RESUMED stopped=false delayedResume=false finishing=false
keysPaused=false inHistory=true visible=true sleeping=false idle=true
fullscreen=true noDisplay=false immersive=false launchMode=0
frozenBeforeDestroy=false thumbnailNeeded=false forceNewConfig=false
mActivityType=APPLICATION_ACTIVITY_TYPE
thumbHolder: 9d51c360 bm=null desc=null
waitingVisible=false nowVisible=true lastVisibleTime=-5s142ms
Running activities (most recent first):
TaskRecord{9d51c360 #2 A=md.reset.reSET U=0 sz=1}
Run #0: ActivityRecord{9d5226c8 u0 md.reset.reSET/.MainActivity t2}
mResumedActivity: ActivityRecord{9d5226c8 u0 md.reset.reSET/.MainActivity t2}
mFocusedActivity: ActivityRecord{9d5226c8 u0 md.reset.reSET/.MainActivity t2}
mDismissKeyguardOnNextActivity=false
mFocusedStack=ActivityStack{9d45e478 stackId=1, 1 tasks} mStackState=STACK_STATE_HOME_IN_BACK
mSleepTimeout=false
mCurTaskId=2
mUserStackInFront={}
Recent tasks:
* Recent #0: TaskRecord{9d51c360 #2 A=md.reset.reSET U=0 sz=1}
numActivities=1 rootWasReset=false userId=0 mTaskType=0 numFullscreen=1 mOnTopOfHome=true
affinity=md.reset.reSET
intent={flg=0x10000000 cmp=md.reset.reSET/.MainActivity}
realActivity=md.reset.reSET/.MainActivity
Activities=[ActivityRecord{9d5226c8 u0 md.reset.reSET/.MainActivity t2}]
askedCompatMode=false
lastThumbnail=null lastDescription=null
lastActiveTime=88752 (inactive for 5s)
* Recent #1: TaskRecord{9d3f1c80 #1 A=com.android.launcher U=0 sz=1}
numActivities=1 rootWasReset=false userId=0 mTaskType=1 numFullscreen=1 mOnTopOfHome=false
affinity=com.android.launcher
intent={act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher}
realActivity=com.android.launcher/com.android.launcher2.Launcher
Activities=[ActivityRecord{9d1182e0 u0 com.android.launcher/com.android.launcher2.Launcher t1}]
askedCompatMode=false
lastThumbnail=android.graphics.Bitmap@9d674460 lastDescription=null
lastActiveTime=88655 (inactive for 5s)
ip-10-33-6-201:hylia jason$ adb shell dumpsys activity activities
ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
Stack #0:
Task id #1
* TaskRecord{9d3f1c80 #1 A=com.android.launcher U=0 sz=1}
numActivities=1 rootWasReset=true userId=0 mTaskType=1 numFullscreen=1 mOnTopOfHome=false
affinity=com.android.launcher
intent={act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher}
realActivity=com.android.launcher/com.android.launcher2.Launcher
Activities=[ActivityRecord{9d1182e0 u0 com.android.launcher/com.android.launcher2.Launcher t1}]
askedCompatMode=false
lastThumbnail=android.graphics.Bitmap@9d676ac0 lastDescription=null
lastActiveTime=139627 (inactive for 2s)
* Hist #0: ActivityRecord{9d1182e0 u0 com.android.launcher/com.android.launcher2.Launcher t1}
packageName=com.android.launcher processName=com.android.launcher
launchedFromUid=0 launchedFromPackage=null userId=0
app=ProcessRecord{9d400fc0 1683:com.android.launcher/u0a9}
Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher }
frontOfTask=true task=TaskRecord{9d3f1c80 #1 A=com.android.launcher U=0 sz=1}
taskAffinity=com.android.launcher
realActivity=com.android.launcher/com.android.launcher2.Launcher
baseDir=/system/priv-app/Launcher2.apk
dataDir=/data/user/0/com.android.launcher
stateNotNeeded=true componentSpecified=false mActivityType=1
compat={420dpi} labelRes=0x7f0d0000 icon=0x7f030001 theme=0x7f0e0001
config={1.0 310mcc260mnc en_US ldltr sw411dp w411dp h658dp 420dpi nrml port finger qwerty/v/v -nav/h s.6}
launchFailed=false launchCount=0 lastLaunchTime=-2m17s272ms
haveState=true icicle=Bundle[mParcelledData.dataSize=7480]
state=STOPPED stopped=true delayedResume=false finishing=false
keysPaused=false inHistory=true visible=false sleeping=false idle=true
fullscreen=true noDisplay=false immersive=false launchMode=2
frozenBeforeDestroy=false thumbnailNeeded=false forceNewConfig=false
mActivityType=HOME_ACTIVITY_TYPE
thumbHolder: 9d3f1c80 bm=android.graphics.Bitmap@9d676ac0 desc=null
waitingVisible=false nowVisible=false lastVisibleTime=-4s500ms
Running activities (most recent first):
TaskRecord{9d3f1c80 #1 A=com.android.launcher U=0 sz=1}
Run #0: ActivityRecord{9d1182e0 u0 com.android.launcher/com.android.launcher2.Launcher t1}
mLastPausedActivity: ActivityRecord{9d1182e0 u0 com.android.launcher/com.android.launcher2.Launcher t1}
Stack #1:
Task id #2
* TaskRecord{9d51c360 #2 A=md.reset.reSET U=0 sz=2}
numActivities=2 rootWasReset=false userId=0 mTaskType=0 numFullscreen=2 mOnTopOfHome=true
affinity=md.reset.reSET
intent={flg=0x10000000 cmp=md.reset.reSET/.MainActivity}
realActivity=md.reset.reSET/.MainActivity
Activities=[ActivityRecord{9d5226c8 u0 md.reset.reSET/.MainActivity t2}, ActivityRecord{9d3c6908 u0 md.reset.reSET/.MainActivity t2}]
askedCompatMode=false
lastThumbnail=null lastDescription=null
lastActiveTime=139653 (inactive for 2s)
* Hist #1: ActivityRecord{9d3c6908 u0 md.reset.reSET/.MainActivity t2}
packageName=md.reset.reSET processName=md.reset.reSET
launchedFromUid=10009 launchedFromPackage=com.android.launcher userId=0
app=ProcessRecord{9d4db730 2418:md.reset.reSET/u0a76}
Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10600000 cmp=md.reset.reSET/.MainActivity }
frontOfTask=false task=TaskRecord{9d51c360 #2 A=md.reset.reSET U=0 sz=2}
taskAffinity=md.reset.reSET
realActivity=md.reset.reSET/.MainActivity
baseDir=/data/app/md.reset.reSET-1.apk
dataDir=/data/data/md.reset.reSET
stateNotNeeded=false componentSpecified=true mActivityType=0
compat={420dpi} labelRes=0x7f070026 icon=0x7f030000 theme=0x7f09007f
config={1.0 310mcc260mnc en_US ldltr sw411dp w411dp h658dp 420dpi nrml port finger qwerty/v/v -nav/h s.6}
launchFailed=false launchCount=1 lastLaunchTime=-2s33ms
haveState=false icicle=null
state=RESUMED stopped=false delayedResume=false finishing=false
keysPaused=false inHistory=true visible=true sleeping=false idle=true
fullscreen=true noDisplay=false immersive=false launchMode=0
frozenBeforeDestroy=false thumbnailNeeded=false forceNewConfig=false
mActivityType=APPLICATION_ACTIVITY_TYPE
thumbHolder: 9d51c360 bm=null desc=null
waitingVisible=false nowVisible=true lastVisibleTime=-1s649ms
* Hist #0: ActivityRecord{9d5226c8 u0 md.reset.reSET/.MainActivity t2}
packageName=md.reset.reSET processName=md.reset.reSET
launchedFromUid=0 launchedFromPackage=null userId=0
app=ProcessRecord{9d4db730 2418:md.reset.reSET/u0a76}
Intent { flg=0x10000000 cmp=md.reset.reSET/.MainActivity }
frontOfTask=true task=TaskRecord{9d51c360 #2 A=md.reset.reSET U=0 sz=2}
taskAffinity=md.reset.reSET
realActivity=md.reset.reSET/.MainActivity
baseDir=/data/app/md.reset.reSET-1.apk
dataDir=/data/data/md.reset.reSET
stateNotNeeded=false componentSpecified=true mActivityType=0
compat={420dpi} labelRes=0x7f070026 icon=0x7f030000 theme=0x7f09007f
config={1.0 310mcc260mnc en_US ldltr sw411dp w411dp h658dp 420dpi nrml port finger qwerty/v/v -nav/h s.6}
pendingOptions=android.app.ActivityOptions@9d4c4068
launchFailed=false launchCount=0 lastLaunchTime=-52s933ms
haveState=true icicle=Bundle[mParcelledData.dataSize=17952]
state=STOPPED stopped=true delayedResume=false finishing=false
keysPaused=false inHistory=true visible=false sleeping=false idle=true
fullscreen=true noDisplay=false immersive=false launchMode=0
frozenBeforeDestroy=false thumbnailNeeded=false forceNewConfig=false
mActivityType=APPLICATION_ACTIVITY_TYPE
thumbHolder: 9d51c360 bm=null desc=null
waitingVisible=false nowVisible=false lastVisibleTime=-52s550ms
Running activities (most recent first):
TaskRecord{9d51c360 #2 A=md.reset.reSET U=0 sz=2}
Run #1: ActivityRecord{9d3c6908 u0 md.reset.reSET/.MainActivity t2}
Run #0: ActivityRecord{9d5226c8 u0 md.reset.reSET/.MainActivity t2}
mResumedActivity: ActivityRecord{9d3c6908 u0 md.reset.reSET/.MainActivity t2}
mFocusedActivity: ActivityRecord{9d3c6908 u0 md.reset.reSET/.MainActivity t2}
mDismissKeyguardOnNextActivity=false
mFocusedStack=ActivityStack{9d45e478 stackId=1, 1 tasks} mStackState=STACK_STATE_HOME_IN_BACK
mSleepTimeout=false
mCurTaskId=2
mUserStackInFront={}
Recent tasks:
* Recent #0: TaskRecord{9d51c360 #2 A=md.reset.reSET U=0 sz=2}
numActivities=2 rootWasReset=false userId=0 mTaskType=0 numFullscreen=2 mOnTopOfHome=true
affinity=md.reset.reSET
intent={flg=0x10000000 cmp=md.reset.reSET/.MainActivity}
realActivity=md.reset.reSET/.MainActivity
Activities=[ActivityRecord{9d5226c8 u0 md.reset.reSET/.MainActivity t2}, ActivityRecord{9d3c6908 u0 md.reset.reSET/.MainActivity t2}]
askedCompatMode=false
lastThumbnail=null lastDescription=null
lastActiveTime=139653 (inactive for 2s)
* Recent #1: TaskRecord{9d3f1c80 #1 A=com.android.launcher U=0 sz=1}
numActivities=1 rootWasReset=true userId=0 mTaskType=1 numFullscreen=1 mOnTopOfHome=false
affinity=com.android.launcher
intent={act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher}
realActivity=com.android.launcher/com.android.launcher2.Launcher
Activities=[ActivityRecord{9d1182e0 u0 com.android.launcher/com.android.launcher2.Launcher t1}]
askedCompatMode=false
lastThumbnail=android.graphics.Bitmap@9d676ac0 lastDescription=null
lastActiveTime=139627 (inactive for 2s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment