diff options
author | Sungmann Cho <sungmann.cho@navercorp.com> | 2014-02-28 21:31:43 +0900 |
---|---|---|
committer | Sungmann Cho <sungmann.cho@navercorp.com> | 2014-02-28 21:31:43 +0900 |
commit | 9ab7cb7dae990a6530087c0a6bd0413f04c4eaa5 (patch) | |
tree | 4211b785fedddff9520f7dd7709162ec1236030e /src/com/android/browser/PhoneUi.java | |
parent | c34de1799596e1659c5edea61f89e807c8119705 (diff) | |
download | packages_apps_Browser-9ab7cb7dae990a6530087c0a6bd0413f04c4eaa5.zip packages_apps_Browser-9ab7cb7dae990a6530087c0a6bd0413f04c4eaa5.tar.gz packages_apps_Browser-9ab7cb7dae990a6530087c0a6bd0413f04c4eaa5.tar.bz2 |
Fix a crash when creating an incognito tab.
The KitKat's WebView doesn't support an incognito mode.
Opening an incognito tab leads to a crash.
So it would be nice to hide the menu itself in the KitKat or later.
Change-Id: I9853df92f3a4e404b528640776725b34b675fee5
Signed-off-by: Sungmann Cho <sungmann.cho@navercorp.com>
Diffstat (limited to 'src/com/android/browser/PhoneUi.java')
-rw-r--r-- | src/com/android/browser/PhoneUi.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java index 89eae70..e5c45df 100644 --- a/src/com/android/browser/PhoneUi.java +++ b/src/com/android/browser/PhoneUi.java @@ -25,6 +25,7 @@ import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; +import android.os.Build; import android.os.Message; import android.util.Log; import android.util.TypedValue; @@ -189,7 +190,8 @@ public class PhoneUi extends BaseUi { } MenuItem incognito = menu.findItem(R.id.incognito_menu_id); if (incognito != null) { - incognito.setVisible(showingNavScreen() || mUseQuickControls); + incognito.setVisible(!(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) + && (showingNavScreen() || mUseQuickControls)); } MenuItem closeOthers = menu.findItem(R.id.close_other_tabs_id); if (closeOthers != null) { |