summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-07-14 13:47:29 -0700
committerMichael Kolb <kolby@google.com>2011-07-28 14:53:21 -0700
commitb2e91fdb56c13452c6c5e5fd39ce17e7db323bdc (patch)
tree62b85c0aad2ea9642226ab7bf5af560e19157513
parentd92922c4011b22f82ca0f69437169cf4599c51e3 (diff)
downloadpackages_apps_Browser-b2e91fdb56c13452c6c5e5fd39ce17e7db323bdc.tar.gz
packages_apps_Browser-b2e91fdb56c13452c6c5e5fd39ce17e7db323bdc.tar.bz2
packages_apps_Browser-b2e91fdb56c13452c6c5e5fd39ce17e7db323bdc.zip
fix url menu
Bug: 5003525 removed old context menu Change-Id: Iec6298caf799fa783f6147a153544cdac18cc3c3
-rw-r--r--res/menu/title_context.xml26
-rw-r--r--src/com/android/browser/NavigationBarBase.java2
-rw-r--r--src/com/android/browser/NavigationBarPhone.java8
-rw-r--r--src/com/android/browser/XLargeUi.java2
4 files changed, 2 insertions, 36 deletions
diff --git a/res/menu/title_context.xml b/res/menu/title_context.xml
deleted file mode 100644
index a60f102b5..000000000
--- a/res/menu/title_context.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <!-- These are for the context menu for the title bar. Note that we need a
- different item from share_page_menu_id, which looks at the top
- window (possibly a subwindow), because this should be the main
- window.-->
- <item android:id="@+id/title_bar_share_page_url"
- android:title="@string/share_page"/>
- <item android:id="@+id/title_bar_copy_page_url"
- android:title="@string/copy_page_url"/>
-</menu>
diff --git a/src/com/android/browser/NavigationBarBase.java b/src/com/android/browser/NavigationBarBase.java
index a0593522d..724dcc84e 100644
--- a/src/com/android/browser/NavigationBarBase.java
+++ b/src/com/android/browser/NavigationBarBase.java
@@ -74,7 +74,6 @@ public class NavigationBarBase extends LinearLayout implements OnClickListener,
mFavicon = (ImageView) findViewById(R.id.favicon);
mUrlInput = (UrlInputView) findViewById(R.id.url);
mUrlInput.setUrlInputListener(this);
- mUrlInput.setController(mUiController);
mUrlInput.setOnFocusChangeListener(this);
mUrlInput.setSelectAllOnFocus(true);
mUrlInput.addQueryTextWatcher(this);
@@ -84,6 +83,7 @@ public class NavigationBarBase extends LinearLayout implements OnClickListener,
mTitleBar = titleBar;
mBaseUi = mTitleBar.getUi();
mUiController = mTitleBar.getUiController();
+ mUrlInput.setController(mUiController);
}
public void setLock(Drawable d) {
diff --git a/src/com/android/browser/NavigationBarPhone.java b/src/com/android/browser/NavigationBarPhone.java
index 400b6955a..388c262a9 100644
--- a/src/com/android/browser/NavigationBarPhone.java
+++ b/src/com/android/browser/NavigationBarPhone.java
@@ -86,14 +86,6 @@ public class NavigationBarPhone extends NavigationBarBase implements
}
@Override
- public void createContextMenu(ContextMenu menu) {
- Activity activity = mBaseUi.getActivity();
- MenuInflater inflater = activity.getMenuInflater();
- inflater.inflate(R.menu.title_context, menu);
- activity.onCreateContextMenu(menu, this, null);
- }
-
- @Override
protected void setSearchMode(boolean voiceSearchEnabled) {
boolean showvoicebutton = voiceSearchEnabled &&
mUiController.supportsVoiceSearch();
diff --git a/src/com/android/browser/XLargeUi.java b/src/com/android/browser/XLargeUi.java
index aeba7cffb..301e09f4a 100644
--- a/src/com/android/browser/XLargeUi.java
+++ b/src/com/android/browser/XLargeUi.java
@@ -253,7 +253,7 @@ public class XLargeUi extends BaseUi {
@Override
public void onActionModeStarted(ActionMode mode) {
if (!mTitleBar.isEditingUrl()) {
- // hide the fake title bar when CAB is shown
+ // hide the title bar when CAB is shown
hideTitleBar();
}
}