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

Commit dade4dd2 authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

Merge "audio policy: fix capture policy for HOTWORD source" into qt-r1-dev am: 1c74123a

am: e5293b84

Change-Id: I92978a2cb70cb3ceffca2ee6bd35c8c0070369fa
parents 81801e53 e5293b84
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -458,16 +458,20 @@ void AudioPolicyService::updateUidStates_l()
            continue;
        }

        bool isAssistant = mUidPolicy->isAssistantUid(current->uid);
        if (appState == APP_STATE_TOP) {
            if (current->startTimeNs > topStartNs) {
                topActive = current;
                topStartNs = current->startTimeNs;
            }
            if (mUidPolicy->isAssistantUid(current->uid)) {
            if (isAssistant) {
                isAssistantOnTop = true;
            }
        }
        if (current->startTimeNs > latestStartNs) {
        // Assistant capturing for HOTWORD not considered for latest active to avoid
        // masking regular clients started before
        if (current->startTimeNs > latestStartNs &&
            !(current->attributes.source == AUDIO_SOURCE_HOTWORD && isAssistant)) {
            latestActive = current;
            latestStartNs = current->startTimeNs;
        }