Loading core/java/android/app/Instrumentation.java +3 −0 Original line number Diff line number Diff line Loading @@ -2418,6 +2418,9 @@ public class Instrumentation { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public static void checkStartActivityResult(int res, Object intent) { if (!ActivityManager.isStartResultFatalError(res)) { if (res == ActivityManager.START_ABORTED && Build.isDebuggable()) { Log.w(TAG, new StackTrace("Activity start aborted")); } return; } Loading core/java/android/app/PendingIntent.java +6 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.app.ActivityManager.INTENT_SENDER_ACTIVITY; import static android.app.ActivityManager.INTENT_SENDER_BROADCAST; import static android.app.ActivityManager.INTENT_SENDER_FOREGROUND_SERVICE; import static android.app.ActivityManager.INTENT_SENDER_SERVICE; import static android.app.ActivityManager.START_ABORTED; import android.Manifest.permission; import android.annotation.IntDef; Loading Loading @@ -1116,12 +1117,16 @@ public final class PendingIntent implements Parcelable { final IApplicationThread app = ActivityThread.currentActivityThread() .getApplicationThread(); return ActivityManager.getService().sendIntentSender(app, int result = ActivityManager.getService().sendIntentSender(app, mTarget, mWhitelistToken, code, intent, resolvedType, onFinished != null ? new FinishedDispatcher(this, onFinished, handler) : null, requiredPermission, options); if (result == START_ABORTED && Build.isDebuggable()) { Log.w(TAG, new StackTrace("Activity start aborted")); } return result; } catch (RemoteException e) { throw new CanceledException(e); } Loading core/java/android/content/IntentSender.java +7 −0 Original line number Diff line number Diff line Loading @@ -28,10 +28,12 @@ import android.app.ActivityManager.PendingIntentInfo; import android.app.ActivityOptions; import android.app.ActivityThread; import android.app.IApplicationThread; import android.app.StackTrace; import android.app.compat.CompatChanges; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledAfter; import android.compat.annotation.UnsupportedAppUsage; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; Loading @@ -40,6 +42,7 @@ import android.os.Parcelable; import android.os.RemoteException; import android.os.UserHandle; import android.util.AndroidException; import android.util.Log; import com.android.window.flags.Flags; Loading Loading @@ -73,6 +76,7 @@ import java.util.concurrent.Executor; * {@link android.app.PendingIntent#getIntentSender() PendingIntent.getIntentSender()}. */ public class IntentSender implements Parcelable { private static final String TAG = "IntentSender"; /** If enabled consider the deprecated @hide method as removed. */ @ChangeId @EnabledAfter(targetSdkVersion = VANILLA_ICE_CREAM) Loading Loading @@ -321,6 +325,9 @@ public class IntentSender implements Parcelable { ? new FinishedDispatcher(this, onFinished, executor) : null, requiredPermission, options); if (res == ActivityManager.START_ABORTED && Build.isDebuggable()) { Log.w(TAG, new StackTrace("Activity start aborted")); } if (res < 0) { throw new SendIntentException(); } Loading core/java/android/window/flags/responsible_apis.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -74,3 +74,10 @@ flag { description: "Cover IntentSender API in addition to PendingIntent." bug: "405995292" } flag { name: "bal_report_aborted_activity_starts" namespace: "responsible_apis" description: "Report aborted activity starts in the calling process." bug: "427863001" } services/core/java/com/android/server/wm/ActivityStarter.java +4 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ import static com.android.server.wm.TaskFragment.EMBEDDING_DISALLOWED_UNTRUSTED_ import static com.android.server.wm.WindowContainer.POSITION_TOP; import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM; import static com.android.window.flags.Flags.balDontBringExistingBackgroundTaskStackToFg; import static com.android.window.flags.Flags.balReportAbortedActivityStarts; import android.annotation.IntDef; import android.annotation.NonNull; Loading Loading @@ -1560,6 +1561,9 @@ class ActivityStarter { } static int getExternalResult(int result) { if (balReportAbortedActivityStarts()) { return result; } // Aborted results are treated as successes externally, but we must track them internally. return result != START_ABORTED ? result : START_SUCCESS; } Loading Loading
core/java/android/app/Instrumentation.java +3 −0 Original line number Diff line number Diff line Loading @@ -2418,6 +2418,9 @@ public class Instrumentation { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public static void checkStartActivityResult(int res, Object intent) { if (!ActivityManager.isStartResultFatalError(res)) { if (res == ActivityManager.START_ABORTED && Build.isDebuggable()) { Log.w(TAG, new StackTrace("Activity start aborted")); } return; } Loading
core/java/android/app/PendingIntent.java +6 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.app.ActivityManager.INTENT_SENDER_ACTIVITY; import static android.app.ActivityManager.INTENT_SENDER_BROADCAST; import static android.app.ActivityManager.INTENT_SENDER_FOREGROUND_SERVICE; import static android.app.ActivityManager.INTENT_SENDER_SERVICE; import static android.app.ActivityManager.START_ABORTED; import android.Manifest.permission; import android.annotation.IntDef; Loading Loading @@ -1116,12 +1117,16 @@ public final class PendingIntent implements Parcelable { final IApplicationThread app = ActivityThread.currentActivityThread() .getApplicationThread(); return ActivityManager.getService().sendIntentSender(app, int result = ActivityManager.getService().sendIntentSender(app, mTarget, mWhitelistToken, code, intent, resolvedType, onFinished != null ? new FinishedDispatcher(this, onFinished, handler) : null, requiredPermission, options); if (result == START_ABORTED && Build.isDebuggable()) { Log.w(TAG, new StackTrace("Activity start aborted")); } return result; } catch (RemoteException e) { throw new CanceledException(e); } Loading
core/java/android/content/IntentSender.java +7 −0 Original line number Diff line number Diff line Loading @@ -28,10 +28,12 @@ import android.app.ActivityManager.PendingIntentInfo; import android.app.ActivityOptions; import android.app.ActivityThread; import android.app.IApplicationThread; import android.app.StackTrace; import android.app.compat.CompatChanges; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledAfter; import android.compat.annotation.UnsupportedAppUsage; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; Loading @@ -40,6 +42,7 @@ import android.os.Parcelable; import android.os.RemoteException; import android.os.UserHandle; import android.util.AndroidException; import android.util.Log; import com.android.window.flags.Flags; Loading Loading @@ -73,6 +76,7 @@ import java.util.concurrent.Executor; * {@link android.app.PendingIntent#getIntentSender() PendingIntent.getIntentSender()}. */ public class IntentSender implements Parcelable { private static final String TAG = "IntentSender"; /** If enabled consider the deprecated @hide method as removed. */ @ChangeId @EnabledAfter(targetSdkVersion = VANILLA_ICE_CREAM) Loading Loading @@ -321,6 +325,9 @@ public class IntentSender implements Parcelable { ? new FinishedDispatcher(this, onFinished, executor) : null, requiredPermission, options); if (res == ActivityManager.START_ABORTED && Build.isDebuggable()) { Log.w(TAG, new StackTrace("Activity start aborted")); } if (res < 0) { throw new SendIntentException(); } Loading
core/java/android/window/flags/responsible_apis.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -74,3 +74,10 @@ flag { description: "Cover IntentSender API in addition to PendingIntent." bug: "405995292" } flag { name: "bal_report_aborted_activity_starts" namespace: "responsible_apis" description: "Report aborted activity starts in the calling process." bug: "427863001" }
services/core/java/com/android/server/wm/ActivityStarter.java +4 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ import static com.android.server.wm.TaskFragment.EMBEDDING_DISALLOWED_UNTRUSTED_ import static com.android.server.wm.WindowContainer.POSITION_TOP; import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM; import static com.android.window.flags.Flags.balDontBringExistingBackgroundTaskStackToFg; import static com.android.window.flags.Flags.balReportAbortedActivityStarts; import android.annotation.IntDef; import android.annotation.NonNull; Loading Loading @@ -1560,6 +1561,9 @@ class ActivityStarter { } static int getExternalResult(int result) { if (balReportAbortedActivityStarts()) { return result; } // Aborted results are treated as successes externally, but we must track them internally. return result != START_ABORTED ? result : START_SUCCESS; } Loading