Update references to migrated global settings.

Fixed one setting that was migrated but not marked deprecated.

Removed a hidden setting that is no longer used by the new
power manager service.

Bug: 7231172
Change-Id: I332f020f876a18d519a1a20598a172f1c98036f7
diff --git a/services/java/com/android/server/SamplingProfilerService.java b/services/java/com/android/server/SamplingProfilerService.java
index 0034d2c..fbf1aa4 100644
--- a/services/java/com/android/server/SamplingProfilerService.java
+++ b/services/java/com/android/server/SamplingProfilerService.java
@@ -90,7 +90,7 @@
     private void registerSettingObserver(Context context) {
         ContentResolver contentResolver = context.getContentResolver();
         contentResolver.registerContentObserver(
-                Settings.Secure.getUriFor(Settings.Secure.SAMPLING_PROFILER_MS),
+                Settings.Global.getUriFor(Settings.Global.SAMPLING_PROFILER_MS),
                 false, new SamplingProfilerSettingsObserver(contentResolver));
     }
 
@@ -111,8 +111,8 @@
         }
         @Override
         public void onChange(boolean selfChange) {
-            Integer samplingProfilerMs = Settings.Secure.getInt(
-                    mContentResolver, Settings.Secure.SAMPLING_PROFILER_MS, 0);
+            Integer samplingProfilerMs = Settings.Global.getInt(
+                    mContentResolver, Settings.Global.SAMPLING_PROFILER_MS, 0);
             // setting this secure property will start or stop sampling profiler,
             // as well as adjust the the time between taking snapshots.
             SystemProperties.set("persist.sys.profiler_ms", samplingProfilerMs.toString());