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

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

Snap for 11722130 from f9f919a6 to 24Q3-release

Change-Id: I178a9805229fca1ef5e88d444f60051d03d16ab0
parents fd880a0b f9f919a6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -114,6 +114,9 @@ typedef struct APerformanceHintManager APerformanceHintManager;
 * API, the client is expected to call {@link APerformanceHint_reportActualWorkDuration} each
 * cycle to report the actual time taken to complete to the system.
 *
 * Note, methods of {@link APerformanceHintSession_*} are not thread safe so callers must
 * ensure thread safety.
 *
 * All timings should be from `std::chrono::steady_clock` or `clock_gettime(CLOCK_MONOTONIC, ...)`
 */
typedef struct APerformanceHintSession APerformanceHintSession;
+1 −3
Original line number Diff line number Diff line
@@ -20,13 +20,11 @@ use binder::{
    StatusCode,
};

#[allow(dead_code)]
macro_rules! stub_unstructured_parcelable {
    ($name:ident) => {
        /// Unimplemented stub parcelable.
        #[allow(dead_code)]
        #[derive(Debug, Default)]
        pub struct $name(Option<()>);
        pub struct $name(());

        impl UnstructuredParcelable for $name {
            fn write_to_parcel(&self, _parcel: &mut BorrowedParcel) -> Result<(), StatusCode> {
+6 −4
Original line number Diff line number Diff line
@@ -463,14 +463,16 @@ bool SensorService::SensorEventConnection::noteOpIfRequired(const sensors_event_
        if ((event.type == SENSOR_TYPE_STEP_COUNTER || event.type == SENSOR_TYPE_STEP_DETECTOR) &&
            mTargetSdk > 0 && mTargetSdk <= __ANDROID_API_P__) {
            success = true;
        } else if (mUid == AID_SYSTEM) {
            // Allow access if it is requested from system.
            success = true;
        } else {
            int32_t sensorHandle = event.sensor;
            String16 noteMsg("Sensor event (");
            noteMsg.append(String16(mService->getSensorStringType(sensorHandle)));
            noteMsg.append(String16(")"));
            int32_t appOpMode = mService->sAppOpsManager.noteOp(iter->second, mUid,
                                                                mOpPackageName, mAttributionTag,
                                                                noteMsg);
            int32_t appOpMode = mService->sAppOpsManager.noteOp(iter->second, mUid, mOpPackageName,
                                                                mAttributionTag, noteMsg);
            success = (appOpMode == AppOpsManager::MODE_ALLOWED);
        }
    }
+8 −3
Original line number Diff line number Diff line
@@ -2302,11 +2302,16 @@ bool SensorService::canAccessSensor(const Sensor& sensor, const char* operation,
        // requirement to hold the AR permission to access Step Counter and Step Detector events
        // was introduced.
        canAccess = true;
    } else if (IPCThreadState::self()->getCallingUid() == AID_SYSTEM) {
        // Allow access if it is requested from system.
        canAccess = true;
    } else if (hasPermissionForSensor(sensor)) {
        // Ensure that the AppOp is allowed, or that there is no necessary app op for the sensor
        // Ensure that the AppOp is allowed, or that there is no necessary app op
        // for the sensor
        if (opCode >= 0) {
            const int32_t appOpMode = sAppOpsManager.checkOp(opCode,
                    IPCThreadState::self()->getCallingUid(), opPackageName);
            const int32_t appOpMode =
                    sAppOpsManager.checkOp(opCode, IPCThreadState::self()->getCallingUid(),
                                           opPackageName);
            canAccess = (appOpMode == AppOpsManager::MODE_ALLOWED);
        } else {
            canAccess = true;