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

Commit bc2b9d30 authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Android (Google) Code Review
Browse files

Merge "Make sure to finish routing control action" into lmp-dev

parents eba1c0bb dd233f3d
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);
        }
    }