Add LauncherCallbacks method to add additional search widget options.

am: 775455c4a8

* commit '775455c4a8266655bf43b943e969d42ac32609ec':
  Add LauncherCallbacks method to add additional search widget options.
This commit is contained in:
Tony Wickham
2015-10-16 20:40:34 +00:00
committed by android-build-merger
3 changed files with 10 additions and 0 deletions

View File

@@ -3632,6 +3632,10 @@ public class Launcher extends Activity
opts.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH, maxWidth);
opts.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, minWidth);
if (mLauncherCallbacks != null) {
opts.putAll(mLauncherCallbacks.getAdditionalSearchWidgetOptions());
}
SharedPreferences sp = getSharedPreferences(
LauncherAppState.getSharedPreferencesKey(), MODE_PRIVATE);
int widgetId = sp.getInt(QSB_WIDGET_ID, -1);

View File

@@ -83,6 +83,7 @@ public interface LauncherCallbacks {
public boolean hasCustomContentToLeft();
public void populateCustomContentContainer();
public View getQsbBar();
public Bundle getAdditionalSearchWidgetOptions();
/*
* Extensions points for adding / replacing some other aspects of the Launcher experience.

View File

@@ -252,6 +252,11 @@ public class LauncherExtension extends Launcher {
return mLauncherOverlay.getSearchBox();
}
@Override
public Bundle getAdditionalSearchWidgetOptions() {
return new Bundle();
}
@Override
public Intent getFirstRunActivity() {
return null;