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)
This commit is contained in:
@@ -114,9 +114,8 @@ final class RoutingControlAction extends FeatureAction {
|
||||
tv().updateActivePortId(tv().pathToPortId(mCurrentRoutingPath));
|
||||
}
|
||||
}
|
||||
invokeCallback(HdmiControlManager.RESULT_SUCCESS);
|
||||
finish();
|
||||
}
|
||||
finishWithCallback(HdmiControlManager.RESULT_SUCCESS);
|
||||
}
|
||||
|
||||
private int getTvPowerStatus() {
|
||||
return tv().getPowerStatus();
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user