diff --git a/mobile/android/base/preferences/GeckoPreferenceFragment.java b/mobile/android/base/preferences/GeckoPreferenceFragment.java index 89c51a6f74c..27b9f08759e 100644 --- a/mobile/android/base/preferences/GeckoPreferenceFragment.java +++ b/mobile/android/base/preferences/GeckoPreferenceFragment.java @@ -5,7 +5,6 @@ package org.mozilla.gecko.preferences; -import java.lang.reflect.Field; import java.util.Locale; import org.mozilla.gecko.BrowserLocaleManager; @@ -27,7 +26,6 @@ import android.preference.PreferenceScreen; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; -import android.view.ViewConfiguration; /* A simple implementation of PreferenceFragment for large screen devices * This will strip category headers (so that they aren't shown to the user twice) @@ -198,29 +196,4 @@ public class GeckoPreferenceFragment extends PreferenceFragment { PrefsHelper.removeObserver(mPrefsRequestId); } } - - @Override - public void onAttach(Activity activity) { - super.onAttach(activity); - showOverflowMenu(activity); - } - - /* - * Force the overflow 3-dot menu to be displayed if it isn't already displayed. - * - * This is an ugly hack for 4.0+ Android devices that don't have a dedicated menu button - * because Android does not provide a public API to display the ActionBar overflow menu. - */ - private void showOverflowMenu(Activity activity) { - try { - ViewConfiguration config = ViewConfiguration.get(activity); - Field menuOverflow = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey"); - if (menuOverflow != null) { - menuOverflow.setAccessible(true); - menuOverflow.setBoolean(config, false); - } - } catch (Exception e) { - Log.d(LOGTAG, "Failed to force overflow menu, ignoring."); - } - } -} +} \ No newline at end of file diff --git a/mobile/android/base/resources/menu-v11/preferences_search_menu.xml b/mobile/android/base/resources/menu-v11/preferences_search_menu.xml index 9a3cdc72a88..11fe2cadd3d 100644 --- a/mobile/android/base/resources/menu-v11/preferences_search_menu.xml +++ b/mobile/android/base/resources/menu-v11/preferences_search_menu.xml @@ -4,8 +4,8 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - - +