diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/HalDeviceManager.java | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/service/java/com/android/server/wifi/HalDeviceManager.java b/service/java/com/android/server/wifi/HalDeviceManager.java index d85c4893b..e47a33efb 100644 --- a/service/java/com/android/server/wifi/HalDeviceManager.java +++ b/service/java/com/android/server/wifi/HalDeviceManager.java @@ -589,6 +589,11 @@ public class HalDeviceManager { private class WifiIfaceInfo { public String name; public IWifiIface iface; + + @Override + public String toString() { + return "{name=" + name + ", iface=" + iface + "}"; + } } private class WifiChipInfo { @@ -608,7 +613,7 @@ public class HalDeviceManager { for (int type: IFACE_TYPES_BY_PRIORITY) { sb.append(", ifaces[" + type + "].length=").append(ifaces[type].length); } - sb.append(")"); + sb.append("}"); return sb.toString(); } } @@ -1579,7 +1584,8 @@ public class HalDeviceManager { IWifiChip.ChipMode chipMode, int[] chipIfaceCombo, int ifaceType) { if (VDBG) { Log.d(TAG, "canIfaceComboSupportRequest: chipInfo=" + chipInfo + ", chipMode=" - + chipMode + ", chipIfaceCombo=" + chipIfaceCombo + ", ifaceType=" + ifaceType); + + chipMode + ", chipIfaceCombo=" + Arrays.toString(chipIfaceCombo) + + ", ifaceType=" + ifaceType); } // short-circuit: does the chipIfaceCombo even support the requested type? @@ -1635,9 +1641,9 @@ public class HalDeviceManager { return null; } - // delete the most recently created interfaces or LOW priority interfaces - interfacesToBeRemovedFirst = selectInterfacesToDelete(tooManyInterfaces, - chipInfo.ifaces[type]); + // delete the most recently created interfaces + interfacesToBeRemovedFirst.addAll(selectInterfacesToDelete(tooManyInterfaces, + chipInfo.ifaces[type])); } } @@ -1715,7 +1721,7 @@ public class HalDeviceManager { * Type-specific rules (but note that the general rules are appied first): * 4. Request for AP or STA will destroy any other interface * 5. Request for P2P will destroy NAN-only (but will destroy a second STA per #3) - * 6. Request for NAN will not destroy any interface (but will destroy a second STA per #3) + * 6. Request for NAN will destroy P2P-only (but will destroy a second STA per #3) * * Note: the 'numNecessaryInterfaces' is used to specify how many interfaces would be needed to * be deleted. This is used to determine whether there are that many low priority interfaces @@ -1738,16 +1744,16 @@ public class HalDeviceManager { return true; } - // rule 6 - if (requestedIfaceType == IfaceType.NAN) { - return false; - } - // rule 5 if (requestedIfaceType == IfaceType.P2P) { return existingIfaceType == IfaceType.NAN; } + // rule 6 + if (requestedIfaceType == IfaceType.NAN) { + return existingIfaceType == IfaceType.P2P; + } + // rule 4, the requestIfaceType is either AP or STA return true; } |