summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/Allocation.java
diff options
context:
space:
mode:
authorriddle_hsu <riddle_hsu@htc.com>2014-12-23 22:52:34 +0800
committerriddle_hsu <riddle_hsu@htc.com>2014-12-23 22:52:34 +0800
commit9ac9609f4d078dc0d7fe7c703fb88d20fd629bfe (patch)
tree5d11d1e306e61b6ef4b41992e95b1afceced9973 /rs/java/android/renderscript/Allocation.java
parent2b20efa728f79ef9322930aefbbf0483a578ee74 (diff)
[ActivityManager] Prevent application holding AMS lock
Symptom: Watchdog timeout. Reproduce code: String action = "lets.deadlock"; Uri baseUri = Uri.parse("content://i.am.bad"); Uri uri = ContentUris.withAppendedId(baseUri, 1); Intent intent = new Intent(action, uri); sendStickyBroadcast(intent); IntentFilter filter = new IntentFilter(action); filter.addDataScheme(baseUri.getScheme()); filter.addDataAuthority(baseUri.getAuthority(), null); filter.addDataPath(uri.getPath(), 0); registerReceiver(null, filter); In target provider's getType: Invoke AMS function will result deadlock. Or sleep a long time will also trigger watchdog timeout. Root Cause: If broadcast is sticky with content scheme intent. Register receiver will trigger access provider when matching intent with IntentFilter, and it executes in ActivityManagerService's lock. Solution: Obtain necessary data to local to split lock block. Change-Id: I0fb94472cdc478997e40ba2a60a988c5f53badb2
Diffstat (limited to 'rs/java/android/renderscript/Allocation.java')
0 files changed, 0 insertions, 0 deletions