From 62fec276ce00b363f15af16a418ee5feaa8d194f Mon Sep 17 00:00:00 2001 From: Margaret Leibovic Date: Thu, 15 Mar 2012 10:01:11 -0700 Subject: [PATCH] Bug 732104 - (Part 1) Make sure BACK always takes you up a folder level. r=mfinkle --- mobile/android/base/AwesomeBar.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mobile/android/base/AwesomeBar.java b/mobile/android/base/AwesomeBar.java index b3600f9fe61..62c701b7a50 100644 --- a/mobile/android/base/AwesomeBar.java +++ b/mobile/android/base/AwesomeBar.java @@ -422,6 +422,17 @@ public class AwesomeBar extends Activity implements GeckoEventListener { GeckoAppShell.unregisterGeckoEventListener("SearchEngines:Data", this); } + @Override + public void onBackPressed() { + // Let mAwesomeTabs try to handle the back press, since we may be in a + // bookmarks sub-folder. + if (mAwesomeTabs.onBackPressed()) + return; + + // Otherwise, just exit the awesome screen + cancelAndFinish(); + } + private class ContextMenuSubject { public int id; public String url;