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

Commit 233ce9ef authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7460608 from f34c9ede to sc-release

Change-Id: Icefa7a959e8b47c6b77e621c924eba895eab3c47
parents 379d80ba f34c9ede
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ public class AppSearchManagerService extends SystemService {
     */
    private void handleUserRemoved(@NonNull UserHandle userHandle) {
        try {
            mImplInstanceManager.removeAppSearchImplForUser(userHandle);
            mImplInstanceManager.closeAndRemoveAppSearchImplForUser(userHandle);
            mLoggerInstanceManager.removePlatformLoggerForUser(userHandle);
            Log.i(TAG, "Removed AppSearchImpl instance for: " + userHandle);
        } catch (Throwable t) {
+0 −19
Original line number Diff line number Diff line
@@ -103,25 +103,6 @@ public final class ImplInstanceManager {
        }
    }

    /**
     * Remove an instance of {@link AppSearchImpl} for the given user.
     *
     * <p>This method should only be called if {@link AppSearchManagerService} receives an
     * ACTION_USER_REMOVED, which the instance of given user should be removed.
     *
     * <p>If the user is removed, the "credential encrypted" system directory where icing lives will
     * be auto-deleted. So we shouldn't worry about persist data or close the AppSearchImpl.
     *
     * @param userHandle The multi-user user handle of the user that need to be removed.
     */
    public void removeAppSearchImplForUser(@NonNull UserHandle userHandle) {
        Objects.requireNonNull(userHandle);
        synchronized (mInstancesLocked) {
            // no need to close and persist data to disk since we are removing them now.
            mInstancesLocked.remove(userHandle);
        }
    }

    /**
     * Close and remove an instance of {@link AppSearchImpl} for the given user.
     *
+60 −14
Original line number Diff line number Diff line
@@ -662,10 +662,19 @@ public class AlarmManager {
     * scheduled as exact.  Applications are strongly discouraged from using exact
     * alarms unnecessarily as they reduce the OS's ability to minimize battery use.
     *
     * <p>
     * Starting with {@link Build.VERSION_CODES#S}, apps require the
     * <p class="note"><strong>Note:</strong>
     * Starting with {@link Build.VERSION_CODES#S}, apps targeting SDK level 31 or higher
     * need to request the
     * {@link Manifest.permission#SCHEDULE_EXACT_ALARM SCHEDULE_EXACT_ALARM} permission to use this
     * API.
     * API, unless the app is exempt from battery restrictions.
     * The user and the system can revoke this permission via the special app access screen in
     * Settings.
     *
     * <p class="note"><strong>Note:</strong>
     * Exact alarms should only be used for user-facing features.
     * For more details, see <a
     * href="{@docRoot}about/versions/12/behavior-changes-12#exact-alarm-permission">
     * Exact alarm permission</a>.
     *
     * @param type type of alarm.
     * @param triggerAtMillis time in milliseconds that the alarm should go
@@ -685,6 +694,7 @@ public class AlarmManager {
     * @see #ELAPSED_REALTIME_WAKEUP
     * @see #RTC
     * @see #RTC_WAKEUP
     * @see Manifest.permission#SCHEDULE_EXACT_ALARM SCHEDULE_EXACT_ALARM
     */
    @RequiresPermission(value = Manifest.permission.SCHEDULE_EXACT_ALARM, conditional = true)
    public void setExact(@AlarmType int type, long triggerAtMillis, PendingIntent operation) {
@@ -701,10 +711,21 @@ public class AlarmManager {
     * invoked via the specified target Handler, or on the application's main looper
     * if {@code null} is passed as the {@code targetHandler} parameter.
     *
     * <p>
     * Starting with {@link Build.VERSION_CODES#S}, apps require the
     * <p class="note"><strong>Note:</strong>
     * Starting with {@link Build.VERSION_CODES#S}, apps targeting SDK level 31 or higher
     * need to request the
     * {@link Manifest.permission#SCHEDULE_EXACT_ALARM SCHEDULE_EXACT_ALARM} permission to use this
     * API.
     * API, unless the app is exempt from battery restrictions.
     * The user and the system can revoke this permission via the special app access screen in
     * Settings.
     *
     * <p class="note"><strong>Note:</strong>
     * Exact alarms should only be used for user-facing features.
     * For more details, see <a
     * href="{@docRoot}about/versions/12/behavior-changes-12#exact-alarm-permission">
     * Exact alarm permission</a>.
     *
     * @see Manifest.permission#SCHEDULE_EXACT_ALARM SCHEDULE_EXACT_ALARM
     */
    @RequiresPermission(value = Manifest.permission.SCHEDULE_EXACT_ALARM, conditional = true)
    public void setExact(@AlarmType int type, long triggerAtMillis, String tag,
@@ -745,9 +766,21 @@ public class AlarmManager {
     * This method is like {@link #setExact(int, long, PendingIntent)}, but implies
     * {@link #RTC_WAKEUP}.
     *
     * <p>
     * Starting from API {@link Build.VERSION_CODES#S}, using this method requires the
     * {@link Manifest.permission#SCHEDULE_EXACT_ALARM} permission. Alarms scheduled via this API
     * <p class="note"><strong>Note:</strong>
     * Starting with {@link Build.VERSION_CODES#S}, apps targeting SDK level 31 or higher
     * need to request the
     * {@link Manifest.permission#SCHEDULE_EXACT_ALARM SCHEDULE_EXACT_ALARM} permission to use this
     * API.
     * The user and the system can revoke this permission via the special app access screen in
     * Settings.
     *
     * <p class="note"><strong>Note:</strong>
     * Exact alarms should only be used for user-facing features.
     * For more details, see <a
     * href="{@docRoot}about/versions/12/behavior-changes-12#exact-alarm-permission">
     * Exact alarm permission</a>.
     *
     * <p>Alarms scheduled via this API
     * will be allowed to start a foreground service even if the app is in the background.
     *
     * @param info
@@ -764,6 +797,7 @@ public class AlarmManager {
     * @see android.content.Context#sendBroadcast
     * @see android.content.Context#registerReceiver
     * @see android.content.Intent#filterEquals
     * @see Manifest.permission#SCHEDULE_EXACT_ALARM SCHEDULE_EXACT_ALARM
     */
    @RequiresPermission(Manifest.permission.SCHEDULE_EXACT_ALARM)
    public void setAlarmClock(AlarmClockInfo info, PendingIntent operation) {
@@ -1090,11 +1124,22 @@ public class AlarmManager {
     * device is idle it may take even more liberties with scheduling in order to optimize
     * for battery life.</p>
     *
     * <p>
     * Starting from API {@link Build.VERSION_CODES#S}, using this method requires the
     * {@link Manifest.permission#SCHEDULE_EXACT_ALARM} permission, unless the app is exempt from
     * battery restrictions. Alarms scheduled via this API will be allowed to start a foreground
     * service even if the app is in the background.
     * <p class="note"><strong>Note:</strong>
     * Starting with {@link Build.VERSION_CODES#S}, apps targeting SDK level 31 or higher
     * need to request the
     * {@link Manifest.permission#SCHEDULE_EXACT_ALARM SCHEDULE_EXACT_ALARM} permission to use this
     * API, unless the app is exempt from battery restrictions.
     * The user and the system can revoke this permission via the special app access screen in
     * Settings.
     *
     * <p class="note"><strong>Note:</strong>
     * Exact alarms should only be used for user-facing features.
     * For more details, see <a
     * href="{@docRoot}about/versions/12/behavior-changes-12#exact-alarm-permission">
     * Exact alarm permission</a>.
     *
     * <p>Alarms scheduled via this API
     * will be allowed to start a foreground service even if the app is in the background.
     *
     * @param type type of alarm.
     * @param triggerAtMillis time in milliseconds that the alarm should go
@@ -1114,6 +1159,7 @@ public class AlarmManager {
     * @see #ELAPSED_REALTIME_WAKEUP
     * @see #RTC
     * @see #RTC_WAKEUP
     * @see Manifest.permission#SCHEDULE_EXACT_ALARM SCHEDULE_EXACT_ALARM
     */
    @RequiresPermission(value = Manifest.permission.SCHEDULE_EXACT_ALARM, conditional = true)
    public void setExactAndAllowWhileIdle(@AlarmType int type, long triggerAtMillis,
+236 −49

File changed.

Preview size limit exceeded, changes collapsed.

+3 −1
Original line number Diff line number Diff line
@@ -469,7 +469,9 @@ public class MediaSession2 implements AutoCloseable {
        }
        mCallbackExecutor.execute(() -> {
            if (!controllerInfo.removeRequestedCommandSeqNumber(seq)) {
                if (resultReceiver != null) {
                    resultReceiver.send(RESULT_INFO_SKIPPED, null);
                }
                return;
            }
            Session2Command.Result result = mCallback.onSessionCommand(
Loading