Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f79d347a authored by Tony Wickham's avatar Tony Wickham Committed by android-build-merger
Browse files

Add LauncherCallbacks method to add additional search widget options.

am: 775455c4

* commit '775455c4':
  Add LauncherCallbacks method to add additional search widget options.
parents 363da266 775455c4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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.
+5 −0
Original line number Diff line number Diff line
@@ -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;