Android-L问题:在使用标志“活动”时按下“重新排序”按钮以启动上一个活动&;将应用程序冻结一段时间

Android-L问题:在使用标志“活动”时按下“重新排序”按钮以启动上一个活动&;将应用程序冻结一段时间,android,Android,我的申请有一种奇怪的行为 我在Nexus7或MotoG等Android L.O.S.设备上通过以下步骤证明了这个问题 该应用程序以活动A开始,只显示一个名为“启动B”的按钮 按下此按钮——这将执行开始活动(将活动重新排序到活动B.class的前端) 活动B变为活动状态,在UI线程上执行一些UI和反手加载操作 从活动B按back后,在活动B按back后,将执行startActivity(将标记\活动\重新排序\到\前面,ActivityA.class) 活动A的onResume()按预期调用,一切

我的申请有一种奇怪的行为

我在Nexus7或MotoG等Android L.O.S.设备上通过以下步骤证明了这个问题

  • 该应用程序以活动A开始,只显示一个名为“启动B”的按钮
  • 按下此按钮——这将执行开始活动(将活动重新排序到活动B.class的前端)
  • 活动B变为活动状态,在UI线程上执行一些UI和反手加载操作
  • 从活动B按back后,在活动B按back后,将执行startActivity(将标记\活动\重新排序\到\前面,ActivityA.class)
  • 活动A的onResume()按预期调用,一切正常(我可以再次看到活动A的内容)
  • 按下设备的后退键,应用程序冻结约10秒或更长时间,然后退出应用程序。不调用onPause(),onDestroy()。 (因此可能是具有特定日志的anr)
  • 有时,或者可能重复上述步骤4-5次,不幸的是,这也会迫使谷歌快速搜索框关闭
  • 查看系统日志后: 找到一些重要日志:

    E/ActivityManager(  958): Reason: Input dispatching timed out (Waiting because no window has focus but there is a focused application that may eventually add a window when it finishes starting up.)
    
    重要日志:看一看

    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 to 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 but there is a focused application that may eventually add a window when it finishes starting up.
    
    I/WindowManager(  958): Input event dispatching timed out sending to 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 but there is a focused application that may eventually add a window when it 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 but there is a focused application that may eventually add a window when it finishes starting up.)
    

    顺便说一句,这和和和是同一个问题