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

Commit 379879c1 authored by kwaky's avatar kwaky
Browse files

Make CarStatusBar a Singleton

NPE was caused when we were pointing to a seprate instance of
CarStatusBar where mBiometricUnlockController was null.

Bug: 143239523
Test: Manual -- First, flash the master branch on Hawk. Second, exit
the Quick Settings page. Third, reboot Hawk and verify that it does not
crash.

Change-Id: Ic24eed1759dfaa7072a41d5fd7364c3cee71851b
parent 4f27cd6f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -137,12 +137,14 @@ import java.util.Map;

import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;

import dagger.Lazy;

/**
 * A status bar tailored for the automotive use case.
 */
@Singleton
public class CarStatusBar extends StatusBar implements CarBatteryController.BatteryViewHandler {
    private static final String TAG = "CarStatusBar";
    // used to calculate how fast to open or close the window