LauncherApps.Callback
public
static
abstract
class
LauncherApps.Callback
extends Object
| java.lang.Object | |
| ↳ | android.content.pm.LauncherApps.Callback |
Callbacks for package changes to this and related managed profiles.
Summary
Public constructors | |
|---|---|
LauncherApps.Callback()
|
|
Public methods | |
|---|---|
abstract
void
|
onPackageAdded(String packageName, UserHandle user)
Indicates that a package was added to the specified profile. |
abstract
void
|
onPackageChanged(String packageName, UserHandle user)
Indicates that a package was modified in the specified profile. |
abstract
void
|
onPackageRemoved(String packageName, UserHandle user)
Indicates that a package was removed from the specified profile. |
abstract
void
|
onPackagesAvailable(String[] packageNames, UserHandle user, boolean replacing)
Indicates that one or more packages have become available. |
void
|
onPackagesSuspended(String[] packageNames, UserHandle user)
Indicates that one or more packages have been suspended. |
abstract
void
|
onPackagesUnavailable(String[] packageNames, UserHandle user, boolean replacing)
Indicates that one or more packages have become unavailable. |
void
|
onPackagesUnsuspended(String[] packageNames, UserHandle user)
Indicates that one or more packages have been unsuspended. |
void
|
onShortcutsChanged(String packageName, List<ShortcutInfo> shortcuts, UserHandle user)
Indicates that one or more shortcuts of any kind (dynamic, pinned, or manifest) have been added, updated or removed. |
Inherited methods | |
|---|---|
java.lang.Object
| |
Public constructors
Public methods
onPackageAdded
void onPackageAdded (String packageName, UserHandle user)
Indicates that a package was added to the specified profile. If a package is added while being updated then onPackageChanged will be called instead.
| Parameters | |
|---|---|
packageName |
String: The name of the package that was added. |
user |
UserHandle: The UserHandle of the profile that generated the change.
|
onPackageChanged
void onPackageChanged (String packageName, UserHandle user)
Indicates that a package was modified in the specified profile. This can happen, for example, when the package is updated or when one or more components are enabled or disabled.
| Parameters | |
|---|---|
packageName |
String: The name of the package that has changed. |
user |
UserHandle: The UserHandle of the profile that generated the change.
|
onPackageRemoved
void onPackageRemoved (String packageName, UserHandle user)
Indicates that a package was removed from the specified profile. If a package is removed while being updated onPackageChanged will be called instead.
| Parameters | |
|---|---|
packageName |
String: The name of the package that was removed. |
user |
UserHandle: The UserHandle of the profile that generated the change.
|
onPackagesAvailable
void onPackagesAvailable (String[] packageNames, UserHandle user, boolean replacing)
Indicates that one or more packages have become available. For example, this can happen when a removable storage card has reappeared.
| Parameters | |
|---|---|
packageNames |
String: The names of the packages that have become
available. |
user |
UserHandle: The UserHandle of the profile that generated the change. |
replacing |
boolean: Indicates whether these packages are replacing
existing ones.
|
onPackagesSuspended
void onPackagesSuspended (String[] packageNames, UserHandle user)
Indicates that one or more packages have been suspended. For example, this can happen when a Device Administrator suspends an applicaton.
| Parameters | |
|---|---|
packageNames |
String: The names of the packages that have just been
suspended. |
user |
UserHandle: The UserHandle of the profile that generated the change.
|
onPackagesUnavailable
void onPackagesUnavailable (String[] packageNames, UserHandle user, boolean replacing)
Indicates that one or more packages have become unavailable. For example, this can happen when a removable storage card has been removed.
| Parameters | |
|---|---|
packageNames |
String: The names of the packages that have become
unavailable. |
user |
UserHandle: The UserHandle of the profile that generated the change. |
replacing |
boolean: Indicates whether the packages are about to be
replaced with new versions.
|
onPackagesUnsuspended
void onPackagesUnsuspended (String[] packageNames, UserHandle user)
Indicates that one or more packages have been unsuspended. For example, this can happen when a Device Administrator unsuspends an applicaton.
| Parameters | |
|---|---|
packageNames |
String: The names of the packages that have just been
unsuspended. |
user |
UserHandle: The UserHandle of the profile that generated the change.
|
onShortcutsChanged
void onShortcutsChanged (String packageName, List<ShortcutInfo> shortcuts, UserHandle user)
Indicates that one or more shortcuts of any kind (dynamic, pinned, or manifest) have been added, updated or removed.
Only the applications that are allowed to access the shortcut information,
as defined in hasShortcutHostPermission(), will receive it.
| Parameters | |
|---|---|
packageName |
String: The name of the package that has the shortcuts.This value must never be |
shortcuts |
List: All shortcuts from the package (dynamic, manifest and/or pinned).
Only "key" information will be provided, as defined in
hasKeyFieldsOnly().This value must never be |
user |
UserHandle: The UserHandle of the profile that generated the change.This value must never be |
See also:
Classes
- ActivityInfo
- ActivityInfo.WindowLayout
- ApplicationInfo
- ApplicationInfo.DisplayNameComparator
- ChangedPackages
- ComponentInfo
- ConfigurationInfo
- FeatureGroupInfo
- FeatureInfo
- InstrumentationInfo
- LabeledIntent
- LauncherActivityInfo
- LauncherApps
- LauncherApps.Callback
- LauncherApps.PinItemRequest
- LauncherApps.ShortcutQuery
- PackageInfo
- PackageInstaller
- PackageInstaller.Session
- PackageInstaller.SessionCallback
- PackageInstaller.SessionInfo
- PackageInstaller.SessionParams
- PackageItemInfo
- PackageItemInfo.DisplayNameComparator
- PackageManager
- PackageStats
- PathPermission
- PermissionGroupInfo
- PermissionInfo
- ProviderInfo
- ResolveInfo
- ResolveInfo.DisplayNameComparator
- ServiceInfo
- SharedLibraryInfo
- ShortcutInfo
- ShortcutInfo.Builder
- ShortcutManager
- Signature
- VersionedPackage
Exceptions