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

Commit 49a7ddde authored by Aditya Singh's avatar Aditya Singh Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE in onCreate method of LoaderCallbacks." into main

parents f7d6451e a6d50df0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -883,6 +883,12 @@ public abstract class AbstractActionHandler<T extends FragmentActivity & CommonA
        public Loader<DirectoryResult> onCreateLoader(int id, Bundle args) {
            Context context = mActivity;

            // If document stack is not initialized, i.e. if the root is null, create "Recents" root
            // with the selected user.
            if (!mState.stack.isInitialized()) {
                mState.stack.changeRoot(mActivity.getCurrentRoot());
            }

            if (mState.stack.isRecents()) {
                final LockingContentObserver observer = new LockingContentObserver(
                        mContentLock, AbstractActionHandler.this::loadDocumentsForCurrentStack);