public abstract static class LauncherApps.Callback extends Object
Constructor and Description |
---|
Callback() |
Modifier and Type | Method and Description |
---|---|
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.
|
public abstract void onPackageRemoved(String packageName, UserHandle user)
packageName
- The name of the package that was removed.user
- The UserHandle of the profile that generated the change.public abstract void onPackageAdded(String packageName, UserHandle user)
packageName
- The name of the package that was added.user
- The UserHandle of the profile that generated the change.public abstract void onPackageChanged(String packageName, UserHandle user)
packageName
- The name of the package that has changed.user
- The UserHandle of the profile that generated the change.public abstract void onPackagesAvailable(String[] packageNames, UserHandle user, boolean replacing)
packageNames
- The names of the packages that have become
available.user
- The UserHandle of the profile that generated the change.replacing
- Indicates whether these packages are replacing
existing ones.public abstract void onPackagesUnavailable(String[] packageNames, UserHandle user, boolean replacing)
packageNames
- The names of the packages that have become
unavailable.user
- The UserHandle of the profile that generated the change.replacing
- Indicates whether the packages are about to be
replaced with new versions.public void onPackagesSuspended(String[] packageNames, UserHandle user)
packageNames
- The names of the packages that have just been
suspended.user
- The UserHandle of the profile that generated the change.public void onPackagesUnsuspended(String[] packageNames, UserHandle user)
packageNames
- The names of the packages that have just been
unsuspended.user
- The UserHandle of the profile that generated the change.public void onShortcutsChanged(String packageName, List<ShortcutInfo> shortcuts, UserHandle user)
Only the applications that are allowed to access the shortcut information,
as defined in LauncherApps.hasShortcutHostPermission()
, will receive it.
packageName
- The name of the package that has the shortcuts.shortcuts
- All shortcuts from the package (dynamic, manifest and/or pinned).
Only "key" information will be provided, as defined in
ShortcutInfo.hasKeyFieldsOnly()
.user
- The UserHandle of the profile that generated the change.ShortcutManager