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

Commit 9e2b2364 authored by Mathew Inwood's avatar Mathew Inwood Committed by android-build-merger
Browse files

Merge "StrictMode: fix non-SDK API usage detection." into pi-dev

am: c72ee1a4

Change-Id: If0db894c3cb9660eb187280cda21423866387799
parents b0683619 c72ee1a4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -839,6 +839,10 @@ public final class StrictMode {

            /**
             * Detect reflective usage of APIs that are not part of the public Android SDK.
             *
             * <p>Note that any non-SDK APIs that this processes accesses before this detection is
             * enabled may not be detected. To ensure that all such API accesses are detected,
             * you should apply this policy as early as possible after process creation.
             */
            public Builder detectNonSdkApiUsage() {
                return enable(DETECT_VM_NON_SDK_API_USAGE);
@@ -1924,8 +1928,10 @@ public final class StrictMode {

            if ((sVmPolicy.mask & DETECT_VM_NON_SDK_API_USAGE) != 0) {
                VMRuntime.setNonSdkApiUsageConsumer(sNonSdkApiUsageConsumer);
                VMRuntime.setDedupeHiddenApiWarnings(false);
            } else {
                VMRuntime.setNonSdkApiUsageConsumer(null);
                VMRuntime.setDedupeHiddenApiWarnings(true);
            }
        }
    }