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

Commit d8d8acfd authored by Steven Ng's avatar Steven Ng Committed by Android (Google) Code Review
Browse files

Merge "Add a new widget feature value, configuration_optional"

parents 8d5fa098 a401dc51
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -8361,6 +8361,7 @@ package android.appwidget {
    field public static final int WIDGET_CATEGORY_HOME_SCREEN = 1; // 0x1
    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_KEYGUARD = 2; // 0x2
    field public static final int WIDGET_CATEGORY_SEARCHBOX = 4; // 0x4
    field public static final int WIDGET_CATEGORY_SEARCHBOX = 4; // 0x4
    field public static final int WIDGET_FEATURE_CONFIGURATION_OPTIONAL = 3; // 0x3
    field public static final int WIDGET_FEATURE_HIDE_FROM_PICKER = 2; // 0x2
    field public static final int WIDGET_FEATURE_HIDE_FROM_PICKER = 2; // 0x2
    field public static final int WIDGET_FEATURE_RECONFIGURABLE = 1; // 0x1
    field public static final int WIDGET_FEATURE_RECONFIGURABLE = 1; // 0x1
    field public int autoAdvanceViewId;
    field public int autoAdvanceViewId;
+10 −0
Original line number Original line Diff line number Diff line
@@ -112,10 +112,19 @@ public class AppWidgetProviderInfo implements Parcelable {
     */
     */
    public static final int WIDGET_FEATURE_HIDE_FROM_PICKER = 2;
    public static final int WIDGET_FEATURE_HIDE_FROM_PICKER = 2;


    /**
     * The widget provides a default configuration. The host may choose not to launch the provided
     * configuration activity.
     *
     * @see #widgetFeatures
     */
    public static final int WIDGET_FEATURE_CONFIGURATION_OPTIONAL = 3;

    /** @hide */
    /** @hide */
    @IntDef(flag = true, prefix = { "FLAG_" }, value = {
    @IntDef(flag = true, prefix = { "FLAG_" }, value = {
            WIDGET_FEATURE_RECONFIGURABLE,
            WIDGET_FEATURE_RECONFIGURABLE,
            WIDGET_FEATURE_HIDE_FROM_PICKER,
            WIDGET_FEATURE_HIDE_FROM_PICKER,
            WIDGET_FEATURE_CONFIGURATION_OPTIONAL
    })
    })
    @Retention(RetentionPolicy.SOURCE)
    @Retention(RetentionPolicy.SOURCE)
    public @interface FeatureFlags {}
    public @interface FeatureFlags {}
@@ -269,6 +278,7 @@ public class AppWidgetProviderInfo implements Parcelable {
     *
     *
     * @see #WIDGET_FEATURE_RECONFIGURABLE
     * @see #WIDGET_FEATURE_RECONFIGURABLE
     * @see #WIDGET_FEATURE_HIDE_FROM_PICKER
     * @see #WIDGET_FEATURE_HIDE_FROM_PICKER
     * @see #WIDGET_FEATURE_CONFIGURATION_OPTIONAL
     */
     */
    @FeatureFlags
    @FeatureFlags
    public int widgetFeatures;
    public int widgetFeatures;
+3 −0
Original line number Original line Diff line number Diff line
@@ -7993,6 +7993,9 @@
            <!-- The widget is added directly by the app, and does not need to appear in
            <!-- The widget is added directly by the app, and does not need to appear in
                 the global list of available widgets -->
                 the global list of available widgets -->
            <flag name="hide_from_picker" value="0x2" />
            <flag name="hide_from_picker" value="0x2" />
              <!-- The widget provides a default configuration. The host may decide not to launch
                   the provided configuration activity. -->
           <flag name="configuration_optional" value="0x3" />
        </attr>
        </attr>
    </declare-styleable>
    </declare-styleable>