Loading api/current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -420,7 +420,9 @@ package android { field public static final int contentInsetStart = 16843859; // 0x1010453 field public static final int contentInsetStartWithNavigation = 16844066; // 0x1010522 field public static final int contextClickable = 16844007; // 0x10104e7 field public static final int contextDescription = 16844082; // 0x1010532 field public static final int contextPopupMenuStyle = 16844033; // 0x1010501 field public static final int contextUri = 16844081; // 0x1010531 field public static final int controlX1 = 16843772; // 0x10103fc field public static final int controlX2 = 16843774; // 0x10103fe field public static final int controlY1 = 16843773; // 0x10103fd Loading Loading @@ -1120,6 +1122,7 @@ package android { field public static final int showDefault = 16843258; // 0x10101fa field public static final int showDividers = 16843561; // 0x1010329 field public static final int showForAllUsers = 16844015; // 0x10104ef field public static final int showMetadataInPreview = 16844083; // 0x1010533 field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9 field public static final int showSilent = 16843259; // 0x10101fb field public static final int showText = 16843949; // 0x10104ad Loading Loading @@ -5765,7 +5768,10 @@ package android.app { method public android.content.pm.ServiceInfo getServiceInfo(); method public java.lang.String getServiceName(); method public java.lang.String getSettingsActivity(); method public boolean getShowMetadataInPreview(); method public java.lang.CharSequence loadAuthor(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadContextDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.net.Uri loadContextUri(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager); method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager); api/system-current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -526,7 +526,9 @@ package android { field public static final int contentInsetStart = 16843859; // 0x1010453 field public static final int contentInsetStartWithNavigation = 16844066; // 0x1010522 field public static final int contextClickable = 16844007; // 0x10104e7 field public static final int contextDescription = 16844082; // 0x1010532 field public static final int contextPopupMenuStyle = 16844033; // 0x1010501 field public static final int contextUri = 16844081; // 0x1010531 field public static final int controlX1 = 16843772; // 0x10103fc field public static final int controlX2 = 16843774; // 0x10103fe field public static final int controlY1 = 16843773; // 0x10103fd Loading Loading @@ -1230,6 +1232,7 @@ package android { field public static final int showDefault = 16843258; // 0x10101fa field public static final int showDividers = 16843561; // 0x1010329 field public static final int showForAllUsers = 16844015; // 0x10104ef field public static final int showMetadataInPreview = 16844083; // 0x1010533 field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9 field public static final int showSilent = 16843259; // 0x10101fb field public static final int showText = 16843949; // 0x10104ad Loading Loading @@ -5912,7 +5915,10 @@ package android.app { method public android.content.pm.ServiceInfo getServiceInfo(); method public java.lang.String getServiceName(); method public java.lang.String getSettingsActivity(); method public boolean getShowMetadataInPreview(); method public java.lang.CharSequence loadAuthor(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadContextDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.net.Uri loadContextUri(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager); method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager); api/test-current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -420,7 +420,9 @@ package android { field public static final int contentInsetStart = 16843859; // 0x1010453 field public static final int contentInsetStartWithNavigation = 16844066; // 0x1010522 field public static final int contextClickable = 16844007; // 0x10104e7 field public static final int contextDescription = 16844082; // 0x1010532 field public static final int contextPopupMenuStyle = 16844033; // 0x1010501 field public static final int contextUri = 16844081; // 0x1010531 field public static final int controlX1 = 16843772; // 0x10103fc field public static final int controlX2 = 16843774; // 0x10103fe field public static final int controlY1 = 16843773; // 0x10103fd Loading Loading @@ -1120,6 +1122,7 @@ package android { field public static final int showDefault = 16843258; // 0x10101fa field public static final int showDividers = 16843561; // 0x1010329 field public static final int showForAllUsers = 16844015; // 0x10104ef field public static final int showMetadataInPreview = 16844083; // 0x1010533 field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9 field public static final int showSilent = 16843259; // 0x10101fb field public static final int showText = 16843949; // 0x10104ad Loading Loading @@ -5771,7 +5774,10 @@ package android.app { method public android.content.pm.ServiceInfo getServiceInfo(); method public java.lang.String getServiceName(); method public java.lang.String getSettingsActivity(); method public boolean getShowMetadataInPreview(); method public java.lang.CharSequence loadAuthor(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadContextDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.net.Uri loadContextUri(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager); method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager); core/java/android/app/WallpaperInfo.java +76 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.content.res.Resources; import android.content.res.TypedArray; import android.content.res.XmlResourceParser; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Parcel; import android.os.Parcelable; import android.service.wallpaper.WallpaperService; Loading Loading @@ -72,6 +73,10 @@ public final class WallpaperInfo implements Parcelable { */ final int mDescriptionResource; final int mContextUriResource; final int mContextDescriptionResource; final boolean mShowMetadataInPreview; /** * Constructor. * Loading @@ -89,6 +94,9 @@ public final class WallpaperInfo implements Parcelable { int thumbnailRes = -1; int authorRes = -1; int descriptionRes = -1; int contextUriRes = -1; int contextDescriptionRes = -1; boolean showMetadataInPreview = false; XmlResourceParser parser = null; try { Loading Loading @@ -127,6 +135,15 @@ public final class WallpaperInfo implements Parcelable { descriptionRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_description, -1); contextUriRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_contextUri, -1); contextDescriptionRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_contextDescription, -1); showMetadataInPreview = sa.getBoolean( com.android.internal.R.styleable.Wallpaper_showMetadataInPreview, false); sa.recycle(); } catch (NameNotFoundException e) { Loading @@ -140,6 +157,9 @@ public final class WallpaperInfo implements Parcelable { mThumbnailResource = thumbnailRes; mAuthorResource = authorRes; mDescriptionResource = descriptionRes; mContextUriResource = contextUriRes; mContextDescriptionResource = contextDescriptionRes; mShowMetadataInPreview = showMetadataInPreview; } WallpaperInfo(Parcel source) { Loading @@ -147,6 +167,9 @@ public final class WallpaperInfo implements Parcelable { mThumbnailResource = source.readInt(); mAuthorResource = source.readInt(); mDescriptionResource = source.readInt(); mContextUriResource = source.readInt(); mContextDescriptionResource = source.readInt(); mShowMetadataInPreview = source.readInt() != 0; mService = ResolveInfo.CREATOR.createFromParcel(source); } Loading Loading @@ -249,6 +272,54 @@ public final class WallpaperInfo implements Parcelable { mService.serviceInfo.applicationInfo); } /** * Returns an URI that specifies a link for further context about this wallpaper. * * @param pm An instance of {@link PackageManager} to retrieve the URI. * @return The URI. */ public Uri loadContextUri(PackageManager pm) throws NotFoundException { if (mContextUriResource <= 0) throw new NotFoundException(); String packageName = mService.resolvePackageName; ApplicationInfo applicationInfo = null; if (packageName == null) { packageName = mService.serviceInfo.packageName; applicationInfo = mService.serviceInfo.applicationInfo; } String contextUriString = pm.getText( packageName, mContextUriResource, applicationInfo).toString(); if (contextUriString == null) { return null; } return Uri.parse(contextUriString); } /** * Retrieves a title of the URI that specifies a link for further context about this wallpaper. * * @param pm An instance of {@link PackageManager} to retrieve the title. * @return The title. */ public CharSequence loadContextDescription(PackageManager pm) throws NotFoundException { if (mContextDescriptionResource <= 0) throw new NotFoundException(); String packageName = mService.resolvePackageName; ApplicationInfo applicationInfo = null; if (packageName == null) { packageName = mService.serviceInfo.packageName; applicationInfo = mService.serviceInfo.applicationInfo; } return pm.getText(packageName, mContextDescriptionResource, applicationInfo).toString(); } /** * Queries whether any metadata should be shown when previewing the wallpaper. * * @return Whether any metadata should be shown when previewing the wallpaper. */ public boolean getShowMetadataInPreview() { return mShowMetadataInPreview; } /** * 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 @@ -287,6 +358,9 @@ public final class WallpaperInfo implements Parcelable { dest.writeInt(mThumbnailResource); dest.writeInt(mAuthorResource); dest.writeInt(mDescriptionResource); dest.writeInt(mContextUriResource); dest.writeInt(mContextDescriptionResource); dest.writeInt(mShowMetadataInPreview ? 1 : 0); mService.writeToParcel(dest, flags); } Loading core/java/android/service/wallpaper/WallpaperService.java +3 −2 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ import android.view.SurfaceHolder; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.view.WindowManager.LayoutParams; import android.view.WindowManagerGlobal; import java.io.FileDescriptor; Loading Loading @@ -628,9 +629,9 @@ public abstract class WallpaperService extends Service { mCurWindowFlags = mWindowFlags; mLayout.flags = mWindowFlags | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE ; | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; mCurWindowPrivateFlags = mWindowPrivateFlags; mLayout.privateFlags = mWindowPrivateFlags; Loading Loading
api/current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -420,7 +420,9 @@ package android { field public static final int contentInsetStart = 16843859; // 0x1010453 field public static final int contentInsetStartWithNavigation = 16844066; // 0x1010522 field public static final int contextClickable = 16844007; // 0x10104e7 field public static final int contextDescription = 16844082; // 0x1010532 field public static final int contextPopupMenuStyle = 16844033; // 0x1010501 field public static final int contextUri = 16844081; // 0x1010531 field public static final int controlX1 = 16843772; // 0x10103fc field public static final int controlX2 = 16843774; // 0x10103fe field public static final int controlY1 = 16843773; // 0x10103fd Loading Loading @@ -1120,6 +1122,7 @@ package android { field public static final int showDefault = 16843258; // 0x10101fa field public static final int showDividers = 16843561; // 0x1010329 field public static final int showForAllUsers = 16844015; // 0x10104ef field public static final int showMetadataInPreview = 16844083; // 0x1010533 field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9 field public static final int showSilent = 16843259; // 0x10101fb field public static final int showText = 16843949; // 0x10104ad Loading Loading @@ -5765,7 +5768,10 @@ package android.app { method public android.content.pm.ServiceInfo getServiceInfo(); method public java.lang.String getServiceName(); method public java.lang.String getSettingsActivity(); method public boolean getShowMetadataInPreview(); method public java.lang.CharSequence loadAuthor(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadContextDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.net.Uri loadContextUri(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager); method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
api/system-current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -526,7 +526,9 @@ package android { field public static final int contentInsetStart = 16843859; // 0x1010453 field public static final int contentInsetStartWithNavigation = 16844066; // 0x1010522 field public static final int contextClickable = 16844007; // 0x10104e7 field public static final int contextDescription = 16844082; // 0x1010532 field public static final int contextPopupMenuStyle = 16844033; // 0x1010501 field public static final int contextUri = 16844081; // 0x1010531 field public static final int controlX1 = 16843772; // 0x10103fc field public static final int controlX2 = 16843774; // 0x10103fe field public static final int controlY1 = 16843773; // 0x10103fd Loading Loading @@ -1230,6 +1232,7 @@ package android { field public static final int showDefault = 16843258; // 0x10101fa field public static final int showDividers = 16843561; // 0x1010329 field public static final int showForAllUsers = 16844015; // 0x10104ef field public static final int showMetadataInPreview = 16844083; // 0x1010533 field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9 field public static final int showSilent = 16843259; // 0x10101fb field public static final int showText = 16843949; // 0x10104ad Loading Loading @@ -5912,7 +5915,10 @@ package android.app { method public android.content.pm.ServiceInfo getServiceInfo(); method public java.lang.String getServiceName(); method public java.lang.String getSettingsActivity(); method public boolean getShowMetadataInPreview(); method public java.lang.CharSequence loadAuthor(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadContextDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.net.Uri loadContextUri(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager); method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
api/test-current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -420,7 +420,9 @@ package android { field public static final int contentInsetStart = 16843859; // 0x1010453 field public static final int contentInsetStartWithNavigation = 16844066; // 0x1010522 field public static final int contextClickable = 16844007; // 0x10104e7 field public static final int contextDescription = 16844082; // 0x1010532 field public static final int contextPopupMenuStyle = 16844033; // 0x1010501 field public static final int contextUri = 16844081; // 0x1010531 field public static final int controlX1 = 16843772; // 0x10103fc field public static final int controlX2 = 16843774; // 0x10103fe field public static final int controlY1 = 16843773; // 0x10103fd Loading Loading @@ -1120,6 +1122,7 @@ package android { field public static final int showDefault = 16843258; // 0x10101fa field public static final int showDividers = 16843561; // 0x1010329 field public static final int showForAllUsers = 16844015; // 0x10104ef field public static final int showMetadataInPreview = 16844083; // 0x1010533 field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9 field public static final int showSilent = 16843259; // 0x10101fb field public static final int showText = 16843949; // 0x10104ad Loading Loading @@ -5771,7 +5774,10 @@ package android.app { method public android.content.pm.ServiceInfo getServiceInfo(); method public java.lang.String getServiceName(); method public java.lang.String getSettingsActivity(); method public boolean getShowMetadataInPreview(); method public java.lang.CharSequence loadAuthor(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadContextDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.net.Uri loadContextUri(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException; method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager); method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
core/java/android/app/WallpaperInfo.java +76 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.content.res.Resources; import android.content.res.TypedArray; import android.content.res.XmlResourceParser; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Parcel; import android.os.Parcelable; import android.service.wallpaper.WallpaperService; Loading Loading @@ -72,6 +73,10 @@ public final class WallpaperInfo implements Parcelable { */ final int mDescriptionResource; final int mContextUriResource; final int mContextDescriptionResource; final boolean mShowMetadataInPreview; /** * Constructor. * Loading @@ -89,6 +94,9 @@ public final class WallpaperInfo implements Parcelable { int thumbnailRes = -1; int authorRes = -1; int descriptionRes = -1; int contextUriRes = -1; int contextDescriptionRes = -1; boolean showMetadataInPreview = false; XmlResourceParser parser = null; try { Loading Loading @@ -127,6 +135,15 @@ public final class WallpaperInfo implements Parcelable { descriptionRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_description, -1); contextUriRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_contextUri, -1); contextDescriptionRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_contextDescription, -1); showMetadataInPreview = sa.getBoolean( com.android.internal.R.styleable.Wallpaper_showMetadataInPreview, false); sa.recycle(); } catch (NameNotFoundException e) { Loading @@ -140,6 +157,9 @@ public final class WallpaperInfo implements Parcelable { mThumbnailResource = thumbnailRes; mAuthorResource = authorRes; mDescriptionResource = descriptionRes; mContextUriResource = contextUriRes; mContextDescriptionResource = contextDescriptionRes; mShowMetadataInPreview = showMetadataInPreview; } WallpaperInfo(Parcel source) { Loading @@ -147,6 +167,9 @@ public final class WallpaperInfo implements Parcelable { mThumbnailResource = source.readInt(); mAuthorResource = source.readInt(); mDescriptionResource = source.readInt(); mContextUriResource = source.readInt(); mContextDescriptionResource = source.readInt(); mShowMetadataInPreview = source.readInt() != 0; mService = ResolveInfo.CREATOR.createFromParcel(source); } Loading Loading @@ -249,6 +272,54 @@ public final class WallpaperInfo implements Parcelable { mService.serviceInfo.applicationInfo); } /** * Returns an URI that specifies a link for further context about this wallpaper. * * @param pm An instance of {@link PackageManager} to retrieve the URI. * @return The URI. */ public Uri loadContextUri(PackageManager pm) throws NotFoundException { if (mContextUriResource <= 0) throw new NotFoundException(); String packageName = mService.resolvePackageName; ApplicationInfo applicationInfo = null; if (packageName == null) { packageName = mService.serviceInfo.packageName; applicationInfo = mService.serviceInfo.applicationInfo; } String contextUriString = pm.getText( packageName, mContextUriResource, applicationInfo).toString(); if (contextUriString == null) { return null; } return Uri.parse(contextUriString); } /** * Retrieves a title of the URI that specifies a link for further context about this wallpaper. * * @param pm An instance of {@link PackageManager} to retrieve the title. * @return The title. */ public CharSequence loadContextDescription(PackageManager pm) throws NotFoundException { if (mContextDescriptionResource <= 0) throw new NotFoundException(); String packageName = mService.resolvePackageName; ApplicationInfo applicationInfo = null; if (packageName == null) { packageName = mService.serviceInfo.packageName; applicationInfo = mService.serviceInfo.applicationInfo; } return pm.getText(packageName, mContextDescriptionResource, applicationInfo).toString(); } /** * Queries whether any metadata should be shown when previewing the wallpaper. * * @return Whether any metadata should be shown when previewing the wallpaper. */ public boolean getShowMetadataInPreview() { return mShowMetadataInPreview; } /** * 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 @@ -287,6 +358,9 @@ public final class WallpaperInfo implements Parcelable { dest.writeInt(mThumbnailResource); dest.writeInt(mAuthorResource); dest.writeInt(mDescriptionResource); dest.writeInt(mContextUriResource); dest.writeInt(mContextDescriptionResource); dest.writeInt(mShowMetadataInPreview ? 1 : 0); mService.writeToParcel(dest, flags); } Loading
core/java/android/service/wallpaper/WallpaperService.java +3 −2 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ import android.view.SurfaceHolder; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.view.WindowManager.LayoutParams; import android.view.WindowManagerGlobal; import java.io.FileDescriptor; Loading Loading @@ -628,9 +629,9 @@ public abstract class WallpaperService extends Service { mCurWindowFlags = mWindowFlags; mLayout.flags = mWindowFlags | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE ; | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; mCurWindowPrivateFlags = mWindowPrivateFlags; mLayout.privateFlags = mWindowPrivateFlags; Loading