Loading core/java/android/provider/Settings.java +4 −3 Original line number Diff line number Diff line Loading @@ -2576,12 +2576,13 @@ public final class Settings { public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url"; /** * A positive value indicates the frequency of SamplingProfiler * taking snapshots in hertz. Zero value means SamplingProfiler is disabled. * A positive value indicates how often the SamplingProfiler * should take snapshots. Zero value means SamplingProfiler * is disabled. * * @hide */ public static final String SAMPLING_PROFILER_HZ = "sampling_profiler_hz"; public static final String SAMPLING_PROFILER_MS = "sampling_profiler_ms"; /** * Settings classname to launch when Settings is clicked from All Loading services/java/com/android/server/SamplingProfilerService.java +5 −6 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ public class SamplingProfilerService extends Binder { private void registerSettingObserver(Context context) { ContentResolver contentResolver = context.getContentResolver(); contentResolver.registerContentObserver( Settings.Secure.getUriFor(Settings.Secure.SAMPLING_PROFILER_HZ), Settings.Secure.getUriFor(Settings.Secure.SAMPLING_PROFILER_MS), false, new SamplingProfilerSettingsObserver(contentResolver)); } Loading @@ -107,12 +107,11 @@ public class SamplingProfilerService extends Binder { } @Override public void onChange(boolean selfChange) { Integer samplingProfilerHz = Settings.Secure.getInt( mContentResolver, Settings.Secure.SAMPLING_PROFILER_HZ, 0); Integer samplingProfilerMs = Settings.Secure.getInt( mContentResolver, Settings.Secure.SAMPLING_PROFILER_MS, 0); // setting this secure property will start or stop sampling profiler, // as well as adjust the frequency of taking snapshots. SystemProperties.set("persist.sys.profiler_hz", samplingProfilerHz.toString()); // as well as adjust the the time between taking snapshots. SystemProperties.set("persist.sys.profiler_ms", samplingProfilerMs.toString()); } } } Loading
core/java/android/provider/Settings.java +4 −3 Original line number Diff line number Diff line Loading @@ -2576,12 +2576,13 @@ public final class Settings { public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url"; /** * A positive value indicates the frequency of SamplingProfiler * taking snapshots in hertz. Zero value means SamplingProfiler is disabled. * A positive value indicates how often the SamplingProfiler * should take snapshots. Zero value means SamplingProfiler * is disabled. * * @hide */ public static final String SAMPLING_PROFILER_HZ = "sampling_profiler_hz"; public static final String SAMPLING_PROFILER_MS = "sampling_profiler_ms"; /** * Settings classname to launch when Settings is clicked from All Loading
services/java/com/android/server/SamplingProfilerService.java +5 −6 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ public class SamplingProfilerService extends Binder { private void registerSettingObserver(Context context) { ContentResolver contentResolver = context.getContentResolver(); contentResolver.registerContentObserver( Settings.Secure.getUriFor(Settings.Secure.SAMPLING_PROFILER_HZ), Settings.Secure.getUriFor(Settings.Secure.SAMPLING_PROFILER_MS), false, new SamplingProfilerSettingsObserver(contentResolver)); } Loading @@ -107,12 +107,11 @@ public class SamplingProfilerService extends Binder { } @Override public void onChange(boolean selfChange) { Integer samplingProfilerHz = Settings.Secure.getInt( mContentResolver, Settings.Secure.SAMPLING_PROFILER_HZ, 0); Integer samplingProfilerMs = Settings.Secure.getInt( mContentResolver, Settings.Secure.SAMPLING_PROFILER_MS, 0); // setting this secure property will start or stop sampling profiler, // as well as adjust the frequency of taking snapshots. SystemProperties.set("persist.sys.profiler_hz", samplingProfilerHz.toString()); // as well as adjust the the time between taking snapshots. SystemProperties.set("persist.sys.profiler_ms", samplingProfilerMs.toString()); } } }