Loading api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -8259,6 +8259,17 @@ visibility="public" > </field> <field name="thumbnail" type="int" transient="false" volatile="false" value="16843429" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="tileMode" type="int" transient="false" core/java/android/app/WallpaperInfo.java +28 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,11 @@ public final class WallpaperInfo implements Parcelable { */ final String mSettingsActivityName; /** * Resource identifier for this wallpaper's thumbnail image. */ final int mThumbnailResource; /** * Constructor. * Loading @@ -53,6 +58,7 @@ public final class WallpaperInfo implements Parcelable { PackageManager pm = context.getPackageManager(); String settingsActivityComponent = null; int thumbnailRes = -1; XmlResourceParser parser = null; try { Loading @@ -79,16 +85,23 @@ public final class WallpaperInfo implements Parcelable { com.android.internal.R.styleable.Wallpaper); settingsActivityComponent = sa.getString( com.android.internal.R.styleable.Wallpaper_settingsActivity); thumbnailRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_thumbnail, -1); sa.recycle(); } finally { if (parser != null) parser.close(); } mSettingsActivityName = settingsActivityComponent; mThumbnailResource = thumbnailRes; } WallpaperInfo(Parcel source) { mSettingsActivityName = source.readString(); mThumbnailResource = source.readInt(); mService = ResolveInfo.CREATOR.createFromParcel(source); } Loading Loading @@ -143,6 +156,20 @@ public final class WallpaperInfo implements Parcelable { return mService.loadIcon(pm); } /** * Load the thumbnail image for this wallpaper. * * @param pm Supply a PackageManager used to load the wallpaper's * resources. */ public Drawable loadThumbnail(PackageManager pm) { if (mThumbnailResource < 0) return null; return pm.getDrawable(mService.serviceInfo.packageName, mThumbnailResource, null); } /** * Return the class name of an activity that provides a settings UI for * the wallpaper. You can launch this activity be starting it with Loading Loading @@ -178,6 +205,7 @@ public final class WallpaperInfo implements Parcelable { */ public void writeToParcel(Parcel dest, int flags) { dest.writeString(mSettingsActivityName); dest.writeInt(mThumbnailResource); mService.writeToParcel(dest, flags); } Loading core/res/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3451,6 +3451,9 @@ <!-- Component name of an activity that allows the user to modify the current settings for this wallpaper. --> <attr name="settingsActivity" /> <!-- Reference to a the wallpaper's thumbnail bitmap. --> <attr name="thumbnail" format="reference" /> </declare-styleable> <!-- =============================== --> Loading core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1169,6 +1169,7 @@ <public type="attr" name="summaryColumn" /> <public type="attr" name="detailColumn" /> <public type="attr" name="detailSocialSummary" /> <public type="attr" name="thumbnail" /> <public type="style" name="Theme.Wallpaper" /> <public type="style" name="Theme.Wallpaper.NoTitleBar" /> Loading Loading
api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -8259,6 +8259,17 @@ visibility="public" > </field> <field name="thumbnail" type="int" transient="false" volatile="false" value="16843429" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="tileMode" type="int" transient="false"
core/java/android/app/WallpaperInfo.java +28 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,11 @@ public final class WallpaperInfo implements Parcelable { */ final String mSettingsActivityName; /** * Resource identifier for this wallpaper's thumbnail image. */ final int mThumbnailResource; /** * Constructor. * Loading @@ -53,6 +58,7 @@ public final class WallpaperInfo implements Parcelable { PackageManager pm = context.getPackageManager(); String settingsActivityComponent = null; int thumbnailRes = -1; XmlResourceParser parser = null; try { Loading @@ -79,16 +85,23 @@ public final class WallpaperInfo implements Parcelable { com.android.internal.R.styleable.Wallpaper); settingsActivityComponent = sa.getString( com.android.internal.R.styleable.Wallpaper_settingsActivity); thumbnailRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_thumbnail, -1); sa.recycle(); } finally { if (parser != null) parser.close(); } mSettingsActivityName = settingsActivityComponent; mThumbnailResource = thumbnailRes; } WallpaperInfo(Parcel source) { mSettingsActivityName = source.readString(); mThumbnailResource = source.readInt(); mService = ResolveInfo.CREATOR.createFromParcel(source); } Loading Loading @@ -143,6 +156,20 @@ public final class WallpaperInfo implements Parcelable { return mService.loadIcon(pm); } /** * Load the thumbnail image for this wallpaper. * * @param pm Supply a PackageManager used to load the wallpaper's * resources. */ public Drawable loadThumbnail(PackageManager pm) { if (mThumbnailResource < 0) return null; return pm.getDrawable(mService.serviceInfo.packageName, mThumbnailResource, null); } /** * Return the class name of an activity that provides a settings UI for * the wallpaper. You can launch this activity be starting it with Loading Loading @@ -178,6 +205,7 @@ public final class WallpaperInfo implements Parcelable { */ public void writeToParcel(Parcel dest, int flags) { dest.writeString(mSettingsActivityName); dest.writeInt(mThumbnailResource); mService.writeToParcel(dest, flags); } Loading
core/res/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3451,6 +3451,9 @@ <!-- Component name of an activity that allows the user to modify the current settings for this wallpaper. --> <attr name="settingsActivity" /> <!-- Reference to a the wallpaper's thumbnail bitmap. --> <attr name="thumbnail" format="reference" /> </declare-styleable> <!-- =============================== --> Loading
core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1169,6 +1169,7 @@ <public type="attr" name="summaryColumn" /> <public type="attr" name="detailColumn" /> <public type="attr" name="detailSocialSummary" /> <public type="attr" name="thumbnail" /> <public type="style" name="Theme.Wallpaper" /> <public type="style" name="Theme.Wallpaper.NoTitleBar" /> Loading