Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2292790 authored by Suchi Amalapurapu's avatar Suchi Amalapurapu Committed by Android (Google) Code Review
Browse files

Merge "Rename media resource broadcasts Add checks for fwdlocked and updated...

Merge "Rename media resource broadcasts Add checks for fwdlocked and updated system apps add more tests remove duplicate adds"
parents c9a61f63 b56ae20b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 {
+8 −8
Original line number Diff line number Diff line
@@ -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
+9 −0
Original line number Diff line number Diff line
@@ -436,6 +436,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)}
+2 −2
Original line number Diff line number Diff line
@@ -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);
    }

+4 −4
Original line number Diff line number Diff line
@@ -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();
Loading