Home
last modified time | relevance | path

Searched refs:accessPoint (Results 1 – 25 of 56) sorted by relevance

123

/packages/apps/Car/Settings/src/com/android/car/settings/wifi/
DAccessPointListPreferenceController.java86 for (AccessPoint accessPoint : mAccessPoints) { in updateState()
87 preferenceGroup.addPreference(createAccessPointPreference(accessPoint)); in updateState()
111 AccessPoint accessPoint = ((AccessPointPreference) preference).getAccessPoint(); in onPreferenceClick() local
113 if (WifiUtil.isOpenNetwork(accessPoint.getSecurity()) in onPreferenceClick()
114 && !accessPoint.isSaved() && !accessPoint.isActive()) { in onPreferenceClick()
115 getCarWifiManager().connectToPublicWifi(accessPoint, mConnectionListener); in onPreferenceClick()
116 } else if (accessPoint.isActive()) { in onPreferenceClick()
117 getFragmentController().launchFragment(WifiDetailsFragment.getInstance(accessPoint)); in onPreferenceClick()
118 } else if (accessPoint.isSaved() && !WifiUtil.isAccessPointDisabledByWrongPassword( in onPreferenceClick()
119 accessPoint)) { in onPreferenceClick()
[all …]
DCarWifiManager.java135 for (AccessPoint accessPoint : mWifiTracker.getAccessPoints()) { in getAccessPoints()
137 if (shouldIncludeAp(accessPoint, saved)) { in getAccessPoints()
138 accessPoints.add(accessPoint); in getAccessPoints()
145 private boolean shouldIncludeAp(AccessPoint accessPoint, boolean saved) { in shouldIncludeAp() argument
146 return saved ? accessPoint.isReachable() && accessPoint.isSaved() in shouldIncludeAp()
147 : accessPoint.isReachable(); in shouldIncludeAp()
152 for (AccessPoint accessPoint : getAllAccessPoints()) { in getConnectedAccessPoint()
153 if (accessPoint.getDetailedState() == NetworkInfo.DetailedState.CONNECTED) { in getConnectedAccessPoint()
154 return accessPoint; in getConnectedAccessPoint()
213 public void connectToPublicWifi(AccessPoint accessPoint, WifiManager.ActionListener listener) { in connectToPublicWifi() argument
[all …]
DWifiUtil.java102 public static String getKey(AccessPoint accessPoint) { in getKey() argument
103 return String.valueOf(accessPoint.hashCode()); in getKey()
239 public static void forget(Context context, AccessPoint accessPoint) { in forget() argument
241 if (!accessPoint.isSaved()) { in forget()
242 if (accessPoint.getNetworkInfo() != null in forget()
243 && accessPoint.getNetworkInfo().getState() != NetworkInfo.State.DISCONNECTED) { in forget()
246 AccessPoint.convertToQuotedString(accessPoint.getSsidStr())); in forget()
249 LOG.e("Failed to forget invalid network " + accessPoint.getConfig()); in forget()
253 wifiManager.forget(accessPoint.getConfig().networkId, new WifiManager.ActionListener() { in forget()
270 public static boolean isAccessPointDisabledByWrongPassword(AccessPoint accessPoint) { in isAccessPointDisabledByWrongPassword() argument
[all …]
/packages/apps/Settings/src/com/android/settings/wifi/
DWifiDialogActivity.java75 AccessPoint accessPoint = null; in onCreate() local
77 accessPoint = new AccessPoint(this, accessPointState); in onCreate()
81 mDialog = WifiDialog.createModal(this, this, accessPoint, in onCreate()
85 this, this, accessPoint, WifiConfigUiBase.MODE_CONNECT); in onCreate()
109 final AccessPoint accessPoint = dialog.getController().getAccessPoint(); in onForget() local
110 if (accessPoint != null) { in onForget()
111 if (!accessPoint.isSaved()) { in onForget()
112 if (accessPoint.getNetworkInfo() != null && in onForget()
113 accessPoint.getNetworkInfo().getState() != NetworkInfo.State.DISCONNECTED) { in onForget()
116 AccessPoint.convertToQuotedString(accessPoint.getSsidStr())); in onForget()
[all …]
DWifiUtils.java150 public static WifiConfiguration getWifiConfig(AccessPoint accessPoint, ScanResult scanResult, in getWifiConfig() argument
152 if (accessPoint == null && scanResult == null) { in getWifiConfig()
160 if (accessPoint == null) { in getWifiConfig()
164 if (!accessPoint.isSaved()) { in getWifiConfig()
166 accessPoint.getSsidStr()); in getWifiConfig()
168 config.networkId = accessPoint.getConfig().networkId; in getWifiConfig()
169 config.hiddenSSID = accessPoint.getConfig().hiddenSSID; in getWifiConfig()
171 security = accessPoint.getSecurity(); in getWifiConfig()
273 public static int getConnectingType(AccessPoint accessPoint) { in getConnectingType() argument
274 final WifiConfiguration config = accessPoint.getConfig(); in getConnectingType()
[all …]
DWifiSettings.java611 private void showDialog(AccessPoint accessPoint, int dialogMode) { in showDialog() argument
612 if (accessPoint != null) { in showDialog()
613 WifiConfiguration config = accessPoint.getConfig(); in showDialog()
614 if (WifiUtils.isNetworkLockedDown(getActivity(), config) && accessPoint.isActive()) { in showDialog()
627 mDlgAccessPoint = accessPoint; in showDialog()
746 private static boolean isDisabledByWrongPassword(AccessPoint accessPoint) { in isDisabledByWrongPassword() argument
747 WifiConfiguration config = accessPoint.getConfig(); in isDisabledByWrongPassword()
783 AccessPoint accessPoint = accessPoints.get(index); in updateAccessPointPreferences() local
785 if (accessPoint.isReachable()) { in updateAccessPointPreferences()
786 String key = accessPoint.getKey(); in updateAccessPointPreferences()
[all …]
DWifiDialog.java71 AccessPoint accessPoint, int mode) { in createModal() argument
72 return new WifiDialog(context, listener, accessPoint, mode, 0 /* style */, in createModal()
81 AccessPoint accessPoint, int mode, @StyleRes int style) { in createModal() argument
82 return new WifiDialog(context, listener, accessPoint, mode, style, in createModal()
86 /* package */ WifiDialog(Context context, WifiDialogListener listener, AccessPoint accessPoint, in WifiDialog() argument
91 mAccessPoint = accessPoint; in WifiDialog()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/
DWifiDialogActivity.java72 AccessPoint accessPoint = null; in onCreate() local
74 accessPoint = new AccessPoint(this, accessPointState); in onCreate()
78 this, this, accessPoint, WifiConfigUiBase.MODE_CONNECT); in onCreate()
101 final AccessPoint accessPoint = dialog.getController().getAccessPoint(); in onForget() local
102 if (accessPoint != null) { in onForget()
103 if (!accessPoint.isSaved()) { in onForget()
104 if (accessPoint.getNetworkInfo() != null && in onForget()
105 accessPoint.getNetworkInfo().getState() != NetworkInfo.State.DISCONNECTED) { in onForget()
108 AccessPoint.convertToQuotedString(accessPoint.getSsidStr())); in onForget()
111 Log.e(TAG, "Failed to forget invalid network " + accessPoint.getConfig()); in onForget()
[all …]
DWifiUtils.java134 public static WifiConfiguration getWifiConfig(AccessPoint accessPoint, ScanResult scanResult, in getWifiConfig() argument
136 if (accessPoint == null && scanResult == null) { in getWifiConfig()
144 if (accessPoint == null) { in getWifiConfig()
148 if (!accessPoint.isSaved()) { in getWifiConfig()
150 accessPoint.getSsidStr()); in getWifiConfig()
152 config.networkId = accessPoint.getConfig().networkId; in getWifiConfig()
153 config.hiddenSSID = accessPoint.getConfig().hiddenSSID; in getWifiConfig()
155 security = accessPoint.getSecurity(); in getWifiConfig()
266 public static int getConnectingType(AccessPoint accessPoint) { in getConnectingType() argument
267 final WifiConfiguration config = accessPoint.getConfig(); in getConnectingType()
[all …]
DWifiSettings.java562 private void showDialog(AccessPoint accessPoint, int dialogMode) { in showDialog() argument
563 if (accessPoint != null) { in showDialog()
564 WifiConfiguration config = accessPoint.getConfig(); in showDialog()
565 if (WifiUtils.isNetworkLockedDown(getActivity(), config) && accessPoint.isActive()) { in showDialog()
578 mDlgAccessPoint = accessPoint; in showDialog()
695 private static boolean isDisabledByWrongPassword(AccessPoint accessPoint) { in isDisabledByWrongPassword() argument
696 WifiConfiguration config = accessPoint.getConfig(); in isDisabledByWrongPassword()
732 AccessPoint accessPoint = accessPoints.get(index); in updateAccessPointPreferences() local
734 if (accessPoint.isReachable()) { in updateAccessPointPreferences()
735 String key = accessPoint.getKey(); in updateAccessPointPreferences()
[all …]
DWifiConnectionPreferenceController.java108 for (AccessPoint accessPoint : mWifiTracker.getAccessPoints()) { in getCurrentAccessPoint()
109 if (accessPoint.isActive()) { in getCurrentAccessPoint()
110 return accessPoint; in getCurrentAccessPoint()
116 private void updatePreference(AccessPoint accessPoint) { in updatePreference() argument
121 if (accessPoint == null) { in updatePreference()
125 mPreference = new AccessPointPreference(accessPoint, mPrefContext, mBadgeCache, in updatePreference()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/slice/
DWifiSlice.java129 final AccessPoint accessPoint = results.get(i); in getSlice() local
130 if (accessPoint.isActive()) { in getSlice()
132 listBuilder = getListBuilder(isWifiEnabled, accessPoint); in getSlice()
134 listBuilder.addRow(getAccessPointRow(accessPoint)); in getSlice()
146 private ListBuilder getListBuilder(boolean isWifiEnabled, AccessPoint accessPoint) { in getListBuilder() argument
150 final CharSequence summary = getSummary(accessPoint); in getListBuilder()
179 private ListBuilder.RowBuilder getAccessPointRow(AccessPoint accessPoint) { in getAccessPointRow() argument
180 final CharSequence title = getAccessPointName(accessPoint); in getAccessPointRow()
181 final IconCompat levelIcon = getAccessPointLevelIcon(accessPoint); in getAccessPointRow()
182 final boolean isCaptivePortal = accessPoint.isActive() && isCaptivePortal(); in getAccessPointRow()
[all …]
DConnectToWifiHandler.java56 void connect(AccessPoint accessPoint) { in connect() argument
58 switch (WifiUtils.getConnectingType(accessPoint)) { in connect()
60 accessPoint.startOsuProvisioning(connectListener); in connect()
64 accessPoint.generateOpenNetworkConfig(); in connect()
68 wifiManager.connect(accessPoint.getConfig(), connectListener); in connect()
/packages/apps/Settings/src/com/android/settings/wifi/slice/
DWifiSlice.java142 protected ListBuilder.RowBuilder getHeaderRow(boolean isWifiEnabled, AccessPoint accessPoint) { in getHeaderRow() argument
155 private ListBuilder getListBuilder(boolean isWifiEnabled, AccessPoint accessPoint) { in getListBuilder() argument
162 .addRow(getHeaderRow(isWifiEnabled, accessPoint)) in getListBuilder()
167 private ListBuilder.RowBuilder getAccessPointRow(AccessPoint accessPoint) { in getAccessPointRow() argument
168 final boolean isCaptivePortal = accessPoint.isActive() && isCaptivePortal(); in getAccessPointRow()
169 final CharSequence title = accessPoint.getTitle(); in getAccessPointRow()
170 final CharSequence summary = getAccessPointSummary(accessPoint, isCaptivePortal); in getAccessPointRow()
171 final IconCompat levelIcon = getAccessPointLevelIcon(accessPoint); in getAccessPointRow()
176 .setPrimaryAction(getAccessPointAction(accessPoint, isCaptivePortal, levelIcon, in getAccessPointRow()
180 rowBuilder.addEndItem(getCaptivePortalEndAction(accessPoint, title)); in getAccessPointRow()
[all …]
DContextualWifiSlice.java87 protected ListBuilder.RowBuilder getHeaderRow(boolean isWifiEnabled, AccessPoint accessPoint) { in getHeaderRow() argument
88 final ListBuilder.RowBuilder builder = super.getHeaderRow(isWifiEnabled, accessPoint); in getHeaderRow()
89 builder.setTitleItem(getHeaderIcon(isWifiEnabled, accessPoint), ListBuilder.ICON_IMAGE); in getHeaderRow()
91 builder.setSubtitle(getSubtitle(accessPoint)); in getHeaderRow()
96 private IconCompat getHeaderIcon(boolean isWifiEnabled, AccessPoint accessPoint) { in getHeaderIcon() argument
106 if (isNetworkConnected(accessPoint)) { in getHeaderIcon()
116 private boolean isNetworkConnected(AccessPoint accessPoint) { in isNetworkConnected() argument
117 if (accessPoint == null) { in isNetworkConnected()
121 final NetworkInfo networkInfo = accessPoint.getNetworkInfo(); in isNetworkConnected()
129 private CharSequence getSubtitle(AccessPoint accessPoint) { in getSubtitle() argument
[all …]
DConnectToWifiHandler.java60 void connect(Context context, AccessPoint accessPoint) { in connect() argument
62 WifiScanWorker.saveClickedWifi(accessPoint); in connect()
65 switch (WifiUtils.getConnectingType(accessPoint)) { in connect()
67 accessPoint.startOsuProvisioning(connectListener); in connect()
71 accessPoint.generateOpenNetworkConfig(); in connect()
75 wifiManager.connect(accessPoint.getConfig(), connectListener); in connect()
/packages/apps/Settings/tests/unit/src/com/android/settings/wifi/
DWifiSettingsUiTest.java137 AccessPoint accessPoint = new AccessPoint(mContext, config); in setupConnectedAccessPoint() local
138 accessPoint.update(config, wifiInfo, networkInfo); in setupConnectedAccessPoint()
140 assertThat(accessPoint.getSsidStr()).isEqualTo(TEST_UNQUOTED_SSID); in setupConnectedAccessPoint()
141 assertThat(accessPoint.getBssid()).isEqualTo(TEST_BSSID); in setupConnectedAccessPoint()
142 assertThat(accessPoint.getNetworkInfo()).isNotNull(); in setupConnectedAccessPoint()
143 assertThat(accessPoint.isActive()).isTrue(); in setupConnectedAccessPoint()
144 assertThat(accessPoint.getSettingsSummary()).isEqualTo( in setupConnectedAccessPoint()
148 Lists.asList(accessPoint, new AccessPoint[] {})); in setupConnectedAccessPoint()
309 AccessPoint accessPoint = new AccessPoint(mContext, config); in wrongPasswordSavedNetwork() local
310 accessPoint.update(config, wifiInfo, null); in wrongPasswordSavedNetwork()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/
DNetworkFragment.java318 for (final AccessPoint accessPoint : accessPoints) { in updateWifiList()
319 accessPoint.setListener(this); in updateWifiList()
320 AccessPointPreference pref = (AccessPointPreference) accessPoint.getTag(); in updateWifiList()
322 pref = new AccessPointPreference(accessPoint, themedContext, mUserBadgeCache, in updateWifiList()
324 accessPoint.setTag(pref); in updateWifiList()
328 if (accessPoint.isActive() && !isCaptivePortal(accessPoint)) { in updateWifiList()
332 WifiDetailsFragment.prepareArgs(pref.getExtras(), accessPoint); in updateWifiList() local
336 pref.setIntent(WifiConnectionActivity.createIntent(getContext(), accessPoint)); in updateWifiList() local
355 private boolean isCaptivePortal(AccessPoint accessPoint) { in isCaptivePortal() argument
356 if (accessPoint.getDetailedState() != NetworkInfo.DetailedState.CONNECTED) { in isCaptivePortal()
[all …]
DWifiUtils.java71 public static WifiConfiguration getWifiConfig(AccessPoint accessPoint, ScanResult scanResult, in getWifiConfig() argument
73 if (accessPoint == null && scanResult == null) { in getWifiConfig()
81 if (accessPoint == null) { in getWifiConfig()
85 if (!accessPoint.isSaved()) { in getWifiConfig()
87 accessPoint.getSsidStr()); in getWifiConfig()
89 config.networkId = accessPoint.getConfig().networkId; in getWifiConfig()
90 config.hiddenSSID = accessPoint.getConfig().hiddenSSID; in getWifiConfig()
92 security = accessPoint.getSecurity(); in getWifiConfig()
DWifiDetailsFragment.java78 public static void prepareArgs(@NonNull Bundle args, AccessPoint accessPoint) { in prepareArgs() argument
80 accessPoint.saveWifiState(apBundle); in prepareArgs()
133 for (final AccessPoint accessPoint : accessPoints) { in onWifiListChanged()
134 if (TextUtils.equals(mAccessPoint.getSsidStr(), accessPoint.getSsidStr()) in onWifiListChanged()
135 && mAccessPoint.getSecurity() == accessPoint.getSecurity()) { in onWifiListChanged()
138 mAccessPoint = accessPoint; in onWifiListChanged()
273 public static void prepareArgs(@NonNull Bundle args, AccessPoint accessPoint) { in prepareArgs() argument
275 accessPoint.saveWifiState(apBundle); in prepareArgs()
/packages/apps/Settings/src/com/android/settings/wifi/dpp/
DWifiNetworkListFragment.java186 public void onAccessPointChanged(final AccessPoint accessPoint) { in onAccessPointChanged() argument
191 final Object tag = accessPoint.getTag(); in onAccessPointChanged()
200 public void onLevelChanged(AccessPoint accessPoint) { in onLevelChanged() argument
201 ((AccessPointPreference) accessPoint.getTag()).onLevelChanged(); in onLevelChanged()
251 private boolean isValidForDppConfiguration(AccessPoint accessPoint) { in isValidForDppConfiguration() argument
252 final int security = accessPoint.getSecurity(); in isValidForDppConfiguration()
282 .filter(accessPoint -> isValidForDppConfiguration(accessPoint)) in updateAccessPointPreferences()
283 .map(accessPoint -> getScannedAccessPointIfAvailable(accessPoint)) in updateAccessPointPreferences()
335 private AccessPointPreference createAccessPointPreference(AccessPoint accessPoint) { in createAccessPointPreference() argument
336 return new AccessPointPreference(accessPoint, getPrefContext(), mUserBadgeCache, in createAccessPointPreference()
DWifiDppUtils.java212 WifiManager wifiManager, AccessPoint accessPoint) { in getConfiguratorQrCodeGeneratorIntentOrNull() argument
214 if (isSupportConfiguratorQrCodeGenerator(context, accessPoint)) { in getConfiguratorQrCodeGeneratorIntentOrNull()
220 final WifiConfiguration wifiConfiguration = accessPoint.getConfig(); in getConfiguratorQrCodeGeneratorIntentOrNull()
224 if (accessPoint.isPskSaeTransitionMode()) { in getConfiguratorQrCodeGeneratorIntentOrNull()
268 WifiManager wifiManager, AccessPoint accessPoint) { in getConfiguratorQrCodeScannerIntentOrNull() argument
270 if (isSupportConfiguratorQrCodeScanner(context, accessPoint)) { in getConfiguratorQrCodeScannerIntentOrNull()
276 final WifiConfiguration wifiConfiguration = accessPoint.getConfig(); in getConfiguratorQrCodeScannerIntentOrNull()
448 AccessPoint accessPoint) { in isSupportConfiguratorQrCodeScanner() argument
449 if (accessPoint.isPasspoint()) { in isSupportConfiguratorQrCodeScanner()
452 return isSupportWifiDpp(context, accessPoint.getSecurity()); in isSupportConfiguratorQrCodeScanner()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/dpp/
DWifiNetworkListFragment.java189 public void onAccessPointChanged(final AccessPoint accessPoint) { in onAccessPointChanged() argument
194 final Object tag = accessPoint.getTag(); in onAccessPointChanged()
203 public void onLevelChanged(AccessPoint accessPoint) { in onLevelChanged() argument
204 ((AccessPointPreference) accessPoint.getTag()).onLevelChanged(); in onLevelChanged()
254 private boolean isValidForDppConfiguration(AccessPoint accessPoint) { in isValidForDppConfiguration() argument
255 final int security = accessPoint.getSecurity(); in isValidForDppConfiguration()
289 .filter(accessPoint -> isValidForDppConfiguration(accessPoint)) in updateAccessPointPreferences()
290 .map(accessPoint -> getScannedAccessPointIfAvailable(accessPoint)) in updateAccessPointPreferences()
342 private AccessPointPreference createAccessPointPreference(AccessPoint accessPoint) { in createAccessPointPreference() argument
343 return new AccessPointPreference(accessPoint, getPrefContext(), mUserBadgeCache, in createAccessPointPreference()
DWifiDppUtils.java200 WifiManager wifiManager, AccessPoint accessPoint) { in getConfiguratorQrCodeGeneratorIntentOrNull() argument
202 if (isSupportConfiguratorQrCodeGenerator(context, accessPoint)) { in getConfiguratorQrCodeGeneratorIntentOrNull()
208 final WifiConfiguration wifiConfiguration = accessPoint.getConfig(); in getConfiguratorQrCodeGeneratorIntentOrNull()
224 WifiManager wifiManager, AccessPoint accessPoint) { in getConfiguratorQrCodeScannerIntentOrNull() argument
226 if (isSupportConfiguratorQrCodeScanner(context, accessPoint)) { in getConfiguratorQrCodeScannerIntentOrNull()
232 final WifiConfiguration wifiConfiguration = accessPoint.getConfig(); in getConfiguratorQrCodeScannerIntentOrNull()
376 AccessPoint accessPoint) { in isSupportConfiguratorQrCodeScanner() argument
377 return isSupportWifiDpp(context, accessPoint.getSecurity()); in isSupportConfiguratorQrCodeScanner()
387 AccessPoint accessPoint) { in isSupportConfiguratorQrCodeGenerator() argument
388 return isSupportZxing(context, accessPoint.getSecurity()); in isSupportConfiguratorQrCodeGenerator()
/packages/apps/Settings/tests/unit/src/com/android/settings/wifi/dpp/
DWifiNetworkListFragmentTest.java143 final AccessPoint accessPoint = new AccessPoint(mContext, config); in setupConnectedAccessPoint() local
144 accessPoint.update(config, wifiInfo, networkInfo); in setupConnectedAccessPoint()
146 assertThat(accessPoint.getSsidStr()).isEqualTo(TEST_UNQUOTED_SSID); in setupConnectedAccessPoint()
147 assertThat(accessPoint.getBssid()).isEqualTo(TEST_BSSID); in setupConnectedAccessPoint()
148 assertThat(accessPoint.getNetworkInfo()).isNotNull(); in setupConnectedAccessPoint()
149 assertThat(accessPoint.isActive()).isTrue(); in setupConnectedAccessPoint()
150 assertThat(accessPoint.getSettingsSummary()).isEqualTo( in setupConnectedAccessPoint()
154 Lists.asList(accessPoint, new AccessPoint[]{})); in setupConnectedAccessPoint()

123