Merge "Catch (and ignore) any timeout exceptions when releasing WakeLock" into oc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3f02441588
@@ -1054,8 +1054,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