Does rooting an android device effect its activity life cycle -
i wrote test application testing life cycle methods. application starting activity 'b' activity 'a'. learned in developer's manual, 'a' should stop , 'b' gets created, device has different behavior, 'a' pauses , 'b' gets created when 'b' popped of stack onresume() method of 'a' getting called. ran same application on dad's device , gives expected result. question rooting alter life cycle of device, if there way can make "normal" without un-rooting device. in advance.
the screen shot of log file here
edit: device , moto x first generation(xt1052) runs on android 4.4.4, dad's device, moto g first generation runs on android 5.0,2
your question talks 2 distinct life cycle events.
- activity starts activity b. here manual says:
when activity starts activity b, activity stopped, system retains state (such scroll position , text entered forms). if user presses button while in activity b, activity resumes state restored.
- from activity b, user presses popping activity stack:
if user presses button, current activity popped stack , destroyed. previous activity in stack resumed. when activity destroyed, system not retain activity's state.
it unclear 1 of these saying not seem operate correctly on rooted device. however, suspect conflating 2 , things work correctly.
edit:
your comment indicates confusion language used in manual versus names of lifecycle methods. when manual says (in case 1) activity stopped, doesn't mean onstop(). context of description indicates onpause() called - if user presses button, activity resumes suggesting onresume() called. transition onstop() , require transition onrestart() in order resume application, stack need lose more context - in user exits running application (and no longer makes sense keep it's stack) , starts another.
Comments
Post a Comment