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.
|
// download tasks overrun.
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
if (mDownloadXtraWakeLock.isHeld()) {
|
if (mDownloadXtraWakeLock.isHeld()) {
|
||||||
|
// This wakelock may have time-out, if a timeout was specified.
|
||||||
|
// Catch (and ignore) any timeout exceptions.
|
||||||
|
try {
|
||||||
mDownloadXtraWakeLock.release();
|
mDownloadXtraWakeLock.release();
|
||||||
if (DEBUG) Log.d(TAG, "WakeLock released by handleDownloadXtraData()");
|
if (DEBUG) Log.d(TAG, "WakeLock released by handleDownloadXtraData()");
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.i(TAG, "Wakelock timeout & release race exception in "
|
||||||
|
+ "handleDownloadXtraData()", e);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG, "WakeLock expired before release in "
|
Log.e(TAG, "WakeLock expired before release in "
|
||||||
+ "handleDownloadXtraData()");
|
+ "handleDownloadXtraData()");
|
||||||
|
|||||||
Reference in New Issue
Block a user