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

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

Snap for 7510676 from cfe4767b to sc-release

Change-Id: Ia0e2c83398ba59022d550016dbb9eafd8ef5f8a8
parents 7c15099c cfe4767b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -103,8 +103,9 @@ filegroup {
        ":android.hardware.security.secureclock-V1-java-source",
        ":android.security.apc-java-source",
        ":android.security.authorization-java-source",
        ":android.security.legacykeystore-java-source",
        ":android.security.maintenance-java-source",
        ":android.security.vpnprofilestore-java-source",
        ":android.security.metrics-java-source",
        ":android.system.keystore2-V1-java-source",
        ":credstore_aidl",
        ":dumpstate_aidl",
+14 −0
Original line number Diff line number Diff line
@@ -50,6 +50,20 @@ bootclasspath_fragment {
    name: "com.android.appsearch-bootclasspath-fragment",
    contents: ["framework-appsearch"],
    apex_available: ["com.android.appsearch"],

    // The bootclasspath_fragments that provide APIs on which this depends.
    fragments: [
        {
            apex: "com.android.art",
            module: "art-bootclasspath-fragment",
        },
    ],

    // Additional stubs libraries that this fragment's contents use which are
    // not provided by another bootclasspath_fragment.
    additional_stubs: [
        "android-non-updatable",
    ],
}

// Encapsulate the contributions made by the com.android.appsearch to the systemserverclasspath.
+22 −5
Original line number Diff line number Diff line
@@ -494,6 +494,9 @@ public class AlarmManager {
     * exact alarms, rescheduling each time as described above. Legacy applications
     * whose {@code targetSdkVersion} is earlier than API 19 will continue to have all
     * of their alarms, including repeating alarms, treated as exact.
     * <p>Apps targeting {@link Build.VERSION_CODES#S} will need to set the flag
     * {@link PendingIntent#FLAG_MUTABLE} on the {@link PendingIntent} being used to set this alarm,
     * if they want the alarm count to be supplied with the key {@link Intent#EXTRA_ALARM_COUNT}.
     *
     * @param type type of alarm.
     * @param triggerAtMillis time in milliseconds that the alarm should first
@@ -516,6 +519,7 @@ public class AlarmManager {
     * @see #ELAPSED_REALTIME_WAKEUP
     * @see #RTC
     * @see #RTC_WAKEUP
     * @see Intent#EXTRA_ALARM_COUNT
     */
    public void setRepeating(@AlarmType int type, long triggerAtMillis,
            long intervalMillis, PendingIntent operation) {
@@ -1004,6 +1008,9 @@ public class AlarmManager {
     * been available since API 3, your application can safely call it and be
     * assured that it will get similar behavior on both current and older versions
     * of Android.
     * <p>Apps targeting {@link Build.VERSION_CODES#S} will need to set the flag
     * {@link PendingIntent#FLAG_MUTABLE} on the {@link PendingIntent} being used to set this alarm,
     * if they want the alarm count to be supplied with the key {@link Intent#EXTRA_ALARM_COUNT}.
     *
     * @param type type of alarm.
     * @param triggerAtMillis time in milliseconds that the alarm should first
@@ -1038,6 +1045,7 @@ public class AlarmManager {
     * @see #INTERVAL_HOUR
     * @see #INTERVAL_HALF_DAY
     * @see #INTERVAL_DAY
     * @see Intent#EXTRA_ALARM_COUNT
     */
    public void setInexactRepeating(@AlarmType int type, long triggerAtMillis,
            long intervalMillis, PendingIntent operation) {
@@ -1286,22 +1294,31 @@ public class AlarmManager {

    /**
     * Called to check if the caller can schedule exact alarms.
     * Your app schedules exact alarms when it calls any of the {@code setExact...} or
     * {@link #setAlarmClock(AlarmClockInfo, PendingIntent) setAlarmClock} API methods.
     * <p>
     * Apps targeting {@link Build.VERSION_CODES#S} or higher can schedule exact alarms if they
     * have the {@link Manifest.permission#SCHEDULE_EXACT_ALARM} permission. These apps can also
     * Apps targeting {@link Build.VERSION_CODES#S} or higher can schedule exact alarms only if they
     * have the {@link Manifest.permission#SCHEDULE_EXACT_ALARM} permission or they are on the
     * device's power-save exemption list.
     * These apps can also
     * start {@link android.provider.Settings#ACTION_REQUEST_SCHEDULE_EXACT_ALARM} to
     * request this from the user.
     * request this permission from the user.
     * <p>
     * Apps targeting lower sdk versions, can always schedule exact alarms.
     *
     * @return {@code true} if the caller can schedule exact alarms.
     * @return {@code true} if the caller can schedule exact alarms, {@code false} otherwise.
     * @see android.provider.Settings#ACTION_REQUEST_SCHEDULE_EXACT_ALARM
     * @see #setExact(int, long, PendingIntent)
     * @see #setExactAndAllowWhileIdle(int, long, PendingIntent)
     * @see #setAlarmClock(AlarmClockInfo, PendingIntent)
     * @see android.os.PowerManager#isIgnoringBatteryOptimizations(String)
     */
    public boolean canScheduleExactAlarms() {
        return hasScheduleExactAlarm(mContext.getOpPackageName(), mContext.getUserId());
        try {
            return mService.canScheduleExactAlarms(mContext.getOpPackageName());
        } catch (RemoteException re) {
            throw re.rethrowFromSystemServer();
        }
    }

    /**
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ interface IAlarmManager {
    @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
    AlarmManager.AlarmClockInfo getNextAlarmClock(int userId);
    long currentNetworkTimeMillis();
    boolean canScheduleExactAlarms(String packageName);
    boolean hasScheduleExactAlarm(String packageName, int userId);
    int getConfigVersion();
}
+5 −0
Original line number Diff line number Diff line
@@ -190,6 +190,8 @@ public class PowerExemptionManager {
     * @hide
     */
    public static final int REASON_TEMP_ALLOWED_WHILE_IN_USE = 70;
    /** @hide */
    public static final int REASON_CURRENT_INPUT_METHOD = 71;

    /* BG-FGS-launch is allowed by temp-allow-list or system-allow-list.
       Reason code for temp and system allow list starts here.
@@ -381,6 +383,7 @@ public class PowerExemptionManager {
            REASON_ACTIVITY_VISIBILITY_GRACE_PERIOD,
            REASON_OP_ACTIVATE_VPN,
            REASON_OP_ACTIVATE_PLATFORM_VPN,
            REASON_CURRENT_INPUT_METHOD,
            REASON_TEMP_ALLOWED_WHILE_IN_USE,
            // temp and system allow list reasons.
            REASON_GEOFENCING,
@@ -649,6 +652,8 @@ public class PowerExemptionManager {
                return "OP_ACTIVATE_VPN";
            case REASON_OP_ACTIVATE_PLATFORM_VPN:
                return "OP_ACTIVATE_PLATFORM_VPN";
            case REASON_CURRENT_INPUT_METHOD:
                return "CURRENT_INPUT_METHOD";
            case REASON_TEMP_ALLOWED_WHILE_IN_USE:
                return "TEMP_ALLOWED_WHILE_IN_USE";
            case REASON_GEOFENCING:
Loading