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

Commit 3b7dbcec authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Fix NPE in ManageApps when switching orientation.

Bug: 6394351
Change-Id: Ia66ab18195325b024223cdbce19756150e1d6c8c
parent e42b999e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -759,6 +759,9 @@ public class ManageApplications extends Fragment implements
    static final int VIEW_RUNNING = 2;

    void updateStorageUsage() {
        // Fragment view not yet created?
        if (mRootView == null) return;

        if (mCurView == VIEW_RUNNING) {
            return;
        }
@@ -939,6 +942,8 @@ public class ManageApplications extends Fragment implements
        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {
            mContainerService = IMediaContainerService.Stub.asInterface(service);
            // Make sure this callback didn't come at an inopportune time.
            if (getActivity() == null) return;
            updateStorageUsage();
        }