Merge "Add a new widget feature value, configuration_optional"
This commit is contained in:
@@ -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_KEYGUARD = 2; // 0x2
|
||||
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_RECONFIGURABLE = 1; // 0x1
|
||||
field public int autoAdvanceViewId;
|
||||
|
||||
@@ -112,10 +112,19 @@ public class AppWidgetProviderInfo implements Parcelable {
|
||||
*/
|
||||
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 */
|
||||
@IntDef(flag = true, prefix = { "FLAG_" }, value = {
|
||||
WIDGET_FEATURE_RECONFIGURABLE,
|
||||
WIDGET_FEATURE_HIDE_FROM_PICKER,
|
||||
WIDGET_FEATURE_CONFIGURATION_OPTIONAL
|
||||
})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface FeatureFlags {}
|
||||
@@ -269,6 +278,7 @@ public class AppWidgetProviderInfo implements Parcelable {
|
||||
*
|
||||
* @see #WIDGET_FEATURE_RECONFIGURABLE
|
||||
* @see #WIDGET_FEATURE_HIDE_FROM_PICKER
|
||||
* @see #WIDGET_FEATURE_CONFIGURATION_OPTIONAL
|
||||
*/
|
||||
@FeatureFlags
|
||||
public int widgetFeatures;
|
||||
|
||||
@@ -7993,6 +7993,9 @@
|
||||
<!-- The widget is added directly by the app, and does not need to appear in
|
||||
the global list of available widgets -->
|
||||
<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>
|
||||
</declare-styleable>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user