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

Commit f761d414 authored by Riddle Hsu's avatar Riddle Hsu Committed by Gerrit Code Review
Browse files

Merge "HdmiVideoExtconUEventObserver: handle "DP=1" state" into main

parents 7bb03ce9 097f6504
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -6131,6 +6131,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {

    private class HdmiVideoExtconUEventObserver extends ExtconStateObserver<Boolean> {
        private static final String HDMI_EXIST = "HDMI=1";
        private static final String DP_EXIST = "DP=1";
        private static final String NAME = "hdmi";

        private boolean init(ExtconInfo hdmi) {
@@ -6161,7 +6162,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        public Boolean parseState(ExtconInfo extconIfno, String state) {
            // extcon event state changes from kernel4.9
            // 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);
        }
    }