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

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

Snap for 11120126 from e1b4e2dd to 24Q1-release

Change-Id: Ibfdd819f98aafec9f4ee24bd23fa8f1808fcb160
parents 8e9dcd07 e1b4e2dd
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -414,13 +414,25 @@ java_defaults {
    ],
}

// Collection of non updatable unbundled jars. The list here should match
// |non_updatable_modules| variable in frameworks/base/api/api.go.
java_library {
    name: "framework-non-updatable-unbundled-impl-libs",
    static_libs: [
        "framework-location.impl",
        "framework-nfc.impl",
    ],
    sdk_version: "core_platform",
    installable: false,
}

// Separated so framework-minus-apex-defaults can be used without the libs dependency
java_defaults {
    name: "framework-minus-apex-with-libs-defaults",
    defaults: ["framework-minus-apex-defaults"],
    libs: [
        "framework-virtualization.stubs.module_lib",
        "framework-location.impl",
        "framework-non-updatable-unbundled-impl-libs",
    ],
}

@@ -451,7 +463,7 @@ java_library {
    stem: "framework",
    apex_available: ["//apex_available:platform"],
    visibility: [
        "//frameworks/base/location",
        "//frameworks/base:__subpackages__",
    ],
    compile_dex: false,
    headers_only: true,
@@ -514,8 +526,8 @@ java_library {
    installable: false, // this lib is a build-only library
    static_libs: [
        "app-compat-annotations",
        "framework-location.impl",
        "framework-minus-apex",
        "framework-non-updatable-unbundled-impl-libs",
        "framework-updatable-stubs-module_libs_api",
    ],
    sdk_version: "core_platform",

THERMAL_OWNERS

0 → 100644
+3 −0
Original line number Diff line number Diff line
lpy@google.com
wvw@google.com
xwxw@google.com
+2 −3
Original line number Diff line number Diff line
balejs@google.com
carmenjackson@google.com
cfijalkovich@google.com
dualli@google.com
edgararriaga@google.com
jpakaravoor@google.com
jdduke@google.com
jreck@google.com #{LAST_RESORT_SUGGESTION}
kevinjeon@google.com
philipcuadra@google.com
shayba@google.com
shombert@google.com
timmurray@google.com
wessam@google.com
+4 −4
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import static android.app.AlarmManager.RTC;
import static android.app.AlarmManager.RTC_WAKEUP;

import static com.android.server.alarm.AlarmManagerService.PRIORITY_NORMAL;
import static com.android.server.alarm.AlarmManagerService.clampPositive;
import static com.android.server.alarm.AlarmManagerService.addClampPositive;

import android.app.AlarmManager;
import android.app.IAlarmListener;
@@ -148,7 +148,7 @@ class Alarm {
        mPolicyWhenElapsed[REQUESTER_POLICY_INDEX] = requestedWhenElapsed;
        mWhenElapsed = requestedWhenElapsed;
        this.windowLength = windowLength;
        mMaxWhenElapsed = clampPositive(requestedWhenElapsed + windowLength);
        mMaxWhenElapsed = addClampPositive(requestedWhenElapsed, windowLength);
        repeatInterval = interval;
        operation = op;
        listener = rec;
@@ -244,8 +244,8 @@ class Alarm {

        final long oldMaxWhenElapsed = mMaxWhenElapsed;
        // windowLength should always be >= 0 here.
        final long maxRequestedElapsed = clampPositive(
                mPolicyWhenElapsed[REQUESTER_POLICY_INDEX] + windowLength);
        final long maxRequestedElapsed = addClampPositive(
                mPolicyWhenElapsed[REQUESTER_POLICY_INDEX], windowLength);
        mMaxWhenElapsed = Math.max(maxRequestedElapsed, mWhenElapsed);

        return (oldWhenElapsed != mWhenElapsed) || (oldMaxWhenElapsed != mMaxWhenElapsed);
+15 −3
Original line number Diff line number Diff line
@@ -1417,15 +1417,15 @@ public class AlarmManagerService extends SystemService {
        if (futurity < MIN_FUZZABLE_INTERVAL) {
            futurity = 0;
        }
        long maxElapsed = triggerAtTime + (long) (0.75 * futurity);
        long maxElapsed = addClampPositive(triggerAtTime, (long) (0.75 * futurity));
        // For non-repeating alarms, window is capped at a maximum of one hour from the requested
        // delivery time. This allows for inexact-while-idle alarms to be slightly more reliable.
        // In practice, the delivery window should generally be much smaller than that
        // when the device is not idling.
        if (interval == 0) {
            maxElapsed = Math.min(maxElapsed, triggerAtTime + INTERVAL_HOUR);
            maxElapsed = Math.min(maxElapsed, addClampPositive(triggerAtTime, INTERVAL_HOUR));
        }
        return clampPositive(maxElapsed);
        return maxElapsed;
    }

    // The RTC clock has moved arbitrarily, so we need to recalculate all the RTC alarm deliveries.
@@ -1512,6 +1512,18 @@ public class AlarmManagerService extends SystemService {
        return (val >= 0) ? val : Long.MAX_VALUE;
    }

    static long addClampPositive(long val1, long val2) {
        long val = val1 + val2;
        if (val >= 0) {
            return val;
        } else if (val1 >= 0 && val2 >= 0) {
            /* Both are +ve, so overflow happened. */
            return Long.MAX_VALUE;
        } else {
            return 0;
        }
    }

    /**
     * Sends alarms that were blocked due to user applied background restrictions - either because
     * the user lifted those or the uid came to foreground.
Loading