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

Commit a9ca6c5b authored by Kensuke Miyagi's avatar Kensuke Miyagi Committed by Android (Google) Code Review
Browse files

Merge "Bug fix for max used num check for non-primary used frontend" into main

parents 550a6126 9348ada4
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1047,6 +1047,16 @@ public class TunerResourceManagerService extends SystemService implements IBinde
                    // in use frontends when no available frontend has been found.
                    int priority = getFrontendHighestClientPriority(fr.getOwnerClientId());
                    if (currentLowestPriority > priority) {
                        // we need to check the max used num if the target frontend type is not
                        // currently in primary use (and simply blocked due to exclusive group)
                        ClientProfile targetOwnerProfile = getClientProfile(fr.getOwnerClientId());
                        int primaryFeId = targetOwnerProfile.getPrimaryFrontend();
                        FrontendResource primaryFe = getFrontendResource(primaryFeId);
                        if (fr.getType() != primaryFe.getType()
                                && isFrontendMaxNumUseReached(fr.getType())) {
                            continue;
                        }
                        // update the target frontend
                        inUseLowestPriorityFrHandle = fr.getHandle();
                        currentLowestPriority = priority;
                        isRequestFromSameProcess = (requestClient.getProcessId()