WallpaperInfo
public
final
class
WallpaperInfo
extends Object
implements
Parcelable
| java.lang.Object | |
| ↳ | android.app.WallpaperInfo |
This class is used to specify meta information of a wallpaper service.
Summary
Inherited constants |
|---|
android.os.Parcelable
|
Fields | |
|---|---|
public
static
final
Creator<WallpaperInfo> |
CREATOR
Used to make this class parcelable. |
Public constructors | |
|---|---|
WallpaperInfo(Context context, ResolveInfo service)
Constructor. |
|
Public methods | |
|---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
void
|
dump(Printer pw, String prefix)
|
ComponentName
|
getComponent()
Return the component of the service that implements this wallpaper. |
String
|
getPackageName()
Return the .apk package that implements this wallpaper. |
ServiceInfo
|
getServiceInfo()
Return the raw information about the Service implementing this wallpaper. |
String
|
getServiceName()
Return the class name of the service component that implements this wallpaper. |
String
|
getSettingsActivity()
Return the class name of an activity that provides a settings UI for the wallpaper. |
boolean
|
getShowMetadataInPreview()
Queries whether any metadata should be shown when previewing the wallpaper. |
CharSequence
|
loadAuthor(PackageManager pm)
Return a string indicating the author(s) of this wallpaper. |
CharSequence
|
loadContextDescription(PackageManager pm)
Retrieves a title of the URI that specifies a link for further context about this wallpaper. |
Uri
|
loadContextUri(PackageManager pm)
Returns an URI that specifies a link for further context about this wallpaper. |
CharSequence
|
loadDescription(PackageManager pm)
Return a brief summary of this wallpaper's behavior. |
Drawable
|
loadIcon(PackageManager pm)
Load the user-displayed icon for this wallpaper. |
CharSequence
|
loadLabel(PackageManager pm)
Load the user-displayed label for this wallpaper. |
Drawable
|
loadThumbnail(PackageManager pm)
Load the thumbnail image for this wallpaper. |
String
|
toString()
Returns a string representation of the object. |
void
|
writeToParcel(Parcel dest, int flags)
Used to package this object into a |
Inherited methods | |
|---|---|
java.lang.Object
| |
android.os.Parcelable
| |
Fields
Public constructors
WallpaperInfo
WallpaperInfo (Context context, ResolveInfo service)
Constructor.
| Parameters | |
|---|---|
context |
Context: The Context in which we are parsing the wallpaper. |
service |
ResolveInfo: The ResolveInfo returned from the package manager about
this wallpaper's component.
|
| Throws | |
|---|---|
XmlPullParserException |
|
IOException |
|
Public methods
describeContents
int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(Parcel, int),
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR bit.
| Returns | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
getComponent
ComponentName getComponent ()
Return the component of the service that implements this wallpaper.
| Returns | |
|---|---|
ComponentName |
|
getPackageName
String getPackageName ()
Return the .apk package that implements this wallpaper.
| Returns | |
|---|---|
String |
|
getServiceInfo
ServiceInfo getServiceInfo ()
Return the raw information about the Service implementing this wallpaper. Do not modify the returned object.
| Returns | |
|---|---|
ServiceInfo |
|
getServiceName
String getServiceName ()
Return the class name of the service component that implements this wallpaper.
| Returns | |
|---|---|
String |
|
getSettingsActivity
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 Intent whose action is MAIN and with an
explicit ComponentName
composed of getPackageName() and the class name returned here.
A null will be returned if there is no settings activity associated with the wallpaper.
| Returns | |
|---|---|
String |
|
getShowMetadataInPreview
boolean getShowMetadataInPreview ()
Queries whether any metadata should be shown when previewing the wallpaper. If this value is
set to true, any component that shows a preview of this live wallpaper should also show
accompanying information like loadLabel(PackageManager),
loadDescription(PackageManager), loadAuthor(PackageManager) and
loadContextDescription(PackageManager), so the user gets to know further information
about this wallpaper.
| Returns | |
|---|---|
boolean |
Whether any metadata should be shown when previewing the wallpaper. |
loadAuthor
CharSequence loadAuthor (PackageManager pm)
Return a string indicating the author(s) of this wallpaper.
| Parameters | |
|---|---|
pm |
PackageManager |
| Returns | |
|---|---|
CharSequence |
|
| Throws | |
|---|---|
Resources.NotFoundException |
|
loadContextDescription
CharSequence loadContextDescription (PackageManager pm)
Retrieves a title of the URI that specifies a link for further context about this wallpaper.
| Parameters | |
|---|---|
pm |
PackageManager: An instance of PackageManager to retrieve the title. |
| Returns | |
|---|---|
CharSequence |
The title. |
| Throws | |
|---|---|
Resources.NotFoundException |
|
loadContextUri
Uri loadContextUri (PackageManager pm)
Returns an URI that specifies a link for further context about this wallpaper.
| Parameters | |
|---|---|
pm |
PackageManager: An instance of PackageManager to retrieve the URI. |
| Returns | |
|---|---|
Uri |
The URI. |
| Throws | |
|---|---|
Resources.NotFoundException |
|
loadDescription
CharSequence loadDescription (PackageManager pm)
Return a brief summary of this wallpaper's behavior.
| Parameters | |
|---|---|
pm |
PackageManager |
| Returns | |
|---|---|
CharSequence |
|
| Throws | |
|---|---|
Resources.NotFoundException |
|
loadIcon
Drawable loadIcon (PackageManager pm)
Load the user-displayed icon for this wallpaper.
| Parameters | |
|---|---|
pm |
PackageManager: Supply a PackageManager used to load the wallpaper's
resources.
|
| Returns | |
|---|---|
Drawable |
|
loadLabel
CharSequence loadLabel (PackageManager pm)
Load the user-displayed label for this wallpaper.
| Parameters | |
|---|---|
pm |
PackageManager: Supply a PackageManager used to load the wallpaper's
resources.
|
| Returns | |
|---|---|
CharSequence |
|
loadThumbnail
Drawable loadThumbnail (PackageManager pm)
Load the thumbnail image for this wallpaper.
| Parameters | |
|---|---|
pm |
PackageManager: Supply a PackageManager used to load the wallpaper's
resources.
|
| Returns | |
|---|---|
Drawable |
|
toString
String toString ()
Returns a string representation of the object. In general, the
toString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
| Returns | |
|---|---|
String |
a string representation of the object. |
writeToParcel
void writeToParcel (Parcel dest, int flags)
Used to package this object into a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: The Parcel to be written. |
flags |
int: The flags used for parceling.
|
Interfaces
- ActionBar.OnMenuVisibilityListener
- ActionBar.OnNavigationListener
- ActionBar.TabListener
- AlarmManager.OnAlarmListener
- Application.ActivityLifecycleCallbacks
- Application.OnProvideAssistDataListener
- AppOpsManager.OnOpChangedListener
- DatePickerDialog.OnDateSetListener
- FragmentBreadCrumbs.OnBreadCrumbClickListener
- FragmentManager.BackStackEntry
- FragmentManager.OnBackStackChangedListener
- KeyguardManager.OnKeyguardExitResult
- LoaderManager.LoaderCallbacks
- Notification.Action.Extender
- Notification.Extender
- PendingIntent.OnFinished
- SearchManager.OnCancelListener
- SearchManager.OnDismissListener
- SharedElementCallback.OnSharedElementsReadyListener
- TimePickerDialog.OnTimeSetListener
- UiAutomation.AccessibilityEventFilter
- UiAutomation.OnAccessibilityEventListener
Classes
- ActionBar
- ActionBar.LayoutParams
- ActionBar.Tab
- Activity
- ActivityGroup
- ActivityManager
- ActivityManager.AppTask
- ActivityManager.MemoryInfo
- ActivityManager.ProcessErrorStateInfo
- ActivityManager.RecentTaskInfo
- ActivityManager.RunningAppProcessInfo
- ActivityManager.RunningServiceInfo
- ActivityManager.RunningTaskInfo
- ActivityManager.TaskDescription
- ActivityOptions
- AlarmManager
- AlarmManager.AlarmClockInfo
- AlertDialog
- AlertDialog.Builder
- AliasActivity
- Application
- ApplicationErrorReport
- ApplicationErrorReport.AnrInfo
- ApplicationErrorReport.BatteryInfo
- ApplicationErrorReport.CrashInfo
- ApplicationErrorReport.RunningServiceInfo
- AppOpsManager
- AutomaticZenRule
- DatePickerDialog
- Dialog
- DialogFragment
- DownloadManager
- DownloadManager.Query
- DownloadManager.Request
- ExpandableListActivity
- Fragment
- Fragment.SavedState
- FragmentBreadCrumbs
- FragmentContainer
- FragmentController
- FragmentHostCallback
- FragmentManager
- FragmentManager.FragmentLifecycleCallbacks
- FragmentManagerNonConfig
- FragmentTransaction
- Instrumentation
- Instrumentation.ActivityMonitor
- Instrumentation.ActivityResult
- IntentService
- KeyguardManager
- KeyguardManager.KeyguardDismissCallback
- KeyguardManager.KeyguardLock
- LauncherActivity
- LauncherActivity.IconResizer
- LauncherActivity.ListItem
- ListActivity
- ListFragment
- LoaderManager
- LocalActivityManager
- MediaRouteActionProvider
- MediaRouteButton
- NativeActivity
- Notification
- Notification.Action
- Notification.Action.Builder
- Notification.Action.WearableExtender
- Notification.BigPictureStyle
- Notification.BigTextStyle
- Notification.Builder
- Notification.CarExtender
- Notification.CarExtender.Builder
- Notification.CarExtender.UnreadConversation
- Notification.DecoratedCustomViewStyle
- Notification.DecoratedMediaCustomViewStyle
- Notification.InboxStyle
- Notification.MediaStyle
- Notification.MessagingStyle
- Notification.MessagingStyle.Message
- Notification.Style
- Notification.WearableExtender
- NotificationChannel
- NotificationChannelGroup
- NotificationManager
- NotificationManager.Policy
- PendingIntent
- PictureInPictureParams
- PictureInPictureParams.Builder
- Presentation
- ProgressDialog
- RemoteAction
- RemoteInput
- RemoteInput.Builder
- SearchableInfo
- SearchManager
- Service
- SharedElementCallback
- TabActivity
- TaskStackBuilder
- TimePickerDialog
- UiAutomation
- UiModeManager
- VoiceInteractor
- VoiceInteractor.AbortVoiceRequest
- VoiceInteractor.CommandRequest
- VoiceInteractor.CompleteVoiceRequest
- VoiceInteractor.ConfirmationRequest
- VoiceInteractor.PickOptionRequest
- VoiceInteractor.PickOptionRequest.Option
- VoiceInteractor.Prompt
- VoiceInteractor.Request
- WallpaperInfo
- WallpaperManager
Exceptions