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

Commit f453bd87 authored by Naresh Kumar Podishetty (xWF)'s avatar Naresh Kumar Podishetty (xWF)
Browse files

Revert "Enable ASM when targeting C"

Revert submission 33974236-revert-33952793-revert-33778869-b33778869-PJGOUJMUJP-DULRBYFVJI

Reason for revert: <Droid monitor created revert due to b/424672157. Will be verifying through ABTD before submission.>

Reverted changes: /q/submissionid:33974236-revert-33952793-revert-33778869-b33778869-PJGOUJMUJP-DULRBYFVJI

BUG : 424672157

Change-Id: I8aec6b85da956fe3e4d07b0150beeeecff3477d0
parent 8ede5974
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -105,6 +105,8 @@ import android.app.WindowConfiguration;
import android.app.WindowConfiguration.WindowingMode;
import android.app.compat.CompatChanges;
import android.compat.annotation.ChangeId;
import android.compat.annotation.Disabled;
import android.compat.annotation.EnabledSince;
import android.compat.annotation.Overridable;
import android.content.Context;
import android.content.IIntentSender;
@@ -119,6 +121,7 @@ import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
import android.content.res.Configuration;
import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import android.os.OperationCanceledException;
@@ -179,6 +182,20 @@ class ActivityStarter {
     */
    private static final long MAX_TASK_WEIGHT_FOR_ADDING_ACTIVITY = 300;

    /**
     * Feature flag to protect PendingIntent being abused to start background activity.
     */
    @ChangeId
    @EnabledSince(targetSdkVersion = Build.VERSION_CODES.TIRAMISU)
    static final long ENABLE_PENDING_INTENT_BAL_OPTION = 192341120L;

    /**
     * Feature flag for go/activity-security rules
     */
    @ChangeId
    @Disabled
    static final long ASM_RESTRICTIONS = 230590090L;

    @ChangeId
    @Overridable
    private static final long ENABLE_PREVENT_INTENT_REDIRECT_TAKE_ACTION = 29623414L;
+1 −5
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED;
import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.os.Build.VERSION_CODES.BAKLAVA;
import static android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE;
import static android.os.Process.INVALID_PID;
import static android.os.Process.INVALID_UID;
@@ -36,6 +35,7 @@ import static android.os.Process.SYSTEM_UID;
import static android.provider.DeviceConfig.NAMESPACE_WINDOW_MANAGER;
import static android.security.Flags.asmOptSystemIntoEnforcement;

import static com.android.server.wm.ActivityStarter.ASM_RESTRICTIONS;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_ACTIVITY_STARTS;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME;
@@ -141,10 +141,6 @@ public class BackgroundActivityStartController {
    @EnabledAfter(targetSdkVersion = UPSIDE_DOWN_CAKE)
    private static final long DEFAULT_RESCIND_BAL_PRIVILEGES_FROM_PENDING_INTENT_CREATOR =
            296478951;
    /**  Feature flag for go/activity-security rules */
    @ChangeId
    @EnabledAfter(targetSdkVersion = BAKLAVA)
    static final long ASM_RESTRICTIONS = 230590090L;
    public static final ActivityOptions ACTIVITY_OPTIONS_SYSTEM_DEFINED =
            ActivityOptions.makeBasic()
                    .setPendingIntentBackgroundActivityStartMode(