Loading core/java/android/app/ContextImpl.java +3 −2 Original line number Diff line number Diff line Loading @@ -847,7 +847,8 @@ 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." Loading Loading
core/java/android/app/ContextImpl.java +3 −2 Original line number Diff line number Diff line Loading @@ -847,7 +847,8 @@ 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." Loading