diff options
author | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-01-05 13:51:02 +0800 |
---|---|---|
committer | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-01-06 04:50:12 -0800 |
commit | b152ea3ea0d16e3034f81b84f0bd900cd2b66b13 (patch) | |
tree | 973cae0a32ef792d25b43b8159f5aa4e09c8d7ff /src/com/android | |
parent | d2bc7087d1e2474124b286ed9047792a0cadce76 (diff) | |
download | packages_apps_Browser-b152ea3ea0d16e3034f81b84f0bd900cd2b66b13.zip packages_apps_Browser-b152ea3ea0d16e3034f81b84f0bd900cd2b66b13.tar.gz packages_apps_Browser-b152ea3ea0d16e3034f81b84f0bd900cd2b66b13.tar.bz2 |
Browser: Resurface incognito button
The current method of entering incognito mode is too discreet, and
there is no way of knowing how to enter it (long press new tab FAB).
Resurface the incognito button in the tab navigation screen.
Furthermore, on tablets, there is no way to enter incognito mode
AFAIK (or it is ridiculously difficult to find).
On tablets, add an entry to the overflow menu for creating new
incognito tabs.
Change-Id: I1c81d2addd16c11480d978aebf07336307ec694f
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/browser/Controller.java | 4 | ||||
-rw-r--r-- | src/com/android/browser/PhoneUi.java | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index f006986..3382e36 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -1617,6 +1617,10 @@ public class Controller openTabToHomePage(); break; + case R.id.new_incognito_tab_menu_id: + openIncognitoTab(); + break; + case R.id.close_other_tabs_id: closeOtherTabs(); break; diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java index 6707134..d71d9ec 100644 --- a/src/com/android/browser/PhoneUi.java +++ b/src/com/android/browser/PhoneUi.java @@ -184,10 +184,14 @@ public class PhoneUi extends BaseUi { if (info != null) { info.setVisible(false); } - MenuItem newtab = menu.findItem(R.id.new_tab_menu_id); - if (newtab != null && !mUseQuickControls) { - newtab.setVisible(false); - } + MenuItem newTab = menu.findItem(R.id.new_tab_menu_id); + if (newTab != null && !mUseQuickControls) { + newTab.setVisible(false); + } + MenuItem newIncognitoTab = menu.findItem(R.id.new_incognito_tab_menu_id); + if (newIncognitoTab != null && !mUseQuickControls) { + newIncognitoTab.setVisible(false); + } MenuItem closeOthers = menu.findItem(R.id.close_other_tabs_id); if (closeOthers != null) { boolean isLastTab = true; |