Add LauncherCallbacks method to add additional search widget options.

Bug: 25000458
Change-Id: I5e8d48617568569bc6e4f284749c3ed9fb20a68f
This commit is contained in:
Tony Wickham
2015-10-16 09:49:32 -07:00
parent 28c6b963d4
commit 775455c4a8
3 changed files with 10 additions and 0 deletions

View File

@@ -3553,6 +3553,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;