title: android anr causing system ui hang
body: <p>Folks</p>
  
  <p>I am having trouble in getting the 'in depth' solution for android ANR's. Here's the thing
  When I install my app the first time There is no issue at all. I log in, use my modules and everything is smooth. When I exit the application BY DIRECTLY CLEARING THE RECENT TABS of my device, the system UI freezes. and throws me an exception (stated below). However, this system UI freeze happens only when the app is running first time after installation. When I take the same case for second run of my app, (even after clearing my app data) the app behaves normally as expected. 
  Help me finding the reason behind this situation</p>
  
  <p><code>E/ActivityManager: ANR in com.android.systemui                           PID: *****
   Reason: Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago.  Wait queue length: 1.  Wait queue head age: 24768.7ms.)
                                                   Load: 13.74 / 21.07 / 24.51
                                                   CPU usage from 0ms to 5389ms later:
                                                     107% 992/system_server: 80% user + 26% kernel / faults: 16718 minor 383 major
                                                     13% 18956/com.android.phone: 6.3% user + 7.4% kernel / faults: 4036 minor 578 major
                                                     0.1% 279/debuggerd: 0% user + 0.1% kernel / faults: 3654 minor 74 major
                                                     8% 18257/com.android.systemui: 3.7% user + 4.2% kernel / faults: 2492</code></p>