Build 1.0_r1(from source)

android.content.pm
Interface IPackageManager

All Superinterfaces:
IInterface
All Known Implementing Classes:
IPackageManager.Stub

public interface IPackageManager
extends IInterface

See PackageManager for documentation on most of the APIs here.


Nested Class Summary
static class IPackageManager.Stub
          Local-side IPC implementation stub class.
 
Method Summary
 void addPackageToPreferred(String packageName)
           
 boolean addPermission(PermissionInfo info)
           
 void addPreferredActivity(IntentFilter filter, int match, ComponentName[] set, ComponentName activity)
           
 int checkPermission(String permName, String pkgName)
           
 int checkSignatures(String pkg1, String pkg2)
           
 int checkUidPermission(String permName, int uid)
           
 void clearApplicationUserData(String packageName, IPackageDataObserver observer)
          Clear the user data directory of an application.
 void clearPackagePreferredActivities(String packageName)
           
 void deleteApplicationCacheFiles(String packageName, IPackageDataObserver observer)
          Delete all the cache files in an applications cache directory
 void deletePackage(String packageName, IPackageDeleteObserver observer, int flags)
          Delete a package.
 void enterSafeMode()
           
 void freeApplicationCache(long freeStorageSize, IPackageDataObserver observer)
          Free storage by deleting LRU sorted list of cache files across all applications.
 ActivityInfo getActivityInfo(ComponentName className, int flags)
           
 List<PermissionGroupInfo> getAllPermissionGroups(int flags)
           
 int getApplicationEnabledSetting(String packageName)
          As per PackageManager.getApplicationEnabledSetting(java.lang.String).
 ApplicationInfo getApplicationInfo(String packageName, int flags)
           
 int getComponentEnabledSetting(ComponentName componentName)
          As per PackageManager.getComponentEnabledSetting(android.content.ComponentName).
 List<ApplicationInfo> getInstalledApplications(int flags)
           
 List<PackageInfo> getInstalledPackages(int flags)
           
 InstrumentationInfo getInstrumentationInfo(ComponentName className, int flags)
           
 String getNameForUid(int uid)
           
 int[] getPackageGids(String packageName)
           
 PackageInfo getPackageInfo(String packageName, int flags)
           
 String[] getPackagesForUid(int uid)
           
 void getPackageSizeInfo(String packageName, IPackageStatsObserver observer)
          Get package statistics including the code, data and cache size for an already installed package
 int getPackageUid(String packageName)
           
 PermissionGroupInfo getPermissionGroupInfo(String name, int flags)
           
 PermissionInfo getPermissionInfo(String name, int flags)
           
 List<ApplicationInfo> getPersistentApplications(int flags)
          Retrieve all applications that are marked as persistent.
 int getPreferredActivities(List<IntentFilter> outFilters, List<ComponentName> outActivities, String packageName)
           
 List<PackageInfo> getPreferredPackages(int flags)
           
 ActivityInfo getReceiverInfo(ComponentName className, int flags)
           
 ServiceInfo getServiceInfo(ComponentName className, int flags)
           
 boolean hasSystemUidErrors()
           
 void installPackage(Uri packageURI, IPackageInstallObserver observer, int flags)
          Install a package.
 List<ProviderInfo> queryContentProviders(String processName, int uid, int flags)
           
 List<InstrumentationInfo> queryInstrumentation(String targetPackage, int flags)
           
 List<ResolveInfo> queryIntentActivities(Intent intent, String resolvedType, int flags)
           
 List<ResolveInfo> queryIntentActivityOptions(ComponentName caller, Intent[] specifics, String[] specificTypes, Intent intent, String resolvedType, int flags)
           
 List<ResolveInfo> queryIntentReceivers(Intent intent, String resolvedType, int flags)
           
 List<ResolveInfo> queryIntentServices(Intent intent, String resolvedType, int flags)
           
 List<PermissionInfo> queryPermissionsByGroup(String group, int flags)
           
 void querySyncProviders(List<String> outNames, List<ProviderInfo> outInfo)
          Retrieve sync information for all content providers.
 void removePackageFromPreferred(String packageName)
           
 void removePermission(String name)
           
 ProviderInfo resolveContentProvider(String name, int flags)
           
 ResolveInfo resolveIntent(Intent intent, String resolvedType, int flags)
           
 ResolveInfo resolveService(Intent intent, String resolvedType, int flags)
           
 void setApplicationEnabledSetting(String packageName, int newState, int flags)
          As per PackageManager.setApplicationEnabledSetting(java.lang.String, int, int).
 void setComponentEnabledSetting(ComponentName componentName, int newState, int flags)
          As per PackageManager.setComponentEnabledSetting(android.content.ComponentName, int, int).
 void systemReady()
           
 
Methods inherited from interface android.os.IInterface
asBinder
 

Method Detail

getPackageInfo

PackageInfo getPackageInfo(String packageName,
                           int flags)
                           throws RemoteException
Throws:
RemoteException

getPackageUid

int getPackageUid(String packageName)
                  throws RemoteException
Throws:
RemoteException

getPackageGids

int[] getPackageGids(String packageName)
                     throws RemoteException
Throws:
RemoteException

getPermissionInfo

PermissionInfo getPermissionInfo(String name,
                                 int flags)
                                 throws RemoteException
Throws:
RemoteException

queryPermissionsByGroup

List<PermissionInfo> queryPermissionsByGroup(String group,
                                             int flags)
                                             throws RemoteException
Throws:
RemoteException

getPermissionGroupInfo

PermissionGroupInfo getPermissionGroupInfo(String name,
                                           int flags)
                                           throws RemoteException
Throws:
RemoteException

getAllPermissionGroups

List<PermissionGroupInfo> getAllPermissionGroups(int flags)
                                                 throws RemoteException
Throws:
RemoteException

getApplicationInfo

ApplicationInfo getApplicationInfo(String packageName,
                                   int flags)
                                   throws RemoteException
Throws:
RemoteException

getActivityInfo

ActivityInfo getActivityInfo(ComponentName className,
                             int flags)
                             throws RemoteException
Throws:
RemoteException

getReceiverInfo

ActivityInfo getReceiverInfo(ComponentName className,
                             int flags)
                             throws RemoteException
Throws:
RemoteException

getServiceInfo

ServiceInfo getServiceInfo(ComponentName className,
                           int flags)
                           throws RemoteException
Throws:
RemoteException

checkPermission

int checkPermission(String permName,
                    String pkgName)
                    throws RemoteException
Throws:
RemoteException

checkUidPermission

int checkUidPermission(String permName,
                       int uid)
                       throws RemoteException
Throws:
RemoteException

addPermission

boolean addPermission(PermissionInfo info)
                      throws RemoteException
Throws:
RemoteException

removePermission

void removePermission(String name)
                      throws RemoteException
Throws:
RemoteException

checkSignatures

int checkSignatures(String pkg1,
                    String pkg2)
                    throws RemoteException
Throws:
RemoteException

getPackagesForUid

String[] getPackagesForUid(int uid)
                           throws RemoteException
Throws:
RemoteException

getNameForUid

String getNameForUid(int uid)
                     throws RemoteException
Throws:
RemoteException

resolveIntent

ResolveInfo resolveIntent(Intent intent,
                          String resolvedType,
                          int flags)
                          throws RemoteException
Throws:
RemoteException

queryIntentActivities

List<ResolveInfo> queryIntentActivities(Intent intent,
                                        String resolvedType,
                                        int flags)
                                        throws RemoteException
Throws:
RemoteException

queryIntentActivityOptions

List<ResolveInfo> queryIntentActivityOptions(ComponentName caller,
                                             Intent[] specifics,
                                             String[] specificTypes,
                                             Intent intent,
                                             String resolvedType,
                                             int flags)
                                             throws RemoteException
Throws:
RemoteException

queryIntentReceivers

List<ResolveInfo> queryIntentReceivers(Intent intent,
                                       String resolvedType,
                                       int flags)
                                       throws RemoteException
Throws:
RemoteException

resolveService

ResolveInfo resolveService(Intent intent,
                           String resolvedType,
                           int flags)
                           throws RemoteException
Throws:
RemoteException

queryIntentServices

List<ResolveInfo> queryIntentServices(Intent intent,
                                      String resolvedType,
                                      int flags)
                                      throws RemoteException
Throws:
RemoteException

getInstalledPackages

List<PackageInfo> getInstalledPackages(int flags)
                                       throws RemoteException
Throws:
RemoteException

getInstalledApplications

List<ApplicationInfo> getInstalledApplications(int flags)
                                               throws RemoteException
Throws:
RemoteException

getPersistentApplications

List<ApplicationInfo> getPersistentApplications(int flags)
                                                throws RemoteException
Retrieve all applications that are marked as persistent.

Returns:
A List<applicationInfo> containing one entry for each persistent application.
Throws:
RemoteException

resolveContentProvider

ProviderInfo resolveContentProvider(String name,
                                    int flags)
                                    throws RemoteException
Throws:
RemoteException

querySyncProviders

void querySyncProviders(List<String> outNames,
                        List<ProviderInfo> outInfo)
                        throws RemoteException
Retrieve sync information for all content providers.

Parameters:
outNames - Filled in with a list of the root names of the content providers that can sync.
outInfo - Filled in with a list of the ProviderInfo for each name in 'outNames'.
Throws:
RemoteException

queryContentProviders

List<ProviderInfo> queryContentProviders(String processName,
                                         int uid,
                                         int flags)
                                         throws RemoteException
Throws:
RemoteException

getInstrumentationInfo

InstrumentationInfo getInstrumentationInfo(ComponentName className,
                                           int flags)
                                           throws RemoteException
Throws:
RemoteException

queryInstrumentation

List<InstrumentationInfo> queryInstrumentation(String targetPackage,
                                               int flags)
                                               throws RemoteException
Throws:
RemoteException

installPackage

void installPackage(Uri packageURI,
                    IPackageInstallObserver observer,
                    int flags)
                    throws RemoteException
Install a package.

Parameters:
packageURI - The location of the package file to install.
observer - a callback to use to notify when the package installation in finished.
flags - - possible values: #FORWARD_LOCK_PACKAGE, #REPLACE_EXISITING_PACKAGE
Throws:
RemoteException

deletePackage

void deletePackage(String packageName,
                   IPackageDeleteObserver observer,
                   int flags)
                   throws RemoteException
Delete a package.

Parameters:
packageName - The fully qualified name of the package to delete.
observer - a callback to use to notify when the package deletion in finished.
flags - - possible values: #DONT_DELETE_DATA
Throws:
RemoteException

addPackageToPreferred

void addPackageToPreferred(String packageName)
                           throws RemoteException
Throws:
RemoteException

removePackageFromPreferred

void removePackageFromPreferred(String packageName)
                                throws RemoteException
Throws:
RemoteException

getPreferredPackages

List<PackageInfo> getPreferredPackages(int flags)
                                       throws RemoteException
Throws:
RemoteException

addPreferredActivity

void addPreferredActivity(IntentFilter filter,
                          int match,
                          ComponentName[] set,
                          ComponentName activity)
                          throws RemoteException
Throws:
RemoteException

clearPackagePreferredActivities

void clearPackagePreferredActivities(String packageName)
                                     throws RemoteException
Throws:
RemoteException

getPreferredActivities

int getPreferredActivities(List<IntentFilter> outFilters,
                           List<ComponentName> outActivities,
                           String packageName)
                           throws RemoteException
Throws:
RemoteException

setComponentEnabledSetting

void setComponentEnabledSetting(ComponentName componentName,
                                int newState,
                                int flags)
                                throws RemoteException
As per PackageManager.setComponentEnabledSetting(android.content.ComponentName, int, int).

Throws:
RemoteException

getComponentEnabledSetting

int getComponentEnabledSetting(ComponentName componentName)
                               throws RemoteException
As per PackageManager.getComponentEnabledSetting(android.content.ComponentName).

Throws:
RemoteException

setApplicationEnabledSetting

void setApplicationEnabledSetting(String packageName,
                                  int newState,
                                  int flags)
                                  throws RemoteException
As per PackageManager.setApplicationEnabledSetting(java.lang.String, int, int).

Throws:
RemoteException

getApplicationEnabledSetting

int getApplicationEnabledSetting(String packageName)
                                 throws RemoteException
As per PackageManager.getApplicationEnabledSetting(java.lang.String).

Throws:
RemoteException

freeApplicationCache

void freeApplicationCache(long freeStorageSize,
                          IPackageDataObserver observer)
                          throws RemoteException
Free storage by deleting LRU sorted list of cache files across all applications. If the currently available free storage on the device is greater than or equal to the requested free storage, no cache files are cleared. If the currently available storage on the device is less than the requested free storage, some or all of the cache files across all applications are deleted(based on last accessed time) to increase the free storage space on the device to the requested value. There is no gurantee that clearing all the cache files from all applications will clear up enough storage to achieve the desired value.

Parameters:
freeStorageSize - The number of bytes of storage to be freed by the system. Say if freeStorageSize is XX, and the current free storage is YY, if XX is less than YY, just return. if not free XX-YY number of bytes if possible.
observer - callback used to notify when the operation is completed
Throws:
RemoteException

deleteApplicationCacheFiles

void deleteApplicationCacheFiles(String packageName,
                                 IPackageDataObserver observer)
                                 throws RemoteException
Delete all the cache files in an applications cache directory

Parameters:
packageName - The package name of the application whose cache files need to be deleted
observer - a callback used to notify when the deletion is finished.
Throws:
RemoteException

clearApplicationUserData

void clearApplicationUserData(String packageName,
                              IPackageDataObserver observer)
                              throws RemoteException
Clear the user data directory of an application.

Parameters:
packageName - The package name of the application whose cache files need to be deleted
observer - a callback used to notify when the operation is completed.
Throws:
RemoteException

getPackageSizeInfo

void getPackageSizeInfo(String packageName,
                        IPackageStatsObserver observer)
                        throws RemoteException
Get package statistics including the code, data and cache size for an already installed package

Parameters:
packageName - The package name of the application
observer - a callback to use to notify when the asynchronous retrieval of information is complete.
Throws:
RemoteException

enterSafeMode

void enterSafeMode()
                   throws RemoteException
Throws:
RemoteException

systemReady

void systemReady()
                 throws RemoteException
Throws:
RemoteException

hasSystemUidErrors

boolean hasSystemUidErrors()
                           throws RemoteException
Throws:
RemoteException

Build 1.0_r1(from source)

Please submit a feedback, bug or feature