From 9ab7cb7dae990a6530087c0a6bd0413f04c4eaa5 Mon Sep 17 00:00:00 2001 From: Sungmann Cho Date: Fri, 28 Feb 2014 21:31:43 +0900 Subject: 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 --- src/com/android/browser/PhoneUi.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/com/android/browser/PhoneUi.java') 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) { -- cgit v1.1