Loading api/current.txt +4 −0 Original line number Original line Diff line number Diff line Loading @@ -1505,6 +1505,7 @@ package android { field public static final deprecated int weekSeparatorLineColor = 16843590; // 0x1010346 field public static final deprecated int weekSeparatorLineColor = 16843590; // 0x1010346 field public static final int weightSum = 16843048; // 0x1010128 field public static final int weightSum = 16843048; // 0x1010128 field public static final int widgetCategory = 16843716; // 0x10103c4 field public static final int widgetCategory = 16843716; // 0x10103c4 field public static final int widgetFeatures = 16844153; // 0x1010579 field public static final int widgetLayout = 16843243; // 0x10101eb field public static final int widgetLayout = 16843243; // 0x10101eb field public static final int width = 16843097; // 0x1010159 field public static final int width = 16843097; // 0x1010159 field public static final int windowActionBar = 16843469; // 0x10102cd field public static final int windowActionBar = 16843469; // 0x10102cd Loading Loading @@ -7348,6 +7349,8 @@ 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_HIDE_FROM_PICKER = 2; // 0x2 field public static final int WIDGET_FEATURE_RECONFIGURABLE = 1; // 0x1 field public int autoAdvanceViewId; field public int autoAdvanceViewId; field public android.content.ComponentName configure; field public android.content.ComponentName configure; field public int icon; field public int icon; Loading @@ -7363,6 +7366,7 @@ package android.appwidget { field public int resizeMode; field public int resizeMode; field public int updatePeriodMillis; field public int updatePeriodMillis; field public int widgetCategory; field public int widgetCategory; field public int widgetFeatures; } } } } core/java/android/appwidget/AppWidgetProviderInfo.java +39 −22 Original line number Original line Diff line number Diff line Loading @@ -17,15 +17,17 @@ package android.appwidget; package android.appwidget; import android.annotation.NonNull; import android.annotation.NonNull; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager; import android.content.res.ResourceId; import android.content.res.ResourceId; import android.content.res.Resources; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Parcel; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable; import android.content.ComponentName; import android.os.UserHandle; import android.os.UserHandle; import android.util.DisplayMetrics; import android.util.DisplayMetrics; import android.util.TypedValue; import android.util.TypedValue; Loading Loading @@ -68,6 +70,23 @@ public class AppWidgetProviderInfo implements Parcelable { */ */ public static final int WIDGET_CATEGORY_SEARCHBOX = 4; public static final int WIDGET_CATEGORY_SEARCHBOX = 4; /** * The widget can be reconfigured anytime after it is bound by starting the * {@link #configure} activity. * * @see #widgetFeatures */ public static final int WIDGET_FEATURE_RECONFIGURABLE = 1; /** * The widget is added directly by the app, and the host may hide this widget when providing * the user with the list of available widgets to choose from. * * @see AppWidgetManager#requestPinAppWidget(ComponentName, Bundle, PendingIntent) * @see #widgetFeatures */ public static final int WIDGET_FEATURE_HIDE_FROM_PICKER = 2; /** /** * Identity of this AppWidget component. This component should be a {@link * Identity of this AppWidget component. This component should be a {@link * android.content.BroadcastReceiver}, and it will be sent the AppWidget intents * android.content.BroadcastReceiver}, and it will be sent the AppWidget intents Loading Loading @@ -209,6 +228,15 @@ public class AppWidgetProviderInfo implements Parcelable { */ */ public int widgetCategory; public int widgetCategory; /** * Flags indicating various features supported by the widget. These are hints to the widget * host, and do not actually change the behavior of the widget. * * @see #WIDGET_FEATURE_RECONFIGURABLE * @see #WIDGET_FEATURE_HIDE_FROM_PICKER */ public int widgetFeatures; /** @hide */ /** @hide */ public ActivityInfo providerInfo; public ActivityInfo providerInfo; Loading @@ -221,9 +249,7 @@ public class AppWidgetProviderInfo implements Parcelable { */ */ @SuppressWarnings("deprecation") @SuppressWarnings("deprecation") public AppWidgetProviderInfo(Parcel in) { public AppWidgetProviderInfo(Parcel in) { if (0 != in.readInt()) { this.provider = in.readTypedObject(ComponentName.CREATOR); this.provider = new ComponentName(in); } this.minWidth = in.readInt(); this.minWidth = in.readInt(); this.minHeight = in.readInt(); this.minHeight = in.readInt(); this.minResizeWidth = in.readInt(); this.minResizeWidth = in.readInt(); Loading @@ -231,16 +257,15 @@ public class AppWidgetProviderInfo implements Parcelable { this.updatePeriodMillis = in.readInt(); this.updatePeriodMillis = in.readInt(); this.initialLayout = in.readInt(); this.initialLayout = in.readInt(); this.initialKeyguardLayout = in.readInt(); this.initialKeyguardLayout = in.readInt(); if (0 != in.readInt()) { this.configure = in.readTypedObject(ComponentName.CREATOR); this.configure = new ComponentName(in); } this.label = in.readString(); this.label = in.readString(); this.icon = in.readInt(); this.icon = in.readInt(); this.previewImage = in.readInt(); this.previewImage = in.readInt(); this.autoAdvanceViewId = in.readInt(); this.autoAdvanceViewId = in.readInt(); this.resizeMode = in.readInt(); this.resizeMode = in.readInt(); this.widgetCategory = in.readInt(); this.widgetCategory = in.readInt(); this.providerInfo = in.readParcelable(null); this.providerInfo = in.readTypedObject(ActivityInfo.CREATOR); this.widgetFeatures = in.readInt(); } } /** /** Loading Loading @@ -308,13 +333,8 @@ public class AppWidgetProviderInfo implements Parcelable { @Override @Override @SuppressWarnings("deprecation") @SuppressWarnings("deprecation") public void writeToParcel(android.os.Parcel out, int flags) { public void writeToParcel(Parcel out, int flags) { if (this.provider != null) { out.writeTypedObject(this.provider, flags); out.writeInt(1); this.provider.writeToParcel(out, flags); } else { out.writeInt(0); } out.writeInt(this.minWidth); out.writeInt(this.minWidth); out.writeInt(this.minHeight); out.writeInt(this.minHeight); out.writeInt(this.minResizeWidth); out.writeInt(this.minResizeWidth); Loading @@ -322,19 +342,15 @@ public class AppWidgetProviderInfo implements Parcelable { out.writeInt(this.updatePeriodMillis); out.writeInt(this.updatePeriodMillis); out.writeInt(this.initialLayout); out.writeInt(this.initialLayout); out.writeInt(this.initialKeyguardLayout); out.writeInt(this.initialKeyguardLayout); if (this.configure != null) { out.writeTypedObject(this.configure, flags); out.writeInt(1); this.configure.writeToParcel(out, flags); } else { out.writeInt(0); } out.writeString(this.label); out.writeString(this.label); out.writeInt(this.icon); out.writeInt(this.icon); out.writeInt(this.previewImage); out.writeInt(this.previewImage); out.writeInt(this.autoAdvanceViewId); out.writeInt(this.autoAdvanceViewId); out.writeInt(this.resizeMode); out.writeInt(this.resizeMode); out.writeInt(this.widgetCategory); out.writeInt(this.widgetCategory); out.writeParcelable(this.providerInfo, flags); out.writeTypedObject(this.providerInfo, flags); out.writeInt(this.widgetFeatures); } } @Override @Override Loading @@ -357,6 +373,7 @@ public class AppWidgetProviderInfo implements Parcelable { that.resizeMode = this.resizeMode; that.resizeMode = this.resizeMode; that.widgetCategory = this.widgetCategory; that.widgetCategory = this.widgetCategory; that.providerInfo = this.providerInfo; that.providerInfo = this.providerInfo; that.widgetFeatures = this.widgetFeatures; return that; return that; } } Loading core/res/res/values/attrs.xml +9 −0 Original line number Original line Diff line number Diff line Loading @@ -7571,6 +7571,15 @@ <flag name="keyguard" value="0x2" /> <flag name="keyguard" value="0x2" /> <flag name="searchbox" value="0x4" /> <flag name="searchbox" value="0x4" /> </attr> </attr> <!-- Flags indicating various features supported by the widget. These are hints to the widget host, and do not actually change the behavior of the widget. --> <attr name="widgetFeatures" format="integer"> <!-- The widget can be reconfigured anytime after it is bound --> <flag name="reconfigurable" value="0x1" /> <!-- 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" /> </attr> </declare-styleable> </declare-styleable> <!-- =============================== --> <!-- =============================== --> Loading core/res/res/values/public.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -2858,6 +2858,7 @@ <public name="versionMajor" /> <public name="versionMajor" /> <!-- @hide @SystemApi --> <!-- @hide @SystemApi --> <public name="isVrOnly"/> <public name="isVrOnly"/> <public name="widgetFeatures" /> </public-group> </public-group> <public-group type="style" first-id="0x010302e0"> <public-group type="style" first-id="0x010302e0"> Loading services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -2506,6 +2506,8 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku info.widgetCategory = sa.getInt( info.widgetCategory = sa.getInt( com.android.internal.R.styleable.AppWidgetProviderInfo_widgetCategory, com.android.internal.R.styleable.AppWidgetProviderInfo_widgetCategory, AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN); AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN); info.widgetFeatures = sa.getInt( com.android.internal.R.styleable.AppWidgetProviderInfo_widgetFeatures, 0); sa.recycle(); sa.recycle(); } catch (IOException | PackageManager.NameNotFoundException | XmlPullParserException e) { } catch (IOException | PackageManager.NameNotFoundException | XmlPullParserException e) { Loading Loading
api/current.txt +4 −0 Original line number Original line Diff line number Diff line Loading @@ -1505,6 +1505,7 @@ package android { field public static final deprecated int weekSeparatorLineColor = 16843590; // 0x1010346 field public static final deprecated int weekSeparatorLineColor = 16843590; // 0x1010346 field public static final int weightSum = 16843048; // 0x1010128 field public static final int weightSum = 16843048; // 0x1010128 field public static final int widgetCategory = 16843716; // 0x10103c4 field public static final int widgetCategory = 16843716; // 0x10103c4 field public static final int widgetFeatures = 16844153; // 0x1010579 field public static final int widgetLayout = 16843243; // 0x10101eb field public static final int widgetLayout = 16843243; // 0x10101eb field public static final int width = 16843097; // 0x1010159 field public static final int width = 16843097; // 0x1010159 field public static final int windowActionBar = 16843469; // 0x10102cd field public static final int windowActionBar = 16843469; // 0x10102cd Loading Loading @@ -7348,6 +7349,8 @@ 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_HIDE_FROM_PICKER = 2; // 0x2 field public static final int WIDGET_FEATURE_RECONFIGURABLE = 1; // 0x1 field public int autoAdvanceViewId; field public int autoAdvanceViewId; field public android.content.ComponentName configure; field public android.content.ComponentName configure; field public int icon; field public int icon; Loading @@ -7363,6 +7366,7 @@ package android.appwidget { field public int resizeMode; field public int resizeMode; field public int updatePeriodMillis; field public int updatePeriodMillis; field public int widgetCategory; field public int widgetCategory; field public int widgetFeatures; } } } }
core/java/android/appwidget/AppWidgetProviderInfo.java +39 −22 Original line number Original line Diff line number Diff line Loading @@ -17,15 +17,17 @@ package android.appwidget; package android.appwidget; import android.annotation.NonNull; import android.annotation.NonNull; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager; import android.content.res.ResourceId; import android.content.res.ResourceId; import android.content.res.Resources; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Parcel; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable; import android.content.ComponentName; import android.os.UserHandle; import android.os.UserHandle; import android.util.DisplayMetrics; import android.util.DisplayMetrics; import android.util.TypedValue; import android.util.TypedValue; Loading Loading @@ -68,6 +70,23 @@ public class AppWidgetProviderInfo implements Parcelable { */ */ public static final int WIDGET_CATEGORY_SEARCHBOX = 4; public static final int WIDGET_CATEGORY_SEARCHBOX = 4; /** * The widget can be reconfigured anytime after it is bound by starting the * {@link #configure} activity. * * @see #widgetFeatures */ public static final int WIDGET_FEATURE_RECONFIGURABLE = 1; /** * The widget is added directly by the app, and the host may hide this widget when providing * the user with the list of available widgets to choose from. * * @see AppWidgetManager#requestPinAppWidget(ComponentName, Bundle, PendingIntent) * @see #widgetFeatures */ public static final int WIDGET_FEATURE_HIDE_FROM_PICKER = 2; /** /** * Identity of this AppWidget component. This component should be a {@link * Identity of this AppWidget component. This component should be a {@link * android.content.BroadcastReceiver}, and it will be sent the AppWidget intents * android.content.BroadcastReceiver}, and it will be sent the AppWidget intents Loading Loading @@ -209,6 +228,15 @@ public class AppWidgetProviderInfo implements Parcelable { */ */ public int widgetCategory; public int widgetCategory; /** * Flags indicating various features supported by the widget. These are hints to the widget * host, and do not actually change the behavior of the widget. * * @see #WIDGET_FEATURE_RECONFIGURABLE * @see #WIDGET_FEATURE_HIDE_FROM_PICKER */ public int widgetFeatures; /** @hide */ /** @hide */ public ActivityInfo providerInfo; public ActivityInfo providerInfo; Loading @@ -221,9 +249,7 @@ public class AppWidgetProviderInfo implements Parcelable { */ */ @SuppressWarnings("deprecation") @SuppressWarnings("deprecation") public AppWidgetProviderInfo(Parcel in) { public AppWidgetProviderInfo(Parcel in) { if (0 != in.readInt()) { this.provider = in.readTypedObject(ComponentName.CREATOR); this.provider = new ComponentName(in); } this.minWidth = in.readInt(); this.minWidth = in.readInt(); this.minHeight = in.readInt(); this.minHeight = in.readInt(); this.minResizeWidth = in.readInt(); this.minResizeWidth = in.readInt(); Loading @@ -231,16 +257,15 @@ public class AppWidgetProviderInfo implements Parcelable { this.updatePeriodMillis = in.readInt(); this.updatePeriodMillis = in.readInt(); this.initialLayout = in.readInt(); this.initialLayout = in.readInt(); this.initialKeyguardLayout = in.readInt(); this.initialKeyguardLayout = in.readInt(); if (0 != in.readInt()) { this.configure = in.readTypedObject(ComponentName.CREATOR); this.configure = new ComponentName(in); } this.label = in.readString(); this.label = in.readString(); this.icon = in.readInt(); this.icon = in.readInt(); this.previewImage = in.readInt(); this.previewImage = in.readInt(); this.autoAdvanceViewId = in.readInt(); this.autoAdvanceViewId = in.readInt(); this.resizeMode = in.readInt(); this.resizeMode = in.readInt(); this.widgetCategory = in.readInt(); this.widgetCategory = in.readInt(); this.providerInfo = in.readParcelable(null); this.providerInfo = in.readTypedObject(ActivityInfo.CREATOR); this.widgetFeatures = in.readInt(); } } /** /** Loading Loading @@ -308,13 +333,8 @@ public class AppWidgetProviderInfo implements Parcelable { @Override @Override @SuppressWarnings("deprecation") @SuppressWarnings("deprecation") public void writeToParcel(android.os.Parcel out, int flags) { public void writeToParcel(Parcel out, int flags) { if (this.provider != null) { out.writeTypedObject(this.provider, flags); out.writeInt(1); this.provider.writeToParcel(out, flags); } else { out.writeInt(0); } out.writeInt(this.minWidth); out.writeInt(this.minWidth); out.writeInt(this.minHeight); out.writeInt(this.minHeight); out.writeInt(this.minResizeWidth); out.writeInt(this.minResizeWidth); Loading @@ -322,19 +342,15 @@ public class AppWidgetProviderInfo implements Parcelable { out.writeInt(this.updatePeriodMillis); out.writeInt(this.updatePeriodMillis); out.writeInt(this.initialLayout); out.writeInt(this.initialLayout); out.writeInt(this.initialKeyguardLayout); out.writeInt(this.initialKeyguardLayout); if (this.configure != null) { out.writeTypedObject(this.configure, flags); out.writeInt(1); this.configure.writeToParcel(out, flags); } else { out.writeInt(0); } out.writeString(this.label); out.writeString(this.label); out.writeInt(this.icon); out.writeInt(this.icon); out.writeInt(this.previewImage); out.writeInt(this.previewImage); out.writeInt(this.autoAdvanceViewId); out.writeInt(this.autoAdvanceViewId); out.writeInt(this.resizeMode); out.writeInt(this.resizeMode); out.writeInt(this.widgetCategory); out.writeInt(this.widgetCategory); out.writeParcelable(this.providerInfo, flags); out.writeTypedObject(this.providerInfo, flags); out.writeInt(this.widgetFeatures); } } @Override @Override Loading @@ -357,6 +373,7 @@ public class AppWidgetProviderInfo implements Parcelable { that.resizeMode = this.resizeMode; that.resizeMode = this.resizeMode; that.widgetCategory = this.widgetCategory; that.widgetCategory = this.widgetCategory; that.providerInfo = this.providerInfo; that.providerInfo = this.providerInfo; that.widgetFeatures = this.widgetFeatures; return that; return that; } } Loading
core/res/res/values/attrs.xml +9 −0 Original line number Original line Diff line number Diff line Loading @@ -7571,6 +7571,15 @@ <flag name="keyguard" value="0x2" /> <flag name="keyguard" value="0x2" /> <flag name="searchbox" value="0x4" /> <flag name="searchbox" value="0x4" /> </attr> </attr> <!-- Flags indicating various features supported by the widget. These are hints to the widget host, and do not actually change the behavior of the widget. --> <attr name="widgetFeatures" format="integer"> <!-- The widget can be reconfigured anytime after it is bound --> <flag name="reconfigurable" value="0x1" /> <!-- 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" /> </attr> </declare-styleable> </declare-styleable> <!-- =============================== --> <!-- =============================== --> Loading
core/res/res/values/public.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -2858,6 +2858,7 @@ <public name="versionMajor" /> <public name="versionMajor" /> <!-- @hide @SystemApi --> <!-- @hide @SystemApi --> <public name="isVrOnly"/> <public name="isVrOnly"/> <public name="widgetFeatures" /> </public-group> </public-group> <public-group type="style" first-id="0x010302e0"> <public-group type="style" first-id="0x010302e0"> Loading
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -2506,6 +2506,8 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku info.widgetCategory = sa.getInt( info.widgetCategory = sa.getInt( com.android.internal.R.styleable.AppWidgetProviderInfo_widgetCategory, com.android.internal.R.styleable.AppWidgetProviderInfo_widgetCategory, AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN); AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN); info.widgetFeatures = sa.getInt( com.android.internal.R.styleable.AppWidgetProviderInfo_widgetFeatures, 0); sa.recycle(); sa.recycle(); } catch (IOException | PackageManager.NameNotFoundException | XmlPullParserException e) { } catch (IOException | PackageManager.NameNotFoundException | XmlPullParserException e) { Loading