diff options
author | Suchi Amalapurapu <asuchitra@google.com> | 2010-02-04 22:51:07 -0800 |
---|---|---|
committer | Suchi Amalapurapu <asuchitra@google.com> | 2010-02-08 14:52:25 -0800 |
commit | b56ae20b22fd7283df32072a431ab6d4965f3c1b (patch) | |
tree | c26e5e7bf6433dfbe500917fc7001f77c331c4f2 /core/java/android | |
parent | 836a1f2cb99600c26a1a928a9e3240b9dec3079b (diff) | |
download | frameworks_base-b56ae20b22fd7283df32072a431ab6d4965f3c1b.zip frameworks_base-b56ae20b22fd7283df32072a431ab6d4965f3c1b.tar.gz frameworks_base-b56ae20b22fd7283df32072a431ab6d4965f3c1b.tar.bz2 |
Rename media resource broadcasts
Add checks for fwdlocked and updated system apps
add more tests
remove duplicate adds
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/app/ContextImpl.java | 4 | ||||
-rw-r--r-- | core/java/android/content/Intent.java | 16 | ||||
-rw-r--r-- | core/java/android/content/pm/PackageManager.java | 9 | ||||
-rw-r--r-- | core/java/android/content/pm/RegisteredServicesCache.java | 4 | ||||
-rw-r--r-- | core/java/android/server/search/SearchManagerService.java | 8 |
5 files changed, 25 insertions, 16 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java index 5f89496..45d7546 100644 --- a/core/java/android/app/ContextImpl.java +++ b/core/java/android/app/ContextImpl.java @@ -2166,7 +2166,7 @@ class ContextImpl extends Context { filter, null, null, null); // Register for events related to sdcard installation. IntentFilter sdFilter = new IntentFilter(); - sdFilter.addAction(Intent.ACTION_MEDIA_RESOURCES_UNAVAILABLE); + sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE); mContext.registerReceiverInternal(sPackageRemovedReceiver, sdFilter, null, null, null); } @@ -2189,7 +2189,7 @@ class ContextImpl extends Context { String pkgList[] = null; String action = intent.getAction(); boolean immediateGc = false; - if (Intent.ACTION_MEDIA_RESOURCES_UNAVAILABLE.equals(action)) { + if (Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(action)) { pkgList = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST); immediateGc = true; } else { diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index e957e20..c32999f 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -1381,8 +1381,8 @@ public class Intent implements Parcelable, Cloneable { * @hide */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) - public static final String ACTION_MEDIA_RESOURCES_AVAILABLE = - "android.intent.action.MEDIA_RESOURCES_AVAILABILE"; + public static final String ACTION_EXTERNAL_APPLICATIONS_AVAILABLE = + "android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE"; /** * Broadcast Action: Resources for a set of packages are currently @@ -1406,8 +1406,8 @@ public class Intent implements Parcelable, Cloneable { * @hide */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) - public static final String ACTION_MEDIA_RESOURCES_UNAVAILABLE = - "android.intent.action.MEDIA_RESOURCES_UNAVAILABILE"; + public static final String ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE = + "android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABILE"; /** * Broadcast Action: The current system wallpaper has changed. See @@ -2198,8 +2198,8 @@ public class Intent implements Parcelable, Cloneable { /** * This field is part of - * {@link android.content.Intent#ACTION_MEDIA_RESOURCES_AVAILABLE}, - * {@link android.content.Intent#ACTION_MEDIA_RESOURCES_UNAVAILABLE} + * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE}, + * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE} * and contains a string array of all of the components that have changed. * @hide */ @@ -2208,8 +2208,8 @@ public class Intent implements Parcelable, Cloneable { /** * This field is part of - * {@link android.content.Intent#ACTION_MEDIA_RESOURCES_AVAILABLE}, - * {@link android.content.Intent#ACTION_MEDIA_RESOURCES_UNAVAILABLE} + * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE}, + * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE} * and contains an integer array of uids of all of the components * that have changed. * @hide diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index 745628a..e3b1694 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -437,6 +437,15 @@ public abstract class PackageManager { public static final int INSTALL_FAILED_CONTAINER_ERROR = -18; /** + * Installation return code: this is passed to the {@link IPackageInstallObserver} by + * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if + * the new package couldn't be installed in the specified install + * location. + * @hide + */ + public static final int INSTALL_FAILED_INVALID_INSTALL_LOCATION = -19; + + /** * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} * if the parser was given a path that is not a file, or does not end with the expected diff --git a/core/java/android/content/pm/RegisteredServicesCache.java b/core/java/android/content/pm/RegisteredServicesCache.java index 7362394..a885820 100644 --- a/core/java/android/content/pm/RegisteredServicesCache.java +++ b/core/java/android/content/pm/RegisteredServicesCache.java @@ -117,8 +117,8 @@ public abstract class RegisteredServicesCache<V> { mContext.registerReceiver(receiver, intentFilter); // Register for events related to sdcard installation. IntentFilter sdFilter = new IntentFilter(); - sdFilter.addAction(Intent.ACTION_MEDIA_RESOURCES_AVAILABLE); - sdFilter.addAction(Intent.ACTION_MEDIA_RESOURCES_UNAVAILABLE); + sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE); + sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE); mContext.registerReceiver(receiver, sdFilter); } diff --git a/core/java/android/server/search/SearchManagerService.java b/core/java/android/server/search/SearchManagerService.java index 324fbaa..fbc4a81 100644 --- a/core/java/android/server/search/SearchManagerService.java +++ b/core/java/android/server/search/SearchManagerService.java @@ -75,8 +75,8 @@ public class SearchManagerService extends ISearchManager.Stub { mContext.registerReceiver(mPackageChangedReceiver, packageFilter); // Register for events related to sdcard installation. IntentFilter sdFilter = new IntentFilter(); - sdFilter.addAction(Intent.ACTION_MEDIA_RESOURCES_AVAILABLE); - sdFilter.addAction(Intent.ACTION_MEDIA_RESOURCES_UNAVAILABLE); + sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE); + sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE); mContext.registerReceiver(mPackageChangedReceiver, sdFilter); } @@ -96,8 +96,8 @@ public class SearchManagerService extends ISearchManager.Stub { if (Intent.ACTION_PACKAGE_ADDED.equals(action) || Intent.ACTION_PACKAGE_REMOVED.equals(action) || Intent.ACTION_PACKAGE_CHANGED.equals(action) || - Intent.ACTION_MEDIA_RESOURCES_AVAILABLE.equals(action) || - Intent.ACTION_MEDIA_RESOURCES_UNAVAILABLE.equals(action)) { + Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(action) || + Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(action)) { if (DBG) Log.d(TAG, "Got " + action); // Update list of searchable activities getSearchables().buildSearchableList(); |