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

Commit 274eec31 authored by Jiangyou Li's avatar Jiangyou Li Committed by jiangyou li
Browse files

Fix NPE in BootReceiver

BootReceiver is depend on DropboxManagerService.
If native crash occured before DropboxManagerService start,
BootReceiver.addTombstoneToDropBox will occus NPE due to DropboxManager is null.
So it need delay watch the tombstone file.

Change-Id: I188f18663ac6966d82b97b77e8fed72238adf683
parent 6106318c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -92,12 +92,15 @@ public final class NativeTombstoneManager {
        mHandler = thread.getThreadHandler();

        mWatcher = new TombstoneWatcher();
        mWatcher.startWatching();
    }

    void onSystemReady() {
        registerForUserRemoval();
        registerForPackageRemoval();
        // TombstoneWatcher depends on DropboxManagerService.
        // DropboxManagerService started before systemReady.
        // So it is good to call startWatching here.
        mWatcher.startWatching();

        // Scan existing tombstones.
        mHandler.post(() -> {