Skip to content

Commit

Permalink
[Ops] Fix displaying wireless debugging options
Browse files Browse the repository at this point in the history
Prompt user to select an action (pair, connect, cancel) when it's unable to
enable Wireless Debugging.

Signed-off-by: Muntashir Al-Islam <[email protected]>
  • Loading branch information
MuntashirAkon committed Apr 13, 2024
1 parent 120a95d commit fc445ff
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,12 @@ public static int init(@NonNull Context context, boolean force) {
throw new Exception("Wifi not enabled.");
}
if (AdbUtils.enableWirelessDebugging(context)) {
// Wireless debugging enabled, try auto-connect
return STATUS_AUTO_CONNECT_WIRELESS_DEBUGGING;
} else {
// Wireless debugging is turned off or there's no permission
return STATUS_WIRELESS_DEBUGGING_CHOOSER_REQUIRED;
}
Log.w(TAG, "Could not ensure wireless debugging, falling back...");
} // else fallback to ADB over TCP
case MODE_ADB_OVER_TCP:
sIsRoot = sIsSystem = false;
Expand Down

0 comments on commit fc445ff

Please sign in to comment.