Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +19 −12 Original line number Diff line number Diff line Loading @@ -415,10 +415,14 @@ public class AdapterService extends Service { mPendingAlarm = null; } // This wake lock release may also be called concurrently by // {@link #releaseWakeLock(String lockName)}, so a synchronization is needed here. synchronized (this) { if (mWakeLock != null) { mWakeLock.release(); mWakeLock = null; } } if (mAdapterStateMachine != null) { mAdapterStateMachine.doQuit(); Loading Loading @@ -1590,9 +1594,11 @@ public class AdapterService extends Service { } // This function is called from JNI. It allows native code to release a wake lock acquired // by |acquireWakeLock|. If the wake lock is not held, this function returns failure. See // the comment for |acquireWakeLock| for an explanation of the interface. // by |acquireWakeLock|. If the wake lock is not held, this function returns failure. // Note that the release() call is also invoked by {@link #cleanup()} so a synchronization is // needed here. See the comment for |acquireWakeLock| for an explanation of the interface. private boolean releaseWakeLock(String lockName) { synchronized (this) { if (mWakeLock == null) { errorLog("Repeated wake lock release; aborting release: " + lockName); return false; Loading @@ -1601,6 +1607,7 @@ public class AdapterService extends Service { mWakeLock.release(); mWakeLock = null; mWakeLockName = null; } return true; } Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +19 −12 Original line number Diff line number Diff line Loading @@ -415,10 +415,14 @@ public class AdapterService extends Service { mPendingAlarm = null; } // This wake lock release may also be called concurrently by // {@link #releaseWakeLock(String lockName)}, so a synchronization is needed here. synchronized (this) { if (mWakeLock != null) { mWakeLock.release(); mWakeLock = null; } } if (mAdapterStateMachine != null) { mAdapterStateMachine.doQuit(); Loading Loading @@ -1590,9 +1594,11 @@ public class AdapterService extends Service { } // This function is called from JNI. It allows native code to release a wake lock acquired // by |acquireWakeLock|. If the wake lock is not held, this function returns failure. See // the comment for |acquireWakeLock| for an explanation of the interface. // by |acquireWakeLock|. If the wake lock is not held, this function returns failure. // Note that the release() call is also invoked by {@link #cleanup()} so a synchronization is // needed here. See the comment for |acquireWakeLock| for an explanation of the interface. private boolean releaseWakeLock(String lockName) { synchronized (this) { if (mWakeLock == null) { errorLog("Repeated wake lock release; aborting release: " + lockName); return false; Loading @@ -1601,6 +1607,7 @@ public class AdapterService extends Service { mWakeLock.release(); mWakeLock = null; mWakeLockName = null; } return true; } Loading