Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f024415 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Catch (and ignore) any timeout exceptions when releasing WakeLock" into oc-mr1-dev

parents 0a1ae1bc 3cceb258
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1054,8 +1054,15 @@ public class GnssLocationProvider implements LocationProviderInterface {
                // download tasks overrun.
                synchronized (mLock) {
                    if (mDownloadXtraWakeLock.isHeld()) {
                        // 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()");