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

Commit dae436f7 authored by Jing Ji's avatar Jing Ji Committed by Android (Google) Code Review
Browse files

Merge "Don't hold the battery stats lock while waiting for completion"

parents b4860201 4835023e
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -276,7 +276,6 @@ public final class BatteryStatsService extends IBatteryStats.Stub
    }

    private void awaitCompletion() {
        synchronized (mLock) {
        final CountDownLatch latch = new CountDownLatch(1);
        mHandler.post(() -> {
            latch.countDown();
@@ -286,7 +285,6 @@ public final class BatteryStatsService extends IBatteryStats.Stub
        } catch (InterruptedException e) {
        }
    }
    }

    /**
     * At the time when the constructor runs, the power manager has not yet been