summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-12-02 16:10:02 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-02 16:10:02 -0800
commitbcee0ef7ea3faa8c52b97ac3537289c20f2cc24f (patch)
tree814b730b8689fa959573ccde66b3e38036dd4d32
parentfddcb0617456da836c8a4e5e16cc4177447608be (diff)
parentd7ad0d28372bba03a3b6c5d01e0e7b0066e51374 (diff)
downloadframeworks_base-bcee0ef7ea3faa8c52b97ac3537289c20f2cc24f.zip
frameworks_base-bcee0ef7ea3faa8c52b97ac3537289c20f2cc24f.tar.gz
frameworks_base-bcee0ef7ea3faa8c52b97ac3537289c20f2cc24f.tar.bz2
Merge "sampling profiler hz -> ms"
-rw-r--r--core/java/android/provider/Settings.java7
-rw-r--r--services/java/com/android/server/SamplingProfilerService.java11
2 files changed, 9 insertions, 9 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 4ea4a16..ed71da2 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -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
diff --git a/services/java/com/android/server/SamplingProfilerService.java b/services/java/com/android/server/SamplingProfilerService.java
index 26af7f7..61267d0 100644
--- a/services/java/com/android/server/SamplingProfilerService.java
+++ b/services/java/com/android/server/SamplingProfilerService.java
@@ -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));
}
@@ -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());
}
}
}
-