summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/SystemServer.java
diff options
context:
space:
mode:
authorFelipe Leme <felipeal@google.com>2019-01-24 14:55:03 -0800
committerFelipe Leme <felipeal@google.com>2019-01-28 16:34:40 -0800
commit70bcf38e2cf27cfcd920ebf17500fa97478dc0d0 (patch)
tree346030ec40a128b8eb135eba43a206175fa56bfd /services/java/com/android/server/SystemServer.java
parentd45ffc7977d33239151a7071393013491927b3e7 (diff)
Moved Content Capture settings to DeviceConfig.
To test, manually played with 'adb shell device_config'. Examples: $ adb shell device_config list content_capture $ adb shell device_config delete content_capture enable_contentcapture $ adb shell stop && adb shell start $ adb shell service check content_capture Service content_capture: not found $ adb shell device_config put content_capture enable_contentcapture always $ adb shell stop && adb shell start $ adb shell service check content_capture Service content_capture: found Then ran CTS and FrameworkCoreTests below... Test: atest CtsContentCaptureServiceTestCases \ FrameworksCoreTests:android.provider.SettingsBackupTest#secureSettingsBackedUpOrBlacklisted Test: m update-api Bug: 121037717 Bug: 121153631 Change-Id: Ib93bf8181253228ccbdb3edbd84c5d0431c84eb4
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
-rw-r--r--services/java/com/android/server/SystemServer.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 586136802619..80552d88a49d 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -55,6 +55,7 @@ import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
import android.os.storage.IStorageManager;
+import android.provider.DeviceConfig;
import android.provider.Settings;
import android.sysprop.VoldProperties;
import android.text.TextUtils;
@@ -2212,10 +2213,9 @@ public final class SystemServer {
}
private void startContentCaptureService(@NonNull Context context) {
-
- // Check if it was explicitly enabled by Settings
- final String settings = Settings.Global.getString(context.getContentResolver(),
- Settings.Global.CONTENT_CAPTURE_SERVICE_EXPLICITLY_ENABLED);
+ // Check if it was explicitly enabled by DeviceConfig
+ final String settings = DeviceConfig.getProperty(DeviceConfig.ContentCapture.NAMESPACE,
+ DeviceConfig.ContentCapture.PROPERTY_CONTENTCAPTURE_ENABLED);
if (settings == null) {
// Better be safe than sorry...
Slog.d(TAG, "ContentCaptureService disabled because its not set by OEM");
@@ -2224,7 +2224,7 @@ public final class SystemServer {
switch (settings) {
case "always":
// Should be used only during development
- Slog.d(TAG, "ContentCaptureService explicitly enabled by Settings");
+ Slog.d(TAG, "ContentCaptureService explicitly enabled by DeviceConfig");
break;
case "default":
// Default case: check if OEM overlaid the resource that defines the service.