summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSungmann Cho <sungmann.cho@navercorp.com>2014-03-02 13:07:14 +0900
committerSungmann Cho <sungmann.cho@navercorp.com>2014-03-02 21:06:59 +0900
commit2bdd8d1d98f43cb3f861e16315f83eff6beed909 (patch)
treee5592d7cea881937360761706e281ad42936a8a0 /src
parentdbad7252e6e64f19f584e9f66596fe9d4eb95586 (diff)
downloadBrowser-2bdd8d1d98f43cb3f861e16315f83eff6beed909.tar.gz
Fix a crash when creating an incognito tab in the quick controls mode.
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: I788969a7a634d3e14653681a8489ff8719df6a4f Signed-off-by: Sungmann Cho <sungmann.cho@navercorp.com>
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/PieControl.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/browser/PieControl.java b/src/com/android/browser/PieControl.java
index a33f8c66..d853808b 100644
--- a/src/com/android/browser/PieControl.java
+++ b/src/com/android/browser/PieControl.java
@@ -19,6 +19,7 @@ package com.android.browser;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
+import android.os.Build;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
@@ -182,8 +183,13 @@ public class PieControl implements PieMenu.PieController, OnClickListener {
mUrl.addItem(makeFiller());
mUrl.addItem(makeFiller());
mPie.addItem(mShowTabs);
- mShowTabs.addItem(mClose);
- mShowTabs.addItem(mIncognito);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ mShowTabs.addItem(makeFiller());
+ mShowTabs.addItem(mClose);
+ } else {
+ mShowTabs.addItem(mClose);
+ mShowTabs.addItem(mIncognito);
+ }
mShowTabs.addItem(mNewTab);
mShowTabs.addItem(makeFiller());
mPie.addItem(mBookmarks);