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

Commit e1aeacad authored by Arc Wang's avatar Arc Wang
Browse files

Fix NullPointerException at ManageApplications$ApplicationsAdapter.access

mApplications may be null and should check if it's null before accessing.

Bug: 217872983
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=ManageApplicationsTest
Change-Id: I97a26e26478eb239370cdef8c44342cd7aeb71ee
parent eeb16a30
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -532,12 +532,12 @@ public class ManageApplications extends InstrumentedFragment
        outState.putInt(EXTRA_SORT_ORDER, mSortOrder);
        outState.putInt(EXTRA_FILTER_TYPE, mFilter.getFilterType());
        outState.putBoolean(EXTRA_SHOW_SYSTEM, mShowSystem);
        outState.putBoolean(EXTRA_HAS_ENTRIES, mApplications.mHasReceivedLoadEntries);
        outState.putBoolean(EXTRA_HAS_BRIDGE, mApplications.mHasReceivedBridgeCallback);
        if (mSearchView != null) {
            outState.putBoolean(EXTRA_EXPAND_SEARCH_VIEW, !mSearchView.isIconified());
        }
        if (mApplications != null) {
            outState.putBoolean(EXTRA_HAS_ENTRIES, mApplications.mHasReceivedLoadEntries);
            outState.putBoolean(EXTRA_HAS_BRIDGE, mApplications.mHasReceivedBridgeCallback);
            mApplications.onSaveInstanceState(outState);
        }
    }