Loading api/current.xml +22 −0 Original line number Diff line number Diff line Loading @@ -8842,6 +8842,17 @@ visibility="public" > </field> <field name="wallpaperAuthor" type="int" transient="false" volatile="false" value="16843444" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="wallpaperCloseEnterAnimation" type="int" transient="false" Loading @@ -8864,6 +8875,17 @@ visibility="public" > </field> <field name="wallpaperDescription" type="int" transient="false" volatile="false" value="16843445" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="wallpaperIntraCloseEnterAnimation" type="int" transient="false" core/java/android/app/WallpaperInfo.java +51 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.pm.ServiceInfo; import android.content.res.Resources.NotFoundException; import android.content.res.TypedArray; import android.content.res.XmlResourceParser; import android.graphics.drawable.Drawable; Loading Loading @@ -44,6 +45,16 @@ public final class WallpaperInfo implements Parcelable { */ final int mThumbnailResource; /** * Resource identifier for a string indicating the author of the wallpaper. */ final int mAuthorResource; /** * Resource identifier for a string containing a short description of the wallpaper. */ final int mDescriptionResource; /** * Constructor. * Loading @@ -59,6 +70,8 @@ public final class WallpaperInfo implements Parcelable { PackageManager pm = context.getPackageManager(); String settingsActivityComponent = null; int thumbnailRes = -1; int authorRes = -1; int descriptionRes = -1; XmlResourceParser parser = null; try { Loading Loading @@ -89,6 +102,12 @@ public final class WallpaperInfo implements Parcelable { thumbnailRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_thumbnail, -1); authorRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_wallpaperAuthor, -1); descriptionRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_wallpaperDescription, -1); sa.recycle(); } finally { Loading @@ -97,11 +116,15 @@ public final class WallpaperInfo implements Parcelable { mSettingsActivityName = settingsActivityComponent; mThumbnailResource = thumbnailRes; mAuthorResource = authorRes; mDescriptionResource = descriptionRes; } WallpaperInfo(Parcel source) { mSettingsActivityName = source.readString(); mThumbnailResource = source.readInt(); mAuthorResource = source.readInt(); mDescriptionResource = source.readInt(); mService = ResolveInfo.CREATOR.createFromParcel(source); } Loading Loading @@ -170,6 +193,32 @@ public final class WallpaperInfo implements Parcelable { null); } /** * Return a string indicating the author(s) of this wallpaper. */ public CharSequence loadAuthor(PackageManager pm) throws NotFoundException { if (mAuthorResource <= 0) throw new NotFoundException(); return pm.getText( (mService.resolvePackageName != null) ? mService.resolvePackageName : getPackageName(), mAuthorResource, null); } /** * Return a brief summary of this wallpaper's behavior. */ public CharSequence loadDescription(PackageManager pm) throws NotFoundException { if (mDescriptionResource <= 0) throw new NotFoundException(); return pm.getText( (mService.resolvePackageName != null) ? mService.resolvePackageName : getPackageName(), mDescriptionResource, 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 @@ -206,6 +255,8 @@ public final class WallpaperInfo implements Parcelable { public void writeToParcel(Parcel dest, int flags) { dest.writeString(mSettingsActivityName); dest.writeInt(mThumbnailResource); dest.writeInt(mAuthorResource); dest.writeInt(mDescriptionResource); mService.writeToParcel(dest, flags); } Loading core/res/res/values/attrs.xml +6 −0 Original line number Diff line number Diff line Loading @@ -3483,6 +3483,12 @@ <!-- Reference to a the wallpaper's thumbnail bitmap. --> <attr name="thumbnail" format="reference" /> <!-- Name of the author of a wallpaper, e.g. Google. --> <attr name="wallpaperAuthor" format="reference" /> <!-- Short description of the wallpaper's purpose or behavior. --> <attr name="wallpaperDescription" format="reference" /> </declare-styleable> <!-- =============================== --> Loading core/res/res/values/public.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1202,4 +1202,7 @@ <public type="attr" name="quickContactBadgeStyleSmallWindowMedium" /> <public type="attr" name="quickContactBadgeStyleSmallWindowLarge" /> <public type="attr" name="wallpaperAuthor" /> <public type="attr" name="wallpaperDescription" /> </resources> Loading
api/current.xml +22 −0 Original line number Diff line number Diff line Loading @@ -8842,6 +8842,17 @@ visibility="public" > </field> <field name="wallpaperAuthor" type="int" transient="false" volatile="false" value="16843444" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="wallpaperCloseEnterAnimation" type="int" transient="false" Loading @@ -8864,6 +8875,17 @@ visibility="public" > </field> <field name="wallpaperDescription" type="int" transient="false" volatile="false" value="16843445" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="wallpaperIntraCloseEnterAnimation" type="int" transient="false"
core/java/android/app/WallpaperInfo.java +51 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.pm.ServiceInfo; import android.content.res.Resources.NotFoundException; import android.content.res.TypedArray; import android.content.res.XmlResourceParser; import android.graphics.drawable.Drawable; Loading Loading @@ -44,6 +45,16 @@ public final class WallpaperInfo implements Parcelable { */ final int mThumbnailResource; /** * Resource identifier for a string indicating the author of the wallpaper. */ final int mAuthorResource; /** * Resource identifier for a string containing a short description of the wallpaper. */ final int mDescriptionResource; /** * Constructor. * Loading @@ -59,6 +70,8 @@ public final class WallpaperInfo implements Parcelable { PackageManager pm = context.getPackageManager(); String settingsActivityComponent = null; int thumbnailRes = -1; int authorRes = -1; int descriptionRes = -1; XmlResourceParser parser = null; try { Loading Loading @@ -89,6 +102,12 @@ public final class WallpaperInfo implements Parcelable { thumbnailRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_thumbnail, -1); authorRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_wallpaperAuthor, -1); descriptionRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_wallpaperDescription, -1); sa.recycle(); } finally { Loading @@ -97,11 +116,15 @@ public final class WallpaperInfo implements Parcelable { mSettingsActivityName = settingsActivityComponent; mThumbnailResource = thumbnailRes; mAuthorResource = authorRes; mDescriptionResource = descriptionRes; } WallpaperInfo(Parcel source) { mSettingsActivityName = source.readString(); mThumbnailResource = source.readInt(); mAuthorResource = source.readInt(); mDescriptionResource = source.readInt(); mService = ResolveInfo.CREATOR.createFromParcel(source); } Loading Loading @@ -170,6 +193,32 @@ public final class WallpaperInfo implements Parcelable { null); } /** * Return a string indicating the author(s) of this wallpaper. */ public CharSequence loadAuthor(PackageManager pm) throws NotFoundException { if (mAuthorResource <= 0) throw new NotFoundException(); return pm.getText( (mService.resolvePackageName != null) ? mService.resolvePackageName : getPackageName(), mAuthorResource, null); } /** * Return a brief summary of this wallpaper's behavior. */ public CharSequence loadDescription(PackageManager pm) throws NotFoundException { if (mDescriptionResource <= 0) throw new NotFoundException(); return pm.getText( (mService.resolvePackageName != null) ? mService.resolvePackageName : getPackageName(), mDescriptionResource, 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 @@ -206,6 +255,8 @@ public final class WallpaperInfo implements Parcelable { public void writeToParcel(Parcel dest, int flags) { dest.writeString(mSettingsActivityName); dest.writeInt(mThumbnailResource); dest.writeInt(mAuthorResource); dest.writeInt(mDescriptionResource); mService.writeToParcel(dest, flags); } Loading
core/res/res/values/attrs.xml +6 −0 Original line number Diff line number Diff line Loading @@ -3483,6 +3483,12 @@ <!-- Reference to a the wallpaper's thumbnail bitmap. --> <attr name="thumbnail" format="reference" /> <!-- Name of the author of a wallpaper, e.g. Google. --> <attr name="wallpaperAuthor" format="reference" /> <!-- Short description of the wallpaper's purpose or behavior. --> <attr name="wallpaperDescription" format="reference" /> </declare-styleable> <!-- =============================== --> Loading
core/res/res/values/public.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1202,4 +1202,7 @@ <public type="attr" name="quickContactBadgeStyleSmallWindowMedium" /> <public type="attr" name="quickContactBadgeStyleSmallWindowLarge" /> <public type="attr" name="wallpaperAuthor" /> <public type="attr" name="wallpaperDescription" /> </resources>