Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14608b3d authored by Felipe Leme's avatar Felipe Leme Committed by Android (Google) Code Review
Browse files

Merge "Make some DeviceConfig methods available for testing."

parents 0528cd9d d03283d0
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -5709,7 +5709,6 @@ package android.provider {
    method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static void resetToDefaults(int, @Nullable String);
    method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static boolean setProperty(String, String, String, boolean);
    field public static final String NAMESPACE_AUTOFILL = "autofill";
    field public static final String NAMESPACE_CONTENT_CAPTURE = "content_capture";
    field public static final String NAMESPACE_GAME_DRIVER = "game_driver";
    field public static final String NAMESPACE_INPUT_NATIVE_BOOT = "input_native_boot";
    field public static final String NAMESPACE_NETD_NATIVE = "netd_native";
+6 −0
Original line number Diff line number Diff line
@@ -1784,10 +1784,16 @@ package android.provider {
  }

  public final class DeviceConfig {
    method @RequiresPermission("android.permission.READ_DEVICE_CONFIG") public static String getProperty(String, String);
    method @RequiresPermission("android.permission.WRITE_DEVICE_CONFIG") public static void resetToDefaults(int, @Nullable String);
    method @RequiresPermission("android.permission.WRITE_DEVICE_CONFIG") public static boolean setProperty(String, String, String, boolean);
  }

  public static interface DeviceConfig.ContentCapture {
    field public static final String NAMESPACE = "content_capture";
    field public static final String PROPERTY_CONTENTCAPTURE_ENABLED = "enable_contentcapture";
  }

  public static interface DeviceConfig.Privacy {
    field public static final String NAMESPACE = "privacy";
    field public static final String PROPERTY_LOCATION_ACCESS_CHECK_ENABLED = "location_access_check_enabled";
+3 −9
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ public final class DeviceConfig {
     * @hide
     */
    @SystemApi
    @TestApi
    public interface ContentCapture {
        String NAMESPACE = "content_capture";

@@ -101,18 +102,10 @@ public final class DeviceConfig {
         * @hide
         */
        // TODO(b/121153631): revert back to SERVICE_EXPLICITLY_ENABLED approach
        @TestApi
        String PROPERTY_CONTENTCAPTURE_ENABLED = "enable_contentcapture";
    }

    /**
     * Namespace for content capture feature used by on-device machine intelligence
     * to provide suggestions in a privacy-safe manner.
     *
     * @hide
     */
    @SystemApi
    public static final String NAMESPACE_CONTENT_CAPTURE = "content_capture";

    /**
     * Namespace for all input-related features that are used at the native level.
     * These features are applied at reboot.
@@ -360,6 +353,7 @@ public final class DeviceConfig {
     * @hide
     */
    @SystemApi
    @TestApi
    @RequiresPermission(READ_DEVICE_CONFIG)
    public static String getProperty(String namespace, String name) {
        ContentResolver contentResolver = ActivityThread.currentApplication().getContentResolver();