Merge "Set active port path to HdmiControlService" into lmp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
54662165b5
@@ -631,6 +631,7 @@ abstract class HdmiCecLocalDevice {
|
||||
synchronized (mLock) {
|
||||
mActiveRoutingPath = path;
|
||||
}
|
||||
mService.setActivePortId(pathToPortId(path));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -649,11 +650,9 @@ abstract class HdmiCecLocalDevice {
|
||||
* @param portId the new active port id
|
||||
*/
|
||||
void setActivePortId(int portId) {
|
||||
synchronized (mLock) {
|
||||
// We update active routing path instead, since we get the active port id from
|
||||
// the active routing path.
|
||||
mActiveRoutingPath = mService.portIdToPath(portId);
|
||||
}
|
||||
// We update active routing path instead, since we get the active port id from
|
||||
// the active routing path.
|
||||
setActivePath(mService.portIdToPath(portId));
|
||||
}
|
||||
|
||||
@ServiceThreadOnly
|
||||
|
||||
@@ -239,6 +239,9 @@ public final class HdmiControlService extends SystemService {
|
||||
@ServiceThreadOnly
|
||||
private boolean mWakeUpMessageReceived = false;
|
||||
|
||||
@ServiceThreadOnly
|
||||
private int mActivePortId = Constants.INVALID_PORT_ID;
|
||||
|
||||
public HdmiControlService(Context context) {
|
||||
super(context);
|
||||
mLocalDevices = HdmiUtils.asImmutableList(getContext().getResources().getIntArray(
|
||||
@@ -1718,4 +1721,10 @@ public final class HdmiControlService extends SystemService {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ServiceThreadOnly
|
||||
void setActivePortId(int portId) {
|
||||
assertRunOnServiceThread();
|
||||
mActivePortId = portId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user