mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Add LauncherCallbacks method to add additional search widget options.
Bug: 25000458 Change-Id: I5e8d48617568569bc6e4f284749c3ed9fb20a68f
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user