Android-L issue: onBackpressed when using FLAG_ACTIVITY_REORDER_TO_FRONT to launch previous activity & freezes app for sometime -
my application has strange behaviour
i proved issue following steps on android l o.s. devices nexus 7 or moto g.
- the app starts activity a, shows button called "launch b".
- press button -- executes startactivity(flag_activity_reorder_to_front, activityb.class).
- activity b becomes active, ui , backhand loading operation on ui thread.
- after pressing activity b, onbackpressed of activity b, executes startactivity(flag_activity_reorder_to_front, activitya.class).
- activity a's onresume() called expected , looks fine (i can see activity content again).
- press device's key , app freezes around 10 seconds or more , comes out of application. without calling onpause(), ondestroy(). (so may anr logs)
- sometime or may repeating same above step 4-5 times unfortunately force close googlequicksearchbox
after looking @ system logs: found important logs:
e/activitymanager( 958): reason: input dispatching timed out (waiting because no window has focus there focused application may add window when finishes starting up.)
important logs: have look
d/sfperftracer( 278): layers: (2:12) (focusedstackframe (0xb8fa6b48): 0:637)* (dimlayer (0xb8fa95c0): 0:14)* (dimlayer (0xb8fe63b0): 0:510)* (dimlayer (0xb8fb7228): 0:213)* (statusbar (0xb8fd10c0): 0:5421)* (com.android.systemui.imagewallpaper (0xb8fd6a28): 0:454)* (navigationbar (0xb8fbaa18): 8:744) (com.android.systemui/com.android.systemui.recents.recentsactivity (0xb8fbbca8): 0:86)- (com.abc.myapp/com.mypackage.abc.mainactivity (0xb8fd3560): 0:25)- (thumbnail anim (0xb8ff72b0): 0:12)- (com.abc.myapp/com.mypackage.abc_etv.etvlaunchactivity (0xb8ffb570): 14:34) i/launchcheckinhandler( 958): displayed com.abc.myapp/com.mypackage.abc.mainactivity,wp,wa,286 i/windowmanager( 958): input event dispatching timed out sending application appwindowtoken{23d5f06c token=token{299ea51f activityrecord{2f0940be u0 com.google.android.googlequicksearchbox/com.google.android.launcher.gel t4}}}. reason: waiting because no window has focus there focused application may add window when finishes starting up. i/windowmanager( 958): input event dispatching timed out sending application appwindowtoken{23d5f06c token=token{299ea51f activityrecord{2f0940be u0 com.google.android.googlequicksearchbox/com.google.android.launcher.gel t4}}}. reason: waiting because no window has focus there focused application may add window when finishes starting up. e/activitymanager( 958): anr in com.google.android.googlequicksearchbox (com.google.android.googlequicksearchbox/com.google.android.launcher.gel) e/activitymanager( 958): pid: 655 e/activitymanager( 958): reason: input dispatching timed out (waiting because no window has focus there focused application may add window when finishes starting up.)
Comments
Post a Comment