diff options
author | Yi Kong <yikong@google.com> | 2020-10-29 02:29:12 +0800 |
---|---|---|
committer | Yi Kong <yikong@google.com> | 2020-11-03 08:51:07 +0800 |
commit | 0c51fb20dd638591416d5cf1957001f3bb4e890f (patch) | |
tree | 1748277c6a5a740dc39298c65655c08e4b9b231c /services/profcollect | |
parent | c4aedd1f874dbd8eb13bace4c303978d09354d78 (diff) |
profcollectd: Only start the forwarding service if enabled through device config
Test: boot profcollect build
Bug: 79161490
Change-Id: I8058594fd78327bbd0983c7f39391dc82e18e2a3
Diffstat (limited to 'services/profcollect')
-rw-r--r-- | services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java index d14ed5a15cf9..19449654f2ec 100644 --- a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java +++ b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java @@ -31,6 +31,7 @@ import android.os.ServiceManager; import android.os.SystemProperties; import android.os.UpdateEngine; import android.os.UpdateEngineCallback; +import android.provider.DeviceConfig; import android.util.Log; import com.android.server.IoThread; @@ -68,6 +69,14 @@ public final class ProfcollectForwardingService extends SystemService { sSelfService = this; } + /** + * Check whether profcollect is enabled through device config. + */ + public static boolean enabled() { + return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PROFCOLLECT_NATIVE_BOOT, "enabled", + false); + } + @Override public void onStart() { if (DEBUG) { |