author | ronak <ronak9896@gmail.com> |
Thu, 26 Feb 2015 06:17:00 -0500 | |
changeset 231840 | 28141fe89b4c2014beb9ca6893f307dfea571587 |
parent 231839 | 20661f32e7e7b3f2cd131c8074cf99ffa1c8516b |
child 231841 | cd1f281e562c0f7c5ea68359b4b9f0ea39cd37e0 |
push id | 28361 |
push user | ryanvm@gmail.com |
push date | Wed, 04 Mar 2015 21:23:52 +0000 |
treeherder | mozilla-central@6b08ec560bec [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | wesj |
bugs | 1122767 |
milestone | 39.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
mobile/android/search/java/org/mozilla/search/SearchWidget.java | file | annotate | diff | comparison | revisions |
--- a/mobile/android/search/java/org/mozilla/search/SearchWidget.java +++ b/mobile/android/search/java/org/mozilla/search/SearchWidget.java @@ -97,32 +97,19 @@ public class SearchWidget extends AppWid context.startActivity(redirect); } super.onReceive(context, intent); } // Utility to create the view for this widget and attach any event listeners to it private void addView(final AppWidgetManager manager, final Context context, final int id, final Bundle options) { - final boolean isKeyguard; - if (options != null) { - final int category = options.getInt(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY, -1); - isKeyguard = category == AppWidgetProviderInfo.WIDGET_CATEGORY_KEYGUARD; - } else { - isKeyguard = false; - } + final RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.search_widget); - final RemoteViews views; - if (isKeyguard) { - views = new RemoteViews(context.getPackageName(), R.layout.keyguard_widget); - } else { - views = new RemoteViews(context.getPackageName(), R.layout.search_widget); - addClickIntent(context, views, R.id.search_button, ACTION_LAUNCH_SEARCH); - } - + addClickIntent(context, views, R.id.search_button, ACTION_LAUNCH_SEARCH); addClickIntent(context, views, R.id.new_tab_button, ACTION_LAUNCH_NEW_TAB); // Clicking the logo also launches the browser addClickIntent(context, views, R.id.logo_button, ACTION_LAUNCH_BROWSER); manager.updateAppWidget(id, views); } // Utility for adding a pending intent to be fired when a View is clicked.