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

Commit 5fb9cef3 authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by Android (Google) Code Review
Browse files

Merge "New device config to enable location perm re-up"

parents 3a0a5e9e 25995fee
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5832,6 +5832,7 @@ package android.provider {
  public static interface DeviceConfig.Privacy {
    field public static final String NAMESPACE = "privacy";
    field public static final String PROPERTY_LOCATION_ACCESS_CHECK_ENABLED = "enable_location_access_check";
    field public static final String PROPERTY_PERMISSIONS_HUB_ENABLED = "enable_permissions_hub";
  }
+11 −0
Original line number Diff line number Diff line
@@ -1634,6 +1634,16 @@ package android.provider {
    field public static final android.net.Uri CORP_CONTENT_URI;
  }

  public final class DeviceConfig {
    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.Privacy {
    field public static final String NAMESPACE = "privacy";
    field public static final String PROPERTY_LOCATION_ACCESS_CHECK_ENABLED = "enable_location_access_check";
  }

  public final class MediaStore {
    method @RequiresPermission(android.Manifest.permission.CLEAR_APP_USER_DATA) public static void deleteContributedMedia(android.content.Context, String, android.os.UserHandle) throws java.io.IOException;
    method @RequiresPermission(android.Manifest.permission.CLEAR_APP_USER_DATA) public static long getContributedMediaSize(android.content.Context, String, android.os.UserHandle) throws java.io.IOException;
@@ -1645,6 +1655,7 @@ package android.provider {

  public final class Settings {
    field public static final String ACTION_ENTERPRISE_PRIVACY_SETTINGS = "android.settings.ENTERPRISE_PRIVACY_SETTINGS";
    field public static final int RESET_MODE_PACKAGE_DEFAULTS = 1; // 0x1
  }

  public static final class Settings.Global extends android.provider.Settings.NameValueTable {
+16 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.app.ActivityThread;
import android.content.ContentResolver;
import android.database.ContentObserver;
@@ -44,6 +45,7 @@ import java.util.concurrent.Executor;
 * @hide
 */
@SystemApi
@TestApi
public final class DeviceConfig {
    /**
     * The content:// style URL for the config table.
@@ -169,13 +171,22 @@ public final class DeviceConfig {
     * @hide
     */
    @SystemApi
    @TestApi
    public interface Privacy {
        String NAMESPACE = "privacy";

        /**
         * Whether to show the Permissions Hub.
         *
         * @hide
         */
        @SystemApi
        String PROPERTY_PERMISSIONS_HUB_ENABLED = "enable_permissions_hub";

        /**
         * Whether to show location access check notifications.
         */
        String PROPERTY_LOCATION_ACCESS_CHECK_ENABLED = "enable_location_access_check";
    }

    /**
@@ -317,6 +328,7 @@ public final class DeviceConfig {
     * @see #resetToDefaults(int, String).
     */
    @SystemApi
    @TestApi
    @RequiresPermission(WRITE_DEVICE_CONFIG)
    public static boolean setProperty(
            String namespace, String name, String value, boolean makeDefault) {
@@ -337,6 +349,7 @@ public final class DeviceConfig {
     * @see #setProperty(String, String, String, boolean)
     */
    @SystemApi
    @TestApi
    @RequiresPermission(WRITE_DEVICE_CONFIG)
    public static void resetToDefaults(@ResetMode int resetMode, @Nullable String namespace) {
        ContentResolver contentResolver = ActivityThread.currentApplication().getContentResolver();
@@ -483,7 +496,10 @@ public final class DeviceConfig {
     * Interface for monitoring to properties.
     * <p>
     * Override {@link #onPropertyChanged(String, String, String)} to handle callbacks for changes.
     *
     * @hide
     */
    @SystemApi
    public interface OnPropertyChangedListener {
        /**
         * Called when a property has changed.
+1 −0
Original line number Diff line number Diff line
@@ -1861,6 +1861,7 @@ public final class Settings {
     * This is the only type of reset available to non-system clients.
     * @hide
     */
    @TestApi
    public static final int RESET_MODE_PACKAGE_DEFAULTS = 1;
    /**