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

Commit 0617359e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allowing more than one app to suspend apps"

parents 6c32679a d3278449
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11395,7 +11395,7 @@ package android.content.pm {
    method public abstract void onPackageRemoved(String, android.os.UserHandle);
    method public abstract void onPackagesAvailable(String[], android.os.UserHandle, boolean);
    method public void onPackagesSuspended(String[], android.os.UserHandle);
    method public void onPackagesSuspended(String[], android.os.UserHandle, @Nullable android.os.Bundle);
    method @Deprecated public void onPackagesSuspended(String[], android.os.UserHandle, @Nullable android.os.Bundle);
    method public abstract void onPackagesUnavailable(String[], android.os.UserHandle, boolean);
    method public void onPackagesUnsuspended(String[], android.os.UserHandle);
    method public void onShortcutsChanged(@NonNull String, @NonNull java.util.List<android.content.pm.ShortcutInfo>, @NonNull android.os.UserHandle);
+1 −4
Original line number Diff line number Diff line
@@ -2414,14 +2414,11 @@ public class ApplicationPackageManager extends PackageManager {

    @Override
    public Bundle getSuspendedPackageAppExtras() {
        final PersistableBundle extras;
        try {
            extras = mPM.getSuspendedPackageAppExtras(mContext.getOpPackageName(),
                    getUserId());
            return mPM.getSuspendedPackageAppExtras(mContext.getOpPackageName(), getUserId());
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
        return extras != null ? new Bundle(extras.deepCopy()) : null;
    }

    @Override
+0 −11
Original line number Diff line number Diff line
@@ -2024,17 +2024,6 @@ public class Intent implements Parcelable, Cloneable {
    @SystemApi
    public static final String EXTRA_RESULT_NEEDED = "android.intent.extra.RESULT_NEEDED";

    /**
     * Intent extra: A {@link Bundle} of extras supplied for the launcher when any packages on
     * device are suspended. Will be sent with {@link #ACTION_PACKAGES_SUSPENDED}.
     *
     * @see PackageManager#isPackageSuspended()
     * @see #ACTION_PACKAGES_SUSPENDED
     *
     * @hide
     */
    public static final String EXTRA_LAUNCHER_EXTRAS = "android.intent.extra.LAUNCHER_EXTRAS";

    /**
     * Intent extra: ID of the shortcut used to send the share intent. Will be sent with
     * {@link #ACTION_SEND}.
+2 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ import android.content.pm.VersionedPackage;
import android.content.pm.dex.IArtManager;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.ParcelFileDescriptor;
import android.os.PersistableBundle;
import android.content.IntentSender;
@@ -280,7 +281,7 @@ interface IPackageManager {

    boolean isPackageSuspendedForUser(String packageName, int userId);

    PersistableBundle getSuspendedPackageAppExtras(String packageName, int userId);
    Bundle getSuspendedPackageAppExtras(String packageName, int userId);

    /**
     * Backup/restore support - only the system uid may use these.
+4 −0
Original line number Diff line number Diff line
@@ -248,7 +248,11 @@ public class LauncherApps {
         *                      system, {@code null} otherwise.
         * @see PackageManager#isPackageSuspended()
         * @see #getSuspendedPackageLauncherExtras(String, UserHandle)
         * @deprecated {@code launcherExtras} should be obtained by using
         * {@link #getSuspendedPackageLauncherExtras(String, UserHandle)}. For all other cases,
         * {@link #onPackagesSuspended(String[], UserHandle)} should be used.
         */
        @Deprecated
        public void onPackagesSuspended(String[] packageNames, UserHandle user,
                @Nullable Bundle launcherExtras) {
            onPackagesSuspended(packageNames, user);
Loading