Fields Summary |
---|
static final String | TAG |
final android.content.pm.ResolveInfo | mServiceThe Service that implements this wallpaper component. |
final String | mSettingsActivityNameThe wallpaper setting activity's name, to
launch the setting activity of this wallpaper. |
final int | mThumbnailResourceResource identifier for this wallpaper's thumbnail image. |
final int | mAuthorResourceResource identifier for a string indicating the author of the wallpaper. |
final int | mDescriptionResourceResource identifier for a string containing a short description of the wallpaper. |
public static final Parcelable.Creator | CREATORUsed to make this class parcelable. |
Methods Summary |
---|
public int | describeContents()
return 0;
|
public void | dump(android.util.Printer pw, java.lang.String prefix)
pw.println(prefix + "Service:");
mService.dump(pw, prefix + " ");
pw.println(prefix + "mSettingsActivityName=" + mSettingsActivityName);
|
public android.content.ComponentName | getComponent()Return the component of the service that implements this wallpaper.
return new ComponentName(mService.serviceInfo.packageName,
mService.serviceInfo.name);
|
public java.lang.String | getPackageName()Return the .apk package that implements this wallpaper.
return mService.serviceInfo.packageName;
|
public android.content.pm.ServiceInfo | getServiceInfo()Return the raw information about the Service implementing this
wallpaper. Do not modify the returned object.
return mService.serviceInfo;
|
public java.lang.String | getServiceName()Return the class name of the service component that implements
this wallpaper.
return mService.serviceInfo.name;
|
public java.lang.String | getSettingsActivity()Return the class name of an activity that provides a settings UI for
the wallpaper. You can launch this activity be starting it with
an {@link android.content.Intent} whose action is MAIN and with an
explicit {@link android.content.ComponentName}
composed of {@link #getPackageName} and the class name returned here.
A null will be returned if there is no settings activity associated
with the wallpaper.
return mSettingsActivityName;
|
public java.lang.CharSequence | loadAuthor(android.content.pm.PackageManager pm)Return a string indicating the author(s) of this wallpaper.
if (mAuthorResource <= 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, mAuthorResource, applicationInfo);
|
public java.lang.CharSequence | loadDescription(android.content.pm.PackageManager pm)Return a brief summary of this wallpaper's behavior.
String packageName = mService.resolvePackageName;
ApplicationInfo applicationInfo = null;
if (packageName == null) {
packageName = mService.serviceInfo.packageName;
applicationInfo = mService.serviceInfo.applicationInfo;
}
if (mService.serviceInfo.descriptionRes != 0) {
return pm.getText(packageName, mService.serviceInfo.descriptionRes,
applicationInfo);
}
if (mDescriptionResource <= 0) throw new NotFoundException();
return pm.getText(packageName, mDescriptionResource,
mService.serviceInfo.applicationInfo);
|
public android.graphics.drawable.Drawable | loadIcon(android.content.pm.PackageManager pm)Load the user-displayed icon for this wallpaper.
return mService.loadIcon(pm);
|
public java.lang.CharSequence | loadLabel(android.content.pm.PackageManager pm)Load the user-displayed label for this wallpaper.
return mService.loadLabel(pm);
|
public android.graphics.drawable.Drawable | loadThumbnail(android.content.pm.PackageManager pm)Load the thumbnail image for this wallpaper.
if (mThumbnailResource < 0) return null;
return pm.getDrawable(mService.serviceInfo.packageName,
mThumbnailResource,
mService.serviceInfo.applicationInfo);
|
public java.lang.String | toString()
return "WallpaperInfo{" + mService.serviceInfo.name
+ ", settings: "
+ mSettingsActivityName + "}";
|
public void | writeToParcel(android.os.Parcel dest, int flags)Used to package this object into a {@link Parcel}.
dest.writeString(mSettingsActivityName);
dest.writeInt(mThumbnailResource);
dest.writeInt(mAuthorResource);
dest.writeInt(mDescriptionResource);
mService.writeToParcel(dest, flags);
|