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

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

Snap for 11302939 from b8e9d020 to 24Q2-release

Change-Id: I901b8aae2824e67134ece6ef01e586ae24613819
parents 1873061d b8e9d020
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -123,7 +123,8 @@ typedef struct APerformanceHintSession APerformanceHintSession;
  *
  * @return APerformanceHintManager instance on success, nullptr on failure.
  */
APerformanceHintManager* _Nullable APerformanceHint_getManager() __INTRODUCED_IN(__ANDROID_API_T__);
APerformanceHintManager* _Nullable APerformanceHint_getManager()
                         __INTRODUCED_IN(__ANDROID_API_T__);

/**
 * Creates a session for the given set of threads and sets their initial target work
@@ -260,7 +261,8 @@ AWorkDuration* _Nonnull AWorkDuration_create() __INTRODUCED_IN(__ANDROID_API_V__
 *
 * @param aWorkDuration The {@link AWorkDuration} created by calling {@link AWorkDuration_create()}
 */
void AWorkDuration_release(AWorkDuration* _Nonnull WorkDuration) __INTRODUCED_IN(__ANDROID_API_V__);
void AWorkDuration_release(AWorkDuration* _Nonnull aWorkDuration)
     __INTRODUCED_IN(__ANDROID_API_V__);

/**
 * Sets the work period start timestamp in nanoseconds.
+17 −13
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ typedef struct AThermalManager AThermalManager;
 * It's passed the updated thermal status as parameter, as well as the
 * pointer provided by the client that registered a callback.
 */
typedef void (*AThermal_StatusCallback)(void* data, AThermalStatus status);
typedef void (*AThermal_StatusCallback)(void* _Nullable data, AThermalStatus status);

/**
  * Acquire an instance of the thermal manager. This must be freed using
@@ -121,7 +121,7 @@ typedef void (*AThermal_StatusCallback)(void* data, AThermalStatus status);
  *
  * @return manager instance on success, nullptr on failure.
  */
AThermalManager* AThermal_acquireManager() __INTRODUCED_IN(30);
AThermalManager* _Nonnull AThermal_acquireManager() __INTRODUCED_IN(30);

/**
 * Release the thermal manager pointer acquired via
@@ -131,7 +131,7 @@ AThermalManager* AThermal_acquireManager() __INTRODUCED_IN(30);
 *
 * @param manager The manager to be released.
 */
void AThermal_releaseManager(AThermalManager *manager) __INTRODUCED_IN(30);
void AThermal_releaseManager(AThermalManager* _Nonnull manager) __INTRODUCED_IN(30);

/**
  * Gets the current thermal status.
@@ -143,7 +143,8 @@ void AThermal_releaseManager(AThermalManager *manager) __INTRODUCED_IN(30);
  *
  * @return current thermal status, ATHERMAL_STATUS_ERROR on failure.
  */
AThermalStatus AThermal_getCurrentThermalStatus(AThermalManager *manager) __INTRODUCED_IN(30);
AThermalStatus
AThermal_getCurrentThermalStatus(AThermalManager* _Nonnull manager) __INTRODUCED_IN(30);

/**
 * Register the thermal status listener for thermal status change.
@@ -160,8 +161,9 @@ AThermalStatus AThermal_getCurrentThermalStatus(AThermalManager *manager) __INTR
 *         EPERM if the required permission is not held.
 *         EPIPE if communication with the system service has failed.
 */
int AThermal_registerThermalStatusListener(AThermalManager *manager,
        AThermal_StatusCallback callback, void *data) __INTRODUCED_IN(30);
int AThermal_registerThermalStatusListener(AThermalManager* _Nonnull manager,
                                           AThermal_StatusCallback _Nullable callback,
                                           void* _Nullable data) __INTRODUCED_IN(30);

/**
 * Unregister the thermal status listener previously resgistered.
@@ -178,8 +180,9 @@ int AThermal_registerThermalStatusListener(AThermalManager *manager,
 *         EPERM if the required permission is not held.
 *         EPIPE if communication with the system service has failed.
 */
int AThermal_unregisterThermalStatusListener(AThermalManager *manager,
        AThermal_StatusCallback callback, void *data) __INTRODUCED_IN(30);
int AThermal_unregisterThermalStatusListener(AThermalManager* _Nonnull manager,
                                             AThermal_StatusCallback _Nullable callback,
                                             void* _Nullable data) __INTRODUCED_IN(30);

/**
 * Provides an estimate of how much thermal headroom the device currently has before
@@ -219,7 +222,7 @@ int AThermal_unregisterThermalStatusListener(AThermalManager *manager,
 *         as described above. Returns NaN if the device does not support this functionality or
 *         if this function is called significantly faster than once per second.
  */
float AThermal_getThermalHeadroom(AThermalManager *manager,
float AThermal_getThermalHeadroom(AThermalManager* _Nonnull manager,
                                  int forecastSeconds) __INTRODUCED_IN(31);

/**
@@ -282,9 +285,10 @@ struct AThermalHeadroomThreshold {
 *         EPIPE if communication with the system service has failed.
 *         ENOSYS if the feature is disabled by the current system.
 */
int AThermal_getThermalHeadroomThresholds(AThermalManager* manager,
                                          const AThermalHeadroomThreshold ** outThresholds,
                                          size_t* size) __INTRODUCED_IN(35);
int AThermal_getThermalHeadroomThresholds(AThermalManager* _Nonnull manager,
                                          const AThermalHeadroomThreshold* _Nonnull
                                          * _Nullable outThresholds,
                                          size_t* _Nonnull size) __INTRODUCED_IN(35);

#ifdef __cplusplus
}
+20 −0
Original line number Diff line number Diff line
@@ -53,6 +53,26 @@ enum SessionHint: int32_t {
     * CPU resources to what was used previously, and must wake up if inactive.
     */
    CPU_LOAD_RESUME = 3,

    /**
     * This hint indicates an increase in GPU workload intensity. It means that
     * this hint session needs extra GPU resources to meet the target duration.
     * This hint must be sent before reporting the actual duration to the session.
     */
    GPU_LOAD_UP = 5,

    /**
     * This hint indicates a decrease in GPU workload intensity. It means that
     * this hint session can reduce GPU resources and still meet the target duration.
     */
    GPU_LOAD_DOWN = 6,

    /*
     * This hint indicates an upcoming GPU workload that is completely changed and
     * unknown. It means that the hint session should reset GPU resources to a known
     * baseline to prepare for an arbitrary load, and must wake up if inactive.
     */
    GPU_LOAD_RESET = 7,
};

/**
+223 −186

File changed.

Preview size limit exceeded, changes collapsed.

+19 −16
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ binder_status_t APersistableBundle_writeToParcel(const APersistableBundle* pBund
    return pBundle->mPBundle.writeToParcel(AParcel_viewPlatformParcel(parcel));
}

int32_t APersistableBundle_size(APersistableBundle* pBundle) {
int32_t APersistableBundle_size(const APersistableBundle* pBundle) {
    size_t size = pBundle->mPBundle.size();
    LOG_ALWAYS_FATAL_IF(size > INT32_MAX,
                        "The APersistableBundle has gotten too large! There will be an overflow in "
@@ -167,40 +167,42 @@ int32_t APersistableBundle_getString(const APersistableBundle* pBundle, const ch
                                     void* context) {
    android::String16 outVal;
    bool ret = pBundle->mPBundle.getString(android::String16(key), &outVal);
    if (ret) {
    if (!ret) return APERSISTABLEBUNDLE_KEY_NOT_FOUND;
    android::String8 tmp8(outVal);
    *val = stringAllocator(tmp8.bytes() + 1, context);
    if (*val) {
        strncpy(*val, tmp8.c_str(), tmp8.bytes() + 1);
        return tmp8.bytes();
    } else {
            return -1;
        }
        return APERSISTABLEBUNDLE_ALLOCATOR_FAILED;
    }
    return 0;
}
int32_t APersistableBundle_getBooleanVector(const APersistableBundle* pBundle, const char* key,
                                            bool* buffer, int32_t bufferSizeBytes) {
    std::vector<bool> newVec;
    pBundle->mPBundle.getBooleanVector(android::String16(key), &newVec);
    bool ret = pBundle->mPBundle.getBooleanVector(android::String16(key), &newVec);
    if (!ret) return APERSISTABLEBUNDLE_KEY_NOT_FOUND;
    return getVecInternal<bool>(newVec, buffer, bufferSizeBytes);
}
int32_t APersistableBundle_getIntVector(const APersistableBundle* pBundle, const char* key,
                                        int32_t* buffer, int32_t bufferSizeBytes) {
    std::vector<int32_t> newVec;
    pBundle->mPBundle.getIntVector(android::String16(key), &newVec);
    bool ret = pBundle->mPBundle.getIntVector(android::String16(key), &newVec);
    if (!ret) return APERSISTABLEBUNDLE_KEY_NOT_FOUND;
    return getVecInternal<int32_t>(newVec, buffer, bufferSizeBytes);
}
int32_t APersistableBundle_getLongVector(const APersistableBundle* pBundle, const char* key,
                                         int64_t* buffer, int32_t bufferSizeBytes) {
    std::vector<int64_t> newVec;
    pBundle->mPBundle.getLongVector(android::String16(key), &newVec);
    bool ret = pBundle->mPBundle.getLongVector(android::String16(key), &newVec);
    if (!ret) return APERSISTABLEBUNDLE_KEY_NOT_FOUND;
    return getVecInternal<int64_t>(newVec, buffer, bufferSizeBytes);
}
int32_t APersistableBundle_getDoubleVector(const APersistableBundle* pBundle, const char* key,
                                           double* buffer, int32_t bufferSizeBytes) {
    std::vector<double> newVec;
    pBundle->mPBundle.getDoubleVector(android::String16(key), &newVec);
    bool ret = pBundle->mPBundle.getDoubleVector(android::String16(key), &newVec);
    if (!ret) return APERSISTABLEBUNDLE_KEY_NOT_FOUND;
    return getVecInternal<double>(newVec, buffer, bufferSizeBytes);
}
int32_t APersistableBundle_getStringVector(const APersistableBundle* pBundle, const char* key,
@@ -208,7 +210,8 @@ int32_t APersistableBundle_getStringVector(const APersistableBundle* pBundle, co
                                           APersistableBundle_stringAllocator stringAllocator,
                                           void* context) {
    std::vector<android::String16> newVec;
    pBundle->mPBundle.getStringVector(android::String16(key), &newVec);
    bool ret = pBundle->mPBundle.getStringVector(android::String16(key), &newVec);
    if (!ret) return APERSISTABLEBUNDLE_KEY_NOT_FOUND;
    return getStringsInternal<std::vector<android::String16>>(newVec, vec, bufferSizeBytes,
                                                              stringAllocator, context);
}
Loading