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

Commit 62fb56f2 authored by Matthew Xie's avatar Matthew Xie
Browse files

Check null mHandler condition before invoking method on it

There is a path that clean up is called before stop call on HealthService
mHandler could be set to null
bug 16784750

Change-Id: Ie931fa502cf82d21c6bf97a8dc7035e5a1ed4b2e
parent a08ff547
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -100,11 +100,13 @@ public class HealthService extends ProfileService {
    }

    protected boolean stop() {
        if (mHandler != null) {
            mHandler.removeCallbacksAndMessages(null);
            Looper looper = mHandler.getLooper();
            if (looper != null) {
                looper.quit();
            }
        }
        cleanupApps();
        return true;
    }