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

Commit c6ab749e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Switching off ART verifications for debuggable apps (dev option-controlled)."

parents be4dac86 5d5921ee
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -11730,6 +11730,14 @@ public final class Settings {
         */
         */
        public static final String APP_IDLE_CONSTANTS = "app_idle_constants";
        public static final String APP_IDLE_CONSTANTS = "app_idle_constants";
        /**
         * Enable ART bytecode verification verifications for debuggable apps.
         * 0 = disable, 1 = enable.
         * @hide
         */
        public static final String ART_VERIFIER_VERIFY_DEBUGGABLE =
                "art_verifier_verify_debuggable";
        /**
        /**
         * Power manager specific settings.
         * Power manager specific settings.
         * This is encoded as a key=value list, separated by commas. Ex:
         * This is encoded as a key=value list, separated by commas. Ex:
+1 −0
Original line number Original line Diff line number Diff line
@@ -122,6 +122,7 @@ public class SettingsBackupTest {
                    Settings.Global.APP_OPS_CONSTANTS,
                    Settings.Global.APP_OPS_CONSTANTS,
                    Settings.Global.APP_STANDBY_ENABLED,
                    Settings.Global.APP_STANDBY_ENABLED,
                    Settings.Global.APP_TIME_LIMIT_USAGE_SOURCE,
                    Settings.Global.APP_TIME_LIMIT_USAGE_SOURCE,
                    Settings.Global.ART_VERIFIER_VERIFY_DEBUGGABLE,
                    Settings.Global.ASSISTED_GPS_ENABLED,
                    Settings.Global.ASSISTED_GPS_ENABLED,
                    Settings.Global.AUDIO_SAFE_VOLUME_STATE,
                    Settings.Global.AUDIO_SAFE_VOLUME_STATE,
                    Settings.Global.AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES,
                    Settings.Global.AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES,
+7 −0
Original line number Original line Diff line number Diff line
@@ -1498,6 +1498,13 @@ public final class ProcessList {
                // Also turn on CheckJNI for debuggable apps. It's quite
                // Also turn on CheckJNI for debuggable apps. It's quite
                // awkward to turn on otherwise.
                // awkward to turn on otherwise.
                runtimeFlags |= Zygote.DEBUG_ENABLE_CHECKJNI;
                runtimeFlags |= Zygote.DEBUG_ENABLE_CHECKJNI;

                // Check if the developer does not want ART verification
                if (android.provider.Settings.Global.getInt(mService.mContext.getContentResolver(),
                        android.provider.Settings.Global.ART_VERIFIER_VERIFY_DEBUGGABLE, 1) == 0) {
                    runtimeFlags |= Zygote.DISABLE_VERIFIER;
                    Slog.w(TAG_PROCESSES, app + ": ART verification disabled");
                }
            }
            }
            // Run the app in safe mode if its manifest requests so or the
            // Run the app in safe mode if its manifest requests so or the
            // system is booted in safe mode.
            // system is booted in safe mode.