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

Commit 7f492ee8 authored by BadDaemon's avatar BadDaemon Committed by Steve Kondik
Browse files

SystemUI: Fix NPE

Should fix
"Attempt to read from field
'int com.android.systemui.recents.RecentsConfiguration.maxNumTasksToLoad'
on a null object reference"

Change-Id: I05e36b64db610249dc2be55a95d1bd8dae7bfb9c
parent ed3bbc3a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -175,6 +175,14 @@ public class RecentsConfiguration {
        return sInstance;
    }

    /** Returns the current recents configuration or creates and populates it if required */
    public static RecentsConfiguration getInstance(Context context, SystemServicesProxy ssp) {
        if (sInstance == null) {
            sInstance = reinitialize(context, ssp);
        }
        return sInstance;
    }

    /** Updates the state, given the specified context */
    void update(Context context) {
        Resources res = context.getResources();
+1 −1
Original line number Diff line number Diff line
@@ -458,7 +458,7 @@ public class RecentsTaskLoader {

    /** Creates a new plan for loading the recent tasks. */
    public RecentsTaskLoadPlan createLoadPlan(Context context) {
        RecentsConfiguration config = RecentsConfiguration.getInstance();
        RecentsConfiguration config = RecentsConfiguration.getInstance(context, mSystemServicesProxy);
        RecentsTaskLoadPlan plan = new RecentsTaskLoadPlan(context, config, mSystemServicesProxy);
        return plan;
    }