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

Commit 4d45697f authored by Felipe Leme's avatar Felipe Leme Committed by Steve McKay
Browse files

Don't open drawer when back is pressed after being launched externally.

BUG: 30743235

Change-Id: I96da38aa4c74aae5743c454dc15ab6a12886a321
(cherry picked from commit cc8fcf2e)
parent cfbc7abe
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -416,8 +416,13 @@ public class FilesActivity extends BaseActivity {
                return true;
            }

            // Open the Close drawer if it is closed and we're at the top of a root.
            if (size <= 1) {
            final Intent intent = getIntent();
            final boolean launchedExternally = intent != null && intent.getData() != null
                    && mState.action == State.ACTION_BROWSE;

            // Open the Close drawer if it is closed and we're at the top of a root, but only when
            // not launched by another app.
            if (size <= 1 && !launchedExternally) {
                mDrawer.setOpen(true);
                // Remember so we don't just close it again if back is pressed again.
                mDrawerLastFiddled = System.currentTimeMillis();