Skip to content
Commit 64ece0e5 authored by Gurpreet Ghai's avatar Gurpreet Ghai Committed by Andre Eisenbach
Browse files

Fix ANR due to long wait for synchronization lock

Use Case: Repeated BT ON/OFF

Failure: ANR occurs due to UI wait for long time waiting
to acquire thread lock.

Steps: Repeated BT ON/OFF

Root Cause: The synchronized function that updates state
also read paired devices as an additional operation. When
the number of devices is cached list is large, the block
time for other threads waiting for same lock tends to
increase causing ANR.

Fix: Limited the synchronized block to the part where
actual update of local state takes place.

Test: SNS Testing

Bug: 35412140

Change-Id: I69ff9f8a032b3772bf3d048d8db70181319ad31d
parent 04e5e633
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment