Loading core/java/android/appwidget/AppWidgetProviderInfo.java +32 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.appwidget; import android.annotation.IntDef; import android.annotation.NonNull; import android.app.PendingIntent; import android.content.ComponentName; Loading @@ -32,6 +33,9 @@ import android.os.UserHandle; import android.util.DisplayMetrics; import android.util.TypedValue; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * Describes the meta data for an installed AppWidget provider. The fields in this class * correspond to the fields in the <code><appwidget-provider></code> xml tag. Loading @@ -55,6 +59,14 @@ public class AppWidgetProviderInfo implements Parcelable { */ public static final int RESIZE_BOTH = RESIZE_HORIZONTAL | RESIZE_VERTICAL; /** @hide */ @IntDef(flag = true, prefix = { "FLAG_" }, value = { RESIZE_HORIZONTAL, RESIZE_VERTICAL, }) @Retention(RetentionPolicy.SOURCE) public @interface ResizeModeFlags {} /** * Indicates that the widget can be displayed on the home screen. This is the default value. */ Loading @@ -70,6 +82,15 @@ public class AppWidgetProviderInfo implements Parcelable { */ public static final int WIDGET_CATEGORY_SEARCHBOX = 4; /** @hide */ @IntDef(flag = true, prefix = { "FLAG_" }, value = { WIDGET_CATEGORY_HOME_SCREEN, WIDGET_CATEGORY_KEYGUARD, WIDGET_CATEGORY_SEARCHBOX, }) @Retention(RetentionPolicy.SOURCE) public @interface CategoryFlags {} /** * The widget can be reconfigured anytime after it is bound by starting the * {@link #configure} activity. Loading @@ -87,6 +108,14 @@ public class AppWidgetProviderInfo implements Parcelable { */ public static final int WIDGET_FEATURE_HIDE_FROM_PICKER = 2; /** @hide */ @IntDef(flag = true, prefix = { "FLAG_" }, value = { WIDGET_FEATURE_RECONFIGURABLE, WIDGET_FEATURE_HIDE_FROM_PICKER, }) @Retention(RetentionPolicy.SOURCE) public @interface FeatureFlags {} /** * Identity of this AppWidget component. This component should be a {@link * android.content.BroadcastReceiver}, and it will be sent the AppWidget intents Loading Loading @@ -215,6 +244,7 @@ public class AppWidgetProviderInfo implements Parcelable { * <p>This field corresponds to the <code>android:resizeMode</code> attribute in * the AppWidget meta-data file. */ @ResizeModeFlags public int resizeMode; /** Loading @@ -226,6 +256,7 @@ public class AppWidgetProviderInfo implements Parcelable { * <p>This field corresponds to the <code>widgetCategory</code> attribute in * the AppWidget meta-data file. */ @CategoryFlags public int widgetCategory; /** Loading @@ -235,6 +266,7 @@ public class AppWidgetProviderInfo implements Parcelable { * @see #WIDGET_FEATURE_RECONFIGURABLE * @see #WIDGET_FEATURE_HIDE_FROM_PICKER */ @FeatureFlags public int widgetFeatures; /** @hide */ Loading Loading
core/java/android/appwidget/AppWidgetProviderInfo.java +32 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.appwidget; import android.annotation.IntDef; import android.annotation.NonNull; import android.app.PendingIntent; import android.content.ComponentName; Loading @@ -32,6 +33,9 @@ import android.os.UserHandle; import android.util.DisplayMetrics; import android.util.TypedValue; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * Describes the meta data for an installed AppWidget provider. The fields in this class * correspond to the fields in the <code><appwidget-provider></code> xml tag. Loading @@ -55,6 +59,14 @@ public class AppWidgetProviderInfo implements Parcelable { */ public static final int RESIZE_BOTH = RESIZE_HORIZONTAL | RESIZE_VERTICAL; /** @hide */ @IntDef(flag = true, prefix = { "FLAG_" }, value = { RESIZE_HORIZONTAL, RESIZE_VERTICAL, }) @Retention(RetentionPolicy.SOURCE) public @interface ResizeModeFlags {} /** * Indicates that the widget can be displayed on the home screen. This is the default value. */ Loading @@ -70,6 +82,15 @@ public class AppWidgetProviderInfo implements Parcelable { */ public static final int WIDGET_CATEGORY_SEARCHBOX = 4; /** @hide */ @IntDef(flag = true, prefix = { "FLAG_" }, value = { WIDGET_CATEGORY_HOME_SCREEN, WIDGET_CATEGORY_KEYGUARD, WIDGET_CATEGORY_SEARCHBOX, }) @Retention(RetentionPolicy.SOURCE) public @interface CategoryFlags {} /** * The widget can be reconfigured anytime after it is bound by starting the * {@link #configure} activity. Loading @@ -87,6 +108,14 @@ public class AppWidgetProviderInfo implements Parcelable { */ public static final int WIDGET_FEATURE_HIDE_FROM_PICKER = 2; /** @hide */ @IntDef(flag = true, prefix = { "FLAG_" }, value = { WIDGET_FEATURE_RECONFIGURABLE, WIDGET_FEATURE_HIDE_FROM_PICKER, }) @Retention(RetentionPolicy.SOURCE) public @interface FeatureFlags {} /** * Identity of this AppWidget component. This component should be a {@link * android.content.BroadcastReceiver}, and it will be sent the AppWidget intents Loading Loading @@ -215,6 +244,7 @@ public class AppWidgetProviderInfo implements Parcelable { * <p>This field corresponds to the <code>android:resizeMode</code> attribute in * the AppWidget meta-data file. */ @ResizeModeFlags public int resizeMode; /** Loading @@ -226,6 +256,7 @@ public class AppWidgetProviderInfo implements Parcelable { * <p>This field corresponds to the <code>widgetCategory</code> attribute in * the AppWidget meta-data file. */ @CategoryFlags public int widgetCategory; /** Loading @@ -235,6 +266,7 @@ public class AppWidgetProviderInfo implements Parcelable { * @see #WIDGET_FEATURE_RECONFIGURABLE * @see #WIDGET_FEATURE_HIDE_FROM_PICKER */ @FeatureFlags public int widgetFeatures; /** @hide */ Loading