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

Commit 7e8cb3c2 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11766482 from de0c0e22 to 24Q3-release

Change-Id: I1eb9c4ff88f7b6218fbeb7c2fbaf1696a2a40825
parents 49bf7065 de0c0e22
Loading
Loading
Loading
Loading
+41 −12
Original line number Diff line number Diff line
@@ -136,11 +136,10 @@ public class UserWakeupStore {
     * Remove wakeup scheduled for the user with given userId if present.
     */
    public void removeUserWakeup(int userId) {
        synchronized (mUserWakeupLock) {
            mUserStarts.delete(userId);
        }
        if (deleteWakeupFromUserStarts(userId)) {
            updateUserListFile();
        }
    }

    /**
     * Get ids of users that need to be started now.
@@ -186,7 +185,7 @@ public class UserWakeupStore {
     * Return scheduled start time for user or -1 if user does not have alarm set.
     */
    @VisibleForTesting
    long getWakeupTimeForUserForTest(int userId) {
    long getWakeupTimeForUser(int userId) {
        synchronized (mUserWakeupLock) {
            return mUserStarts.get(userId, -1);
        }
@@ -197,30 +196,60 @@ public class UserWakeupStore {
     */
    public void onUserStarting(int userId) {
        synchronized (mUserWakeupLock) {
            mStartingUsers.put(userId, getWakeupTimeForUserForTest(userId));
            final long wakeup = getWakeupTimeForUser(userId);
            if (wakeup >= 0) {
                mStartingUsers.put(userId, wakeup);
                mUserStarts.delete(userId);
            }
        }
    }

    /**
     * Remove userId from starting user list once start is complete.
     */
    public void onUserStarted(int userId) {
        synchronized (mUserWakeupLock) {
            mStartingUsers.delete(userId);
        }
        if (deleteWakeupFromStartingUsers(userId)) {
            updateUserListFile();
        }
    }

    /**
     * Remove userId from the store when the user is removed.
     */
    public void onUserRemoved(int userId) {
        if (deleteWakeupFromUserStarts(userId) || deleteWakeupFromStartingUsers(userId)) {
            updateUserListFile();
        }
    }

    /**
     * Remove wakeup for a given userId from mUserStarts.
     * @return true if an entry is found and the list of wakeups changes.
     */
    private boolean deleteWakeupFromUserStarts(int userId) {
        int index;
        synchronized (mUserWakeupLock) {
            mUserStarts.delete(userId);
            mStartingUsers.delete(userId);
            index = mUserStarts.indexOfKey(userId);
            if (index >= 0) {
                mUserStarts.removeAt(index);
            }
        updateUserListFile();
        }
        return index >= 0;
    }

    /**
     * Remove wakeup for a given userId from mStartingUsers.
     * @return true if an entry is found and the list of wakeups changes.
     */
    private boolean deleteWakeupFromStartingUsers(int userId) {
        int index;
        synchronized (mUserWakeupLock) {
            index = mStartingUsers.indexOfKey(userId);
            if (index >= 0) {
                mStartingUsers.removeAt(index);
            }
        }
        return index >= 0;
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -32743,7 +32743,7 @@ package android.os {
    field public static final int S_V2 = 32; // 0x20
    field public static final int TIRAMISU = 33; // 0x21
    field public static final int UPSIDE_DOWN_CAKE = 34; // 0x22
    field public static final int VANILLA_ICE_CREAM = 10000; // 0x2710
    field public static final int VANILLA_ICE_CREAM = 35; // 0x23
  }
  public final class Bundle extends android.os.BaseBundle implements java.lang.Cloneable android.os.Parcelable {
+5 −2
Original line number Diff line number Diff line
@@ -596,6 +596,7 @@ package android.app.admin {
    method @Deprecated public int getDeviceOwnerType(@NonNull android.content.ComponentName);
    method @Nullable public String getDevicePolicyManagementRoleHolderUpdaterPackage();
    method @NonNull public java.util.Set<java.lang.String> getDisallowedSystemApps(@NonNull android.content.ComponentName, int, @NonNull String);
    method @FlaggedApi("android.app.admin.flags.headless_device_owner_provisioning_fix_enabled") @RequiresPermission(android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS) public int getHeadlessDeviceOwnerMode();
    method public long getLastBugReportRequestTime();
    method public long getLastNetworkLogRetrievalTime();
    method public long getLastSecurityLogRetrievalTime();
@@ -1770,14 +1771,16 @@ package android.hardware.input {
  }

  public final class InputManager {
    method public void addUniqueIdAssociation(@NonNull String, @NonNull String);
    method @RequiresPermission("android.permission.ASSOCIATE_INPUT_DEVICE_TO_DISPLAY") public void addUniqueIdAssociation(@NonNull String, @NonNull String);
    method @FlaggedApi("com.android.input.flags.device_associations") @RequiresPermission("android.permission.ASSOCIATE_INPUT_DEVICE_TO_DISPLAY") public void addUniqueIdAssociationByDescriptor(@NonNull String, @NonNull String);
    method @RequiresPermission(android.Manifest.permission.REMAP_MODIFIER_KEYS) public void clearAllModifierKeyRemappings();
    method @NonNull public java.util.List<java.lang.String> getKeyboardLayoutDescriptors();
    method @NonNull public String getKeyboardLayoutTypeForLayoutDescriptor(@NonNull String);
    method @NonNull @RequiresPermission(android.Manifest.permission.REMAP_MODIFIER_KEYS) public java.util.Map<java.lang.Integer,java.lang.Integer> getModifierKeyRemapping();
    method public int getMousePointerSpeed();
    method @RequiresPermission(android.Manifest.permission.REMAP_MODIFIER_KEYS) public void remapModifierKey(int, int);
    method public void removeUniqueIdAssociation(@NonNull String);
    method @RequiresPermission("android.permission.ASSOCIATE_INPUT_DEVICE_TO_DISPLAY") public void removeUniqueIdAssociation(@NonNull String);
    method @FlaggedApi("com.android.input.flags.device_associations") @RequiresPermission("android.permission.ASSOCIATE_INPUT_DEVICE_TO_DISPLAY") public void removeUniqueIdAssociationByDescriptor(@NonNull String);
    field public static final long BLOCK_UNTRUSTED_TOUCHES = 158002302L; // 0x96aec7eL
  }

+4 −0
Original line number Diff line number Diff line
@@ -977,8 +977,12 @@ RequiresPermission: android.hardware.hdmi.HdmiControlManager#setHdmiCecVersion(i
    Method 'setHdmiCecVersion' documentation mentions permissions already declared by @RequiresPermission
RequiresPermission: android.hardware.input.InputManager#addUniqueIdAssociation(String, String):
    Method 'addUniqueIdAssociation' documentation mentions permissions without declaring @RequiresPermission
RequiresPermission: android.hardware.input.InputManager#addUniqueIdAssociationByDescriptor(String, String):
    Method 'addUniqueIdAssociationByDescriptor' documentation mentions permissions already declared by @RequiresPermission
RequiresPermission: android.hardware.input.InputManager#removeUniqueIdAssociation(String):
    Method 'removeUniqueIdAssociation' documentation mentions permissions without declaring @RequiresPermission
RequiresPermission: android.hardware.input.InputManager#removeUniqueIdAssociationByDescriptor(String):
    Method 'removeUniqueIdAssociationByDescriptor' documentation mentions permissions already declared by @RequiresPermission
RequiresPermission: android.hardware.location.GeofenceHardware#addGeofence(int, int, android.hardware.location.GeofenceHardwareRequest, android.hardware.location.GeofenceHardwareCallback):
    Method 'addGeofence' documentation mentions permissions without declaring @RequiresPermission
RequiresPermission: android.hardware.location.GeofenceHardware#getMonitoringTypes():
+0 −2
Original line number Diff line number Diff line
@@ -2577,8 +2577,6 @@ public class AppOpsManager {
            OP_RECEIVE_SANDBOX_TRIGGER_AUDIO,
            OP_MEDIA_ROUTING_CONTROL,
            OP_READ_SYSTEM_GRAMMATICAL_GENDER,
            OP_ARCHIVE_ICON_OVERLAY,
            OP_UNARCHIVAL_CONFIRMATION,
    };

    static final AppOpInfo[] sAppOpInfos = new AppOpInfo[]{
Loading