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

Commit 392f2d3b authored by Jae Seo's avatar Jae Seo Committed by Android (Google) Code Review
Browse files

Merge "TIF: Use the right size for calls to toArray() instead of 0" into mnc-dev

parents a5103b9b 93ff14b7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -900,7 +900,7 @@ class TvInputHardwareManager implements TvInputHal.Callback {
                mAudioManager.createAudioPatch(
                        audioPatchArray,
                        new AudioPortConfig[] { sourceConfig },
                        sinkConfigs.toArray(new AudioPortConfig[0]));
                        sinkConfigs.toArray(new AudioPortConfig[sinkConfigs.size()]));
                mAudioPatch = audioPatchArray[0];
                if (sourceGainConfig != null) {
                    mAudioManager.setAudioPortGain(mAudioSource, sourceGainConfig);
+2 −3
Original line number Diff line number Diff line
@@ -1658,10 +1658,9 @@ public final class TvInputManagerService extends SystemService {
                    UserState userState = getUserStateLocked(resolvedUserId);
                    if (userState.sessionStateMap.size() == 1) {
                        return true;
                    }
                    else if (userState.sessionStateMap.size() == 2) {
                    } else if (userState.sessionStateMap.size() == 2) {
                        SessionState[] sessionStates = userState.sessionStateMap.values().toArray(
                                new SessionState[0]);
                                new SessionState[2]);
                        // Check if there is a wrapper input.
                        if (sessionStates[0].hardwareSessionToken != null
                                || sessionStates[1].hardwareSessionToken != null) {