summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorGuobin Zhang <guobin.zhang@intel.com>2014-03-07 17:47:10 +0800
committerWale Ogunwale <ogunwale@google.com>2014-11-26 13:23:30 -0800
commit04d0bb6e933519d2287bef1c6ce2482c0dc61493 (patch)
tree2c5d6c1efce6b58dd32cc841965f0ded31da783b /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parentb802cd6767c43a85645279a67bb41320058fdb60 (diff)
ANR caused by incorrect cleanup in BroadcastQueue.
Two broadcasts could be sent to the same app simultaneously: one foreground, one background. For example, LOCALE_CHANGED and PACKAGE_CHANGED are delievered to com.android.vending at the same time. 1. AMS started new vending process to handle LOCALE_CHANGED. And set app.curReceiver = LOCALE_CHANGED. 2. Before LOCALE_CHANGED is handled by vending process, PACKAGE_CHANGED was delievered to vending process too. AMS set app.curReceiver = PACKAGE_CHANGED. Bad! 3. Vending process finished handling LOCALE_CHANGED. AMS clear app.curReceiver = NULL. Bad! And Vending process killed itself without handling PACKAGE_CHANGED. 4. AMS known vending process has died, but didn't know that BgBroadcastQueue was still waiting for finish message for PACKAGE_CHANGED. At last, BgBroadcastQueue reported ANR for PACKAGE_CHANGED. This patch adds protection before clearing app.curReceiver, only set to NULL if the finishing receiver = app.curReceiver So handleAppDied would know that PACKAGE_CHANGED was not finished yet, it will abort the broadcast and continue. Change-Id: Ic4f31b35e21823d4a3c27712391ecbede213a494 Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions