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

Commit 45be512f authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7389169 from 733fa434 to sc-release

Change-Id: Ib6c419398d6c864cf4361abe89d16b16530b794c
parents 8da00d1b 733fa434
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -8,5 +8,4 @@ service media.transcoding /apex/com.android.media/bin/mediatranscoding
    ioprio rt 4
    # Restrict to little cores only with system-background cpuset.
    writepid /dev/cpuset/system-background/tasks
    interface aidl media.transcoding
    disabled
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ status_t MediaRecorderClient::setAudioSource(int as)

    if ((as == AUDIO_SOURCE_FM_TUNER
            && !(captureAudioOutputAllowed(mIdentity) || captureTunerAudioInputAllowed(mIdentity)))
            || !recordingAllowed(mIdentity)) {
            || !recordingAllowed(mIdentity, (audio_source_t)as)) {
        return PERMISSION_DENIED;
    }
    Mutex::Autolock lock(mLock);
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ cc_binary {
        "android.hardware.media.omx@1.0",
        "libandroidicu",
        "libfmq",
        "libbase",
        "libbinder",
        "libhidlbase",
        "liblog",
+7 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#define LOG_TAG "mediaserver"
//#define LOG_NDEBUG 0

#include <android-base/properties.h>
#include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
@@ -42,6 +43,12 @@ int main(int argc __unused, char **argv __unused)
    ResourceManagerService::instantiate();
    registerExtensions();
    ::android::hardware::configureRpcThreadpool(16, false);

    if (!android::base::GetBoolProperty("ro.config.low_ram", false)) {
        // Start the media.transcoding service if the device is not low ram
        // device.
        android::base::SetProperty("ctl.start", "media.transcoding");
    }
    ProcessState::self()->startThreadPool();
    IPCThreadState::self()->joinThreadPool();
    ::android::hardware::joinRpcThreadpool();
+3 −3
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ static String16 resolveCallingPackage(PermissionController& permissionController
    return packages[0];
}

static int32_t getOpForSource(audio_source_t source) {
int32_t getOpForSource(audio_source_t source) {
  switch (source) {
    case AUDIO_SOURCE_HOTWORD:
      return AppOpsManager::OP_RECORD_AUDIO_HOTWORD;
@@ -133,8 +133,8 @@ static bool checkRecordingInternal(const Identity& identity, const String16& msg
    return true;
}

bool recordingAllowed(const Identity& identity) {
    return checkRecordingInternal(identity, String16(), /*start*/ false, AUDIO_SOURCE_DEFAULT);
bool recordingAllowed(const Identity& identity, audio_source_t source) {
    return checkRecordingInternal(identity, String16(), /*start*/ false, source);
}

bool startRecording(const Identity& identity, const String16& msg, audio_source_t source) {
Loading