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

Commit 8b3a39f0 authored by Yi Kong's avatar Yi Kong
Browse files

profcollect: Use DeviceConfig to control trace parameters

Test: presubmit
Bug: 79161490
Change-Id: I80dd9fda6dc095cec61cffd2389f28992c6973d1
parent 7bd2a5e4
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import android.os.IBinder.DeathRecipient;
import android.os.Looper;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.UpdateEngine;
import android.os.UpdateEngineCallback;
import android.provider.DeviceConfig;
@@ -227,8 +226,8 @@ public final class ProfcollectForwardingService extends SystemService {
        }

        // Sample for a fraction of app launches.
        int traceFrequency =
                SystemProperties.getInt("persist.profcollectd.applaunch_trace_freq", 2);
        int traceFrequency = DeviceConfig.getInt(DeviceConfig.NAMESPACE_PROFCOLLECT_NATIVE_BOOT,
                "applaunch_trace_freq", 2);
        int randomNum = ThreadLocalRandom.current().nextInt(100);
        if (randomNum < traceFrequency) {
            try {