Created
July 29, 2014 16:52
-
-
Save bmc08gt/b02f5bc1f3574d077859 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getBestResolution() { | |
String[] resolutions = null; | |
String resolution = "720p"; | |
String rawList = readSupportList(HDMI_SUPPORT_LIST); | |
if (rawList != null) { | |
resolutions = (rawList.substring(0, rawList.length()-1)).split("|"); | |
} | |
if (resolutions != null) { | |
for (int i = 0; i < resolutions.size(); i++) { | |
if (resolutions[i].contains("*")) { | |
// best mode | |
resolution = resolutions[i].substring(0, resolutions[i].length()-1); | |
} | |
} | |
if (resolution.contains("50hz")) { | |
return resolution + "50hz"; | |
} | |
return resolution; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment