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

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

Snap for 11926388 from ef4726a4 to 24Q3-release

Change-Id: I827ef8283f41b72788f1e8fe1bb2cb0f0f01c565
parents 6f5f4e4c ef4726a4
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.media.permission;

import com.android.media.permission.PermissionEnum;
import com.android.media.permission.UidPackageState;

/**
@@ -33,4 +34,13 @@ interface INativePermissionController {
     * If the list is empty, the package no longer exists.
     */
    void updatePackagesForUid(in UidPackageState newPackageState);
    /**
     * Populate or replace the list of uids which holds a particular permission.
     * Runtime permissions will need additional checks, and should not use the cache as-is.
     * Not virtual device aware.
     * Is is possible for updates to the permission state to be delayed during high traffic.
     * @param perm - Enum representing the permission for which holders are being supplied
     * @param uids - Uids (not app-ids) which hold the permission. Should be sorted
     */
    void populatePermissionState(in PermissionEnum perm, in int[] uids);
}
+31 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.media.permission;

/**
 * Enumerates permissions which are tracked/pushed by NativePermissionController
 * {@hide}
 */
enum PermissionEnum {
    MODIFY_AUDIO_ROUTING = 0,
    MODIFY_PHONE_STATE = 1,
    CALL_AUDIO_INTERCEPTION = 2,
    // This is a runtime + WIU permission, which means data delivery should be protected by AppOps
    // We query the controller only for early fails/hard errors
    RECORD_AUDIO = 3,
    ENUM_SIZE = 4, // Not for actual usage
}
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ cc_binary {
    ],

    header_libs: [
        "audiopolicyservicelocal_headers",
        "libaudiohal_headers",
        "libmedia_headers",
        "libmediametrics_headers",
+1 −0
Original line number Diff line number Diff line
@@ -168,6 +168,7 @@ int main(int argc __unused, char **argv)
        ALOGW_IF(AudioSystem::setLocalAudioFlinger(af) != OK,
                "%s: AudioSystem already has an AudioFlinger instance!", __func__);
        const auto aps = sp<AudioPolicyService>::make();
        af->initAudioPolicyLocal(aps);
        ALOGD("%s: AudioPolicy created", __func__);
        ALOGW_IF(AudioSystem::setLocalAudioPolicyService(aps) != OK,
                 "%s: AudioSystem already has an AudioPolicyService instance!", __func__);
+7 −2
Original line number Diff line number Diff line
@@ -68,10 +68,15 @@ C2AidlNode::C2AidlNode(const std::shared_ptr<Codec2Client::Component> &comp)
}

::ndk::ScopedAStatus C2AidlNode::submitBuffer(
        int32_t buffer, const ::aidl::android::hardware::HardwareBuffer& hBuffer,
        int32_t buffer,
        const std::optional<::aidl::android::hardware::HardwareBuffer>& hBuffer,
        int32_t flags, int64_t timestamp, const ::ndk::ScopedFileDescriptor& fence) {
    sp<GraphicBuffer> gBuf;
    AHardwareBuffer *ahwb = hBuffer.get();
    AHardwareBuffer *ahwb = nullptr;
    if (hBuffer.has_value()) {
        ahwb = hBuffer.value().get();
    }

    if (ahwb) {
        gBuf = AHardwareBuffer_to_GraphicBuffer(ahwb);
    }
Loading