From 8bcd420ab5fa9d9ff22c7005a1359778905bd98f Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Wed, 28 Apr 2021 16:36:02 +0800 Subject: [PATCH] profcollect: alternative property to start profcollectd Provide an alternative persist property to start profcollectd, if device_config is not available (e.g. AOSP). Test: manual Bug: 184811672 Change-Id: I684610ff4d4cff0b73711fb07c98c755250cec2d --- .../server/profcollect/ProfcollectForwardingService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java index 75432cd8661f5..9706d7f5f78d6 100644 --- a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java +++ b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java @@ -29,6 +29,7 @@ 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.os.UserHandle; @@ -79,7 +80,7 @@ public final class ProfcollectForwardingService extends SystemService { */ public static boolean enabled() { return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PROFCOLLECT_NATIVE_BOOT, "enabled", - false); + false) || SystemProperties.getBoolean("persist.profcollectd.enabled_override", false); } @Override