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

Commit e1f90ac9 authored by Makoto Onuki's avatar Makoto Onuki Committed by android-build-merger
Browse files

Merge \\"Stop adding FLAG_ACTIVITY_RESET_TASK_IF_NEEDED when...\\" into nyc-mr1-dev am: ceadb1a8

am: c74ed0d6

Change-Id: I0c66444e1352af26bf7c039271a5bee952eb5e52
parents 5018a61b c74ed0d6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -10081,6 +10081,7 @@ package android.content.pm {
    method public android.os.PersistableBundle getExtras();
    method public java.lang.String getId();
    method public android.content.Intent getIntent();
    method public android.content.Intent getIntents();
    method public long getLastChangedTimestamp();
    method public java.lang.CharSequence getLongLabel();
    method public java.lang.String getPackage();
@@ -10107,6 +10108,7 @@ package android.content.pm {
    method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
    method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
    method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent);
    method public android.content.pm.ShortcutInfo.Builder setIntents(android.content.Intent[]);
    method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence);
    method public android.content.pm.ShortcutInfo.Builder setRank(int);
    method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence);
@@ -10123,6 +10125,7 @@ package android.content.pm {
    method public java.util.List<android.content.pm.ShortcutInfo> getManifestShortcuts();
    method public int getMaxShortcutCountPerActivity();
    method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
    method public boolean isRateLimitingActive();
    method public void removeAllDynamicShortcuts();
    method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
    method public void reportShortcutUsed(java.lang.String);
+3 −0
Original line number Diff line number Diff line
@@ -10496,6 +10496,7 @@ package android.content.pm {
    method public android.os.PersistableBundle getExtras();
    method public java.lang.String getId();
    method public android.content.Intent getIntent();
    method public android.content.Intent getIntents();
    method public long getLastChangedTimestamp();
    method public java.lang.CharSequence getLongLabel();
    method public java.lang.String getPackage();
@@ -10522,6 +10523,7 @@ package android.content.pm {
    method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
    method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
    method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent);
    method public android.content.pm.ShortcutInfo.Builder setIntents(android.content.Intent[]);
    method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence);
    method public android.content.pm.ShortcutInfo.Builder setRank(int);
    method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence);
@@ -10538,6 +10540,7 @@ package android.content.pm {
    method public java.util.List<android.content.pm.ShortcutInfo> getManifestShortcuts();
    method public int getMaxShortcutCountPerActivity();
    method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
    method public boolean isRateLimitingActive();
    method public void removeAllDynamicShortcuts();
    method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
    method public void reportShortcutUsed(java.lang.String);
+3 −0
Original line number Diff line number Diff line
@@ -10094,6 +10094,7 @@ package android.content.pm {
    method public android.os.PersistableBundle getExtras();
    method public java.lang.String getId();
    method public android.content.Intent getIntent();
    method public android.content.Intent getIntents();
    method public long getLastChangedTimestamp();
    method public java.lang.CharSequence getLongLabel();
    method public java.lang.String getPackage();
@@ -10120,6 +10121,7 @@ package android.content.pm {
    method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
    method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
    method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent);
    method public android.content.pm.ShortcutInfo.Builder setIntents(android.content.Intent[]);
    method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence);
    method public android.content.pm.ShortcutInfo.Builder setRank(int);
    method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence);
@@ -10137,6 +10139,7 @@ package android.content.pm {
    method public java.util.List<android.content.pm.ShortcutInfo> getManifestShortcuts();
    method public int getMaxShortcutCountPerActivity();
    method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
    method public boolean isRateLimitingActive();
    method public void removeAllDynamicShortcuts();
    method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
    method public void reportShortcutUsed(java.lang.String);
+29 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.app.TaskStackBuilder;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -919,6 +920,19 @@ public final class ShortcutInfo implements Parcelable {
            return this;
        }

        /**
         * Sets multiple intents instead of a single intent.
         *
         * @see Builder#setIntent(Intent)
         * @see ShortcutInfo#getIntents()
         * @see Context#startActivities(Intent[])
         * @see TaskStackBuilder
         */
        @NonNull
        public Builder setIntents(@NonNull Intent[] intents) {
            throw new RuntimeException("NOT SUPPORTED YET");
        }

        /**
         * "Rank" of a shortcut, which is a non-negative value that's used by the launcher app
         * to sort shortcuts.
@@ -1084,7 +1098,7 @@ public final class ShortcutInfo implements Parcelable {
    }

    /**
     * Return the intent.
     * Return the intent.  (Or the last intent set with {@link Builder#setIntents(Intent[])}.
     *
     * <p>Launcher applications <b>cannot</b> see the intent.  If a {@link ShortcutInfo} is
     * obtained via {@link LauncherApps}, then this method will always return null.
@@ -1103,6 +1117,20 @@ public final class ShortcutInfo implements Parcelable {
        return intent;
    }

    /**
     * Return the intent set with {@link Builder#setIntents(Intent[])}.
     *
     * <p>Launcher applications <b>cannot</b> see the intents.  If a {@link ShortcutInfo} is
     * obtained via {@link LauncherApps}, then this method will always return null.
     * Launchers can only start a shortcut intent with {@link LauncherApps#startShortcut}.
     *
     * @see Builder#setIntents(Intent[])
     */
    @Nullable
    public Intent getIntents() {
        throw new RuntimeException("NOT SUPPORTED YET");
    }

    /**
     * Return "raw" intent, which is the original intent without the extras.
     * @hide
+14 −0
Original line number Diff line number Diff line
@@ -613,6 +613,20 @@ public class ShortcutManager {
        }
    }

    /**
     * Return {@code true} when rate-limiting is active for the caller application.
     *
     * <p>See the class level javadoc for details.
     */
    public boolean isRateLimitingActive() {
        try {
            return mService.getRemainingCallCount(mContext.getPackageName(), injectMyUserId())
                    == 0;
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Return the max width for icons, in pixels.
     */
Loading