Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[androiddebugbridge] Broken hdmi status on Fire TV Cube #582

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,9 @@ public Optional<Boolean> isHDMIOn() throws InterruptedException, AndroidDebugBri

private Optional<Boolean> isHDMIOnWithLogcat() throws InterruptedException, AndroidDebugBridgeDeviceException,
AndroidDebugBridgeDeviceReadException, TimeoutException, ExecutionException {
String result = runAdbShell("logcat", "-d", "|", "grep", "hdmi", "|", "grep", "SWITCH_STATE=", "|", "tail",
"-1");
if (result.contains("SWITCH_STATE=")) {
return Optional.of(result.contains("SWITCH_STATE=1"));
String result = runAdbShell("logcat", "-d", "|", "grep", "'hdcp state'", "|", "tail", "-1");
if (result.contains("hdcp state:")) {
return Optional.of(result.contains("hdcp state: 1"));
} else if (result.isEmpty()) {
// IF THE DEVICE DO NOT SUPPORT THIS VALUE IN LOGCAT THE USER WILL NEVER KNOW THE CHANNEL WON'T WORK
// FIND A BETTER SOLUTION
Expand Down
Loading