DO NOT MERGE ANYWHERE
(cherrpy pick of commit cc8fcf2efd66afdaa900b4d27e1eb784e8d40752). Don't open drawer when back is pressed after being launched externally. Change-Id: I3e8afd68c33b519dd5d6b27e3fa94653c2537612 Fixes: 30743235
This commit is contained in:
@@ -401,8 +401,13 @@ public class FilesActivity extends BaseActivity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open the Close drawer if it is closed and we're at the top of a root.
|
final Intent intent = getIntent();
|
||||||
if (size <= 1) {
|
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);
|
mDrawer.setOpen(true);
|
||||||
// Remember so we don't just close it again if back is pressed again.
|
// Remember so we don't just close it again if back is pressed again.
|
||||||
mDrawerLastFiddled = System.currentTimeMillis();
|
mDrawerLastFiddled = System.currentTimeMillis();
|
||||||
|
|||||||
Reference in New Issue
Block a user