Catch (and ignore) any timeout exceptions when releasing WakeLock
Bug: 64424030 Change-Id: I4f1f71bc4f16d1485b360aec70c82818aa7510fb
This commit is contained in:
@@ -1059,8 +1059,15 @@ public class GnssLocationProvider implements LocationProviderInterface {
|
||||
// download tasks overrun.
|
||||
synchronized (mLock) {
|
||||
if (mDownloadXtraWakeLock.isHeld()) {
|
||||
mDownloadXtraWakeLock.release();
|
||||
if (DEBUG) Log.d(TAG, "WakeLock released by handleDownloadXtraData()");
|
||||
// This wakelock may have time-out, if a timeout was specified.
|
||||
// Catch (and ignore) any timeout exceptions.
|
||||
try {
|
||||
mDownloadXtraWakeLock.release();
|
||||
if (DEBUG) Log.d(TAG, "WakeLock released by handleDownloadXtraData()");
|
||||
} catch (Exception e) {
|
||||
Log.i(TAG, "Wakelock timeout & release race exception in "
|
||||
+ "handleDownloadXtraData()", e);
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "WakeLock expired before release in "
|
||||
+ "handleDownloadXtraData()");
|
||||
|
||||
Reference in New Issue
Block a user