Merge "HdmiVideoExtconUEventObserver: handle "DP=1" state" into main am: f761d414df
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2630590 Change-Id: I75243bf7f7eae3d50a346f5719ae6016c148119e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -6131,6 +6131,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
|
|
||||||
private class HdmiVideoExtconUEventObserver extends ExtconStateObserver<Boolean> {
|
private class HdmiVideoExtconUEventObserver extends ExtconStateObserver<Boolean> {
|
||||||
private static final String HDMI_EXIST = "HDMI=1";
|
private static final String HDMI_EXIST = "HDMI=1";
|
||||||
|
private static final String DP_EXIST = "DP=1";
|
||||||
private static final String NAME = "hdmi";
|
private static final String NAME = "hdmi";
|
||||||
|
|
||||||
private boolean init(ExtconInfo hdmi) {
|
private boolean init(ExtconInfo hdmi) {
|
||||||
@@ -6161,7 +6162,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
public Boolean parseState(ExtconInfo extconIfno, String state) {
|
public Boolean parseState(ExtconInfo extconIfno, String state) {
|
||||||
// extcon event state changes from kernel4.9
|
// extcon event state changes from kernel4.9
|
||||||
// new state will be like STATE=HDMI=1
|
// new state will be like STATE=HDMI=1
|
||||||
return state.contains(HDMI_EXIST);
|
// or like STATE=DP=1 for newer kernel
|
||||||
|
return state.contains(HDMI_EXIST) || state.contains(DP_EXIST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user