on xenial help sign in
try harder to filter out enterprise networks
468a177Lukáš Tinkl
qml/Wizard/Pages/30-wifi.qml+6−6
@@ -90,6 +90,7 @@ LocalComponents.Page {
90 readonly property bool secure: getExtendedProperty(extendedData, "xCanonicalWifiApIsSecure", false)
90 readonly property bool secure: getExtendedProperty(extendedData, "xCanonicalWifiApIsSecure", false)
91 readonly property bool adHoc: getExtendedProperty(extendedData, "xCanonicalWifiApIsAdhoc", false)
91 readonly property bool adHoc: getExtendedProperty(extendedData, "xCanonicalWifiApIsAdhoc", false)
92 readonly property bool isConnected: menuData && menuData.actionState
92 readonly property bool isConnected: menuData && menuData.actionState
93+ readonly property bool isEnterprise: getExtendedProperty(extendedData, "xCanonicalWifiApIsEnterprise", false)
93 readonly property int signalStrength: strengthAction.valid ? strengthAction.state : 0
94 readonly property int signalStrength: strengthAction.valid ? strengthAction.state : 0
94 property int menuIndex: -1
95 property int menuIndex: -1
95
96
@@ -97,6 +98,7 @@ LocalComponents.Page {
97 if (!unityMenuModel || menuIndex == -1) return;
98 if (!unityMenuModel || menuIndex == -1) return;
98 unityMenuModel.loadExtendedAttributes(menuIndex, {'x-canonical-wifi-ap-is-adhoc': 'bool',
99 unityMenuModel.loadExtendedAttributes(menuIndex, {'x-canonical-wifi-ap-is-adhoc': 'bool',
99 'x-canonical-wifi-ap-is-secure': 'bool',
100 'x-canonical-wifi-ap-is-secure': 'bool',
101+ 'x-canonical-wifi-ap-is-enterprise': 'bool',
100 'x-canonical-wifi-ap-strength-action': 'string'});
102 'x-canonical-wifi-ap-strength-action': 'string'});
101 }
103 }
102
104
@@ -186,6 +188,7 @@ LocalComponents.Page {
186
188
187 readonly property bool isAccessPoint: model.type === "unity.widgets.systemsettings.tablet.accesspoint"
189 readonly property bool isAccessPoint: model.type === "unity.widgets.systemsettings.tablet.accesspoint"
188 readonly property bool isConnected: item && item.menuData && item.menuData.actionState
190 readonly property bool isConnected: item && item.menuData && item.menuData.actionState
191+ readonly property bool isEnterprise: item && item.isEnterprise
189
192
190 height: !!sourceComponent ? (isConnected ? units.gu(9) : units.gu(7)) : 0
193 height: !!sourceComponent ? (isConnected ? units.gu(9) : units.gu(7)) : 0
191 anchors.left: parent.left
194 anchors.left: parent.left
@@ -193,13 +196,10 @@ LocalComponents.Page {
193
196
194 asynchronous: true
197 asynchronous: true
195 sourceComponent: {
198 sourceComponent: {
196− if (isAccessPoint) {
199+ if (isAccessPoint && !isEnterprise) {
197− menuModel.loadExtendedAttributes(index, {'x-canonical-wifi-ap-is-enterprise': 'bool'}); // filter out enterprise wifis, lpbug:#1475023
198− if (!getExtendedProperty(menuModel.ext, "xCanonicalWifiApIsEnterprise", false)) {
199− return accessPointComponent;
200+ return accessPointComponent;
200− }
201− return null;
202 }
201 }
202+ return null;
203 }
203 }
204
204
205 onLoaded: {
205 onLoaded: {