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

Commit ee0b1216 authored by Winson Chung's avatar Winson Chung
Browse files

Generalizing Recents widget category to Search box. (Bug 17334589)

Change-Id: Id62398255799844cc89affcb4bafc86b6479dad0
parent a4490181
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5859,7 +5859,7 @@ package android.appwidget {
    field public static final int RESIZE_VERTICAL = 2; // 0x2
    field public static final int WIDGET_CATEGORY_HOME_SCREEN = 1; // 0x1
    field public static final int WIDGET_CATEGORY_KEYGUARD = 2; // 0x2
    field public static final int WIDGET_CATEGORY_RECENTS = 4; // 0x4
    field public static final int WIDGET_CATEGORY_SEARCHBOX = 4; // 0x4
    field public int autoAdvanceViewId;
    field public android.content.ComponentName configure;
    field public int icon;
+1 −1
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ public class AppWidgetManager {
     * this widget. Can have the value {@link
     * AppWidgetProviderInfo#WIDGET_CATEGORY_HOME_SCREEN} or {@link
     * AppWidgetProviderInfo#WIDGET_CATEGORY_KEYGUARD} or {@link
     * AppWidgetProviderInfo#WIDGET_CATEGORY_RECENTS}.
     * AppWidgetProviderInfo#WIDGET_CATEGORY_SEARCHBOX}.
     */
    public static final String OPTION_APPWIDGET_HOST_CATEGORY = "appWidgetCategory";

+2 −2
Original line number Diff line number Diff line
@@ -61,9 +61,9 @@ public class AppWidgetProviderInfo implements Parcelable {
    public static final int WIDGET_CATEGORY_KEYGUARD = 2;

    /**
     * Indicates that the widget can be displayed within recents.
     * Indicates that the widget can be displayed within a space reserved for the search box.
     */
    public static final int WIDGET_CATEGORY_RECENTS = 4;
    public static final int WIDGET_CATEGORY_SEARCHBOX = 4;

    /**
     * Identity of this AppWidget component.  This component should be a {@link
+2 −2
Original line number Diff line number Diff line
@@ -6600,12 +6600,12 @@
            <flag name="vertical" value="0x2" />
        </attr>
        <!-- Optional parameter which indicates where this widget can be shown,
             ie. home screen, keyguard, recents or any combination thereof.
             ie. home screen, keyguard, search bar or any combination thereof.
             Supports combined values using | operator. -->
        <attr name="widgetCategory" format="integer">
            <flag name="home_screen" value="0x1" />
            <flag name="keyguard" value="0x2" />
            <flag name="recents" value="0x4" />
            <flag name="searchbox" value="0x4" />
        </attr>
    </declare-styleable>

+1 −1
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
                        mSearchAppWidgetInfo);
                Bundle opts = new Bundle();
                opts.putInt(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY,
                        AppWidgetProviderInfo.WIDGET_CATEGORY_RECENTS);
                        AppWidgetProviderInfo.WIDGET_CATEGORY_SEARCHBOX);
                mSearchAppWidgetHostView.updateAppWidgetOptions(opts);
                // Set the padding to 0 for this search widget
                mSearchAppWidgetHostView.setPadding(0, 0, 0, 0);
Loading