Merge "[WPA3] Hide connect button for cloned networks not in range"

This commit is contained in:
TreeHugger Robot
2019-11-18 20:27:56 +00:00
committed by Android (Google) Code Review

View File

@@ -781,6 +781,11 @@ public class WifiDetailPreferenceController extends AbstractPreferenceController
}
private boolean canConnectNetwork() {
// Do not allow a cloned network to connect when out of range
// Otherwise it may create inconsistencies in the UI
if (mAccessPoint.isCloned() && mIsOutOfRange) {
return false;
}
// Display connect button for disconnected AP even not in the range.
return !mAccessPoint.isActive();
}