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

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

Merge changes from topic "LocationAccessCheck"

* changes:
  New settings for testing permission controller
  Expose API needed for apps to use work profiles.
parents 7f8267d2 c9907ce3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4309,6 +4309,7 @@ package android.os {

  public class UserManager {
    method public void clearSeedAccountData();
    method public android.os.UserHandle getProfileParent(android.os.UserHandle);
    method public java.lang.String getSeedAccountName();
    method public android.os.PersistableBundle getSeedAccountOptions();
    method public java.lang.String getSeedAccountType();
@@ -4640,6 +4641,8 @@ package android.provider {
    field public static final java.lang.String HUSH_GESTURE_USED = "hush_gesture_used";
    field public static final java.lang.String INSTANT_APPS_ENABLED = "instant_apps_enabled";
    field public static final java.lang.String LAST_SETUP_SHOWN = "last_setup_shown";
    field public static final java.lang.String LOCATION_ACCESS_CHECK_DELAY_MILLIS = "location_access_check_delay_millis";
    field public static final java.lang.String LOCATION_ACCESS_CHECK_INTERVAL_MILLIS = "location_access_check_interval_millis";
    field public static final java.lang.String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = "lock_screen_allow_private_notifications";
    field public static final java.lang.String LOCK_SCREEN_SHOW_NOTIFICATIONS = "lock_screen_show_notifications";
    field public static final java.lang.String MANUAL_RINGER_TOGGLE_COUNT = "manual_ringer_toggle_count";
+3 −0
Original line number Diff line number Diff line
@@ -1002,6 +1002,7 @@ package android.provider {
  }

  public static final class Settings.Secure extends android.provider.Settings.NameValueTable {
    method public static void resetToDefaults(android.content.ContentResolver, java.lang.String);
    field public static final java.lang.String ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED = "accessibility_display_magnification_enabled";
    field public static final java.lang.String ACCESSIBILITY_SHORTCUT_TARGET_SERVICE = "accessibility_shortcut_target_service";
    field public static final java.lang.String AUTOFILL_FEATURE_FIELD_CLASSIFICATION = "autofill_field_classification";
@@ -1013,6 +1014,8 @@ package android.provider {
    field public static final java.lang.String AUTOFILL_USER_DATA_MIN_VALUE_LENGTH = "autofill_user_data_min_value_length";
    field public static final java.lang.String DISABLED_PRINT_SERVICES = "disabled_print_services";
    field public static final deprecated java.lang.String ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES = "enabled_notification_policy_access_packages";
    field public static final java.lang.String LOCATION_ACCESS_CHECK_DELAY_MILLIS = "location_access_check_delay_millis";
    field public static final java.lang.String LOCATION_ACCESS_CHECK_INTERVAL_MILLIS = "location_access_check_interval_millis";
    field public static final java.lang.String SYNC_PARENT_SOUNDS = "sync_parent_sounds";
    field public static final java.lang.String USER_SETUP_COMPLETE = "user_setup_complete";
    field public static final java.lang.String VOICE_INTERACTION_SERVICE = "voice_interaction_service";
+21 −0
Original line number Diff line number Diff line
@@ -2462,6 +2462,27 @@ public class UserManager {
        }
    }

    /**
     * Get the parent of a user profile.
     *
     * @param user the handle of the user profile
     *
     * @return the parent of the user or {@code null} if the user is not profile
     *
     * @hide
     */
    @SystemApi
    @RequiresPermission(android.Manifest.permission.MANAGE_USERS)
    public @Nullable UserHandle getProfileParent(@NonNull UserHandle user) {
        UserInfo info = getProfileParent(user.getIdentifier());

        if (info == null) {
            return null;
        }

        return UserHandle.of(info.id);
    }

    /**
     * Enables or disables quiet mode for a managed profile. If quiet mode is enabled, apps in a
     * managed profile don't run, generate notifications, or consume data or battery.
+19 −0
Original line number Diff line number Diff line
@@ -5075,6 +5075,7 @@ public final class Settings {
         * @hide
         */
        @SystemApi
        @TestApi
        @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS)
        public static void resetToDefaults(@NonNull ContentResolver resolver,
                @Nullable String tag) {
@@ -8231,6 +8232,24 @@ public final class Settings {
         */
        public static final String NOTIFICATION_NEW_INTERRUPTION_MODEL = "new_interruption_model";
        /**
         * How often to check for location access.
         * @hide
         */
        @SystemApi
        @TestApi
        public static final String LOCATION_ACCESS_CHECK_INTERVAL_MILLIS =
                "location_access_check_interval_millis";
        /**
         * Delay between granting location access and checking it.
         * @hide
         */
        @SystemApi
        @TestApi
        public static final String LOCATION_ACCESS_CHECK_DELAY_MILLIS =
                "location_access_check_delay_millis";
        /**
         * This are the settings to be backed up.
         *
+12 −0
Original line number Diff line number Diff line
{
    "presubmit": [
        {
            "name": "FrameworksCoreTests",
            "options": [
                {
                    "include-filter": "android.provider.SettingsBackupTest"
                }
            ]
        }
    ]
}
Loading