diff --git a/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java index 15529897b6..67a00a3709 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -1019,13 +1019,13 @@ public class FileDisplayActivity extends FileActivity @SuppressFBWarnings("ITC_INHERITANCE_TYPE_CHECKING") @Override public void onBackPressed() { - if (isDrawerOpen()) { - super.onBackPressed(); + if (isSearchOpen()) { + resetSearchAction(); return; } - if (isSearchOpen()) { - resetSearchAction(); + if (isDrawerOpen()) { + super.onBackPressed(); return; }