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

Commit d41477f4 authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge changes from topic "notification_launch"

* changes:
  Added the reply draft as an extra to the content intent
  Launching notification settings correctly inline
  Launching Notification animations inline
parents 8e725bba de4de0e2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5227,6 +5227,7 @@ package android.app {
    field public static final java.lang.String EXTRA_PROGRESS = "android.progress";
    field public static final java.lang.String EXTRA_PROGRESS_INDETERMINATE = "android.progressIndeterminate";
    field public static final java.lang.String EXTRA_PROGRESS_MAX = "android.progressMax";
    field public static final java.lang.String EXTRA_REMOTE_INPUT_DRAFT = "android.remoteInputDraft";
    field public static final java.lang.String EXTRA_REMOTE_INPUT_HISTORY = "android.remoteInputHistory";
    field public static final deprecated java.lang.String EXTRA_SELF_DISPLAY_NAME = "android.selfDisplayName";
    field public static final java.lang.String EXTRA_SHOW_CHRONOMETER = "android.showChronometer";
+2 −2
Original line number Diff line number Diff line
@@ -913,14 +913,14 @@ class ContextImpl extends Context {

    /** @hide */
    @Override
    public void startActivitiesAsUser(Intent[] intents, Bundle options, UserHandle userHandle) {
    public int startActivitiesAsUser(Intent[] intents, Bundle options, UserHandle userHandle) {
        if ((intents[0].getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) == 0) {
            throw new AndroidRuntimeException(
                    "Calling startActivities() from outside of an Activity "
                    + " context requires the FLAG_ACTIVITY_NEW_TASK flag on first Intent."
                    + " Is this really what you want?");
        }
        mMainThread.getInstrumentation().execStartActivitiesAsUser(
        return mMainThread.getInstrumentation().execStartActivitiesAsUser(
                getOuterContext(), mMainThread.getApplicationThread(), null,
                (Activity) null, intents, options, userHandle.getIdentifier());
    }
+8 −3
Original line number Diff line number Diff line
@@ -1688,9 +1688,13 @@ public class Instrumentation {
     * {@link ActivityMonitor} objects only match against the first activity in
     * the array.
     *
     * @return The corresponding flag {@link ActivityManager#START_CANCELED},
     *         {@link ActivityManager#START_SUCCESS} etc. indicating whether the launch was
     *         successful.
     *
     * {@hide}
     */
    public void execStartActivitiesAsUser(Context who, IBinder contextThread,
    public int execStartActivitiesAsUser(Context who, IBinder contextThread,
            IBinder token, Activity target, Intent[] intents, Bundle options,
            int userId) {
        IApplicationThread whoThread = (IApplicationThread) contextThread;
@@ -1705,11 +1709,11 @@ public class Instrumentation {
                    }
                    if (result != null) {
                        am.mHits++;
                        return;
                        return ActivityManager.START_CANCELED;
                    } else if (am.match(who, null, intents[0])) {
                        am.mHits++;
                        if (am.isBlocking()) {
                            return;
                            return ActivityManager.START_CANCELED;
                        }
                        break;
                    }
@@ -1727,6 +1731,7 @@ public class Instrumentation {
                .startActivities(whoThread, who.getBasePackageName(), intents, resolvedTypes,
                        token, options, userId);
            checkStartActivityResult(result, intents[0]);
            return result;
        } catch (RemoteException e) {
            throw new RuntimeException("Failure from system", e);
        }
+10 −0
Original line number Diff line number Diff line
@@ -200,6 +200,16 @@ public class Notification implements Parcelable
     */
    private static final int MAX_REPLY_HISTORY = 5;


    /**
     * If the notification contained an unsent draft for a RemoteInput when the user clicked on it,
     * we're adding the draft as a String extra to the {@link #contentIntent} using this key.
     *
     * <p>Apps may use this extra to prepopulate text fields in the app, where the user usually
     * sends messages.</p>
     */
    public static final String EXTRA_REMOTE_INPUT_DRAFT = "android.remoteInputDraft";

    /**
     * A timestamp related to this notification, in milliseconds since the epoch.
     *
+2 −2
Original line number Diff line number Diff line
@@ -213,13 +213,13 @@ public class TaskStackBuilder {
     * Start the task stack constructed by this builder.
     * @hide
     */
    public void startActivities(Bundle options, UserHandle userHandle) {
    public int startActivities(Bundle options, UserHandle userHandle) {
        if (mIntents.isEmpty()) {
            throw new IllegalStateException(
                    "No intents added to TaskStackBuilder; cannot startActivities");
        }

        mSourceContext.startActivitiesAsUser(getIntents(), options, userHandle);
        return mSourceContext.startActivitiesAsUser(getIntents(), options, userHandle);
    }

    /**
Loading