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

Commit 21431c63 authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

Catch RejectedExecutionException in BatteryExternalStatsWorker

Bug: 293566053
Test: monitor crash cluster 2768503370795408875
Change-Id: Ib978947329f10765367d64f5ab2b6b583be8e388
parent 89313266
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -386,7 +386,11 @@ public class BatteryExternalStatsWorker implements BatteryStatsImpl.ExternalStat
            }
        }

        try {
            return mExecutorService.schedule(syncRunnable, delayMillis, TimeUnit.MILLISECONDS);
        } catch (RejectedExecutionException e) {
            return CompletableFuture.failedFuture(e);
        }
    }

    public synchronized Future<?> scheduleWrite() {