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

Commit 88925110 authored by Bryce Lee's avatar Bryce Lee Committed by android-build-merger
Browse files

Merge "Revert "Disallow starting activities without new task from non-activity...

Merge "Revert "Disallow starting activities without new task from non-activity context."" into oc-dev am: 367b880c
am: 272b3903

Change-Id: Ib094291d6ea26947687477f9e3cec35f6cfd97a8
parents 80bf2641 272b3903
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -845,8 +845,7 @@ class ContextImpl extends Context {
        // generally not allowed, except if the caller specifies the task id the activity should
        // be launched in.
        if ((intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) == 0
                && (options == null
                || ActivityOptions.fromBundle(options).getLaunchTaskId() == -1)) {
                && options != null && ActivityOptions.fromBundle(options).getLaunchTaskId() == -1) {
            throw new AndroidRuntimeException(
                    "Calling startActivity() from outside of an Activity "
                    + " context requires the FLAG_ACTIVITY_NEW_TASK flag."