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

Commit dd233f3d authored by Jinsuk Kim's avatar Jinsuk Kim
Browse files

Make sure to finish routing control action

After HdmiControlService performs routing control action,
make sure it is finished all the time.

Change-Id: I38e130ee5d8712a18aac7a46cad0950a23713469
(cherry picked from commit 7d05469196721aaa888447149d3b93c8689ff72e)
parent 1e6eb17a
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -114,8 +114,7 @@ final class RoutingControlAction extends FeatureAction {
                tv().updateActivePortId(tv().pathToPortId(mCurrentRoutingPath));
            }
        }
        invokeCallback(HdmiControlManager.RESULT_SUCCESS);
        finish();
        finishWithCallback(HdmiControlManager.RESULT_SUCCESS);
    }

    private int getTvPowerStatus() {
@@ -132,6 +131,11 @@ final class RoutingControlAction extends FeatureAction {
                mCurrentRoutingPath));
    }

    private void finishWithCallback(int result) {
        invokeCallback(result);
        finish();
    }

    @Override
    public void handleTimerEvent(int timeoutState) {
        if (mState != timeoutState || mState == STATE_NONE) {
@@ -152,6 +156,7 @@ final class RoutingControlAction extends FeatureAction {
                    });
                } else {
                    tv().updateActivePortId(tv().pathToPortId(mCurrentRoutingPath));
                    finishWithCallback(HdmiControlManager.RESULT_SUCCESS);
                }
                return;
            case STATE_WAIT_FOR_REPORT_POWER_STATUS:
@@ -159,8 +164,7 @@ final class RoutingControlAction extends FeatureAction {
                    tv().updateActivePortId(tv().pathToPortId(mCurrentRoutingPath));
                    sendSetStreamPath();
                }
                invokeCallback(HdmiControlManager.RESULT_SUCCESS);
                finish();
                finishWithCallback(HdmiControlManager.RESULT_SUCCESS);
                return;
        }
    }
@@ -177,6 +181,7 @@ final class RoutingControlAction extends FeatureAction {
        } else {
            tv().updateActivePortId(tv().pathToPortId(mCurrentRoutingPath));
            sendSetStreamPath();
            finishWithCallback(HdmiControlManager.RESULT_SUCCESS);
        }
    }