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

Commit 167d4a3c authored by Ping Fan's avatar Ping Fan Committed by daren.liao
Browse files

Fix onStateChanged issue.

[Description]
inputState will override by wrong state
when call onStateChaned directly.

[Test Report]
Test pass

Bug: 196189979

Change-Id: I13377407c9ea9f4f0727edea5d57135c6569cba0
parent 2823967c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1265,12 +1265,14 @@ class TvInputHardwareManager implements TvInputHal.Callback {
                    if (inputId != null) {
                        if (connection.updateCableConnectionStatusLocked(cableConnectionStatus)) {
                            if (previousCableConnectionStatus != connection.getInputStateLocked()) {
                                mListener.onStateChanged(inputId, connection.getInputStateLocked());
                                mHandler.obtainMessage(ListenerHandler.STATE_CHANGED,
                                    connection.getInputStateLocked(), 0, inputId).sendToTarget();
                            }
                        } else {
                            if ((previousConfigsLength == 0)
                                    != (connection.getConfigsLengthLocked() == 0)) {
                                mListener.onStateChanged(inputId, connection.getInputStateLocked());
                                mHandler.obtainMessage(ListenerHandler.STATE_CHANGED,
                                    connection.getInputStateLocked(), 0, inputId).sendToTarget();
                            }
                        }
                    }