diff options
author | Zhihai Xu <zhihaixu@google.com> | 2013-11-15 10:01:15 -0800 |
---|---|---|
committer | Zhihai Xu <zhihaixu@google.com> | 2013-11-15 10:01:15 -0800 |
commit | 50f6cb42218fd50ed2532884d1212e1c9a74c7b2 (patch) | |
tree | d8d4d5a8a087b864d737feca75b315f45584a94b | |
parent | 80be110dc97436264d402adb62f8c1c631fd36e9 (diff) | |
download | android_packages_apps_Bluetooth-50f6cb42218fd50ed2532884d1212e1c9a74c7b2.tar.gz android_packages_apps_Bluetooth-50f6cb42218fd50ed2532884d1212e1c9a74c7b2.tar.bz2 android_packages_apps_Bluetooth-50f6cb42218fd50ed2532884d1212e1c9a74c7b2.zip |
remove a read lock to work around a platform deadlock problem.
remove the lock in getStatefunction to work around a platform
deadlock problem.and also for read access, it is safe to remove
the lock to save CPU power
bug:11655066
Change-Id: Iddc0ada04010d95ae7d5fbc93ab837ebfc025b7a
-rwxr-xr-x | src/com/android/bluetooth/btservice/AdapterProperties.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/bluetooth/btservice/AdapterProperties.java b/src/com/android/bluetooth/btservice/AdapterProperties.java index b05becde1..af8e41632 100755 --- a/src/com/android/bluetooth/btservice/AdapterProperties.java +++ b/src/com/android/bluetooth/btservice/AdapterProperties.java @@ -203,10 +203,9 @@ class AdapterProperties { * @return the mState */ int getState() { - synchronized (mObject) { - if (VDBG) debugLog("State = " + mState); - return mState; - } + /* remove the lock to work around a platform deadlock problem */ + /* and also for read access, it is safe to remove the lock to save CPU power */ + return mState; } /** |