/packages/apps/Car/Settings/src/com/android/car/settings/wifi/ |
D | AccessPointListPreferenceController.java | 73 for (AccessPoint accessPoint : mAccessPoints) { in updateState() 74 preferenceGroup.addPreference(createAccessPointPreference(accessPoint)); in updateState() 98 AccessPoint accessPoint = ((AccessPointPreference) preference).getAccessPoint(); in onPreferenceClick() local 100 if (accessPoint.getSecurity() == AccessPoint.SECURITY_NONE in onPreferenceClick() 101 && !accessPoint.isSaved() && !accessPoint.isActive()) { in onPreferenceClick() 102 getCarWifiManager().connectToPublicWifi(accessPoint, mConnectionListener); in onPreferenceClick() 103 } else if (accessPoint.isActive()) { in onPreferenceClick() 104 getFragmentController().launchFragment(WifiDetailsFragment.getInstance(accessPoint)); in onPreferenceClick() 105 } else if (accessPoint.isSaved() && !WifiUtil.isAccessPointDisabledByWrongPassword( in onPreferenceClick() 106 accessPoint)) { in onPreferenceClick() [all …]
|
D | CarWifiManager.java | 135 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() 221 public void connectToPublicWifi(AccessPoint accessPoint, WifiManager.ActionListener listener) { in connectToPublicWifi() argument [all …]
|
D | WifiUtil.java | 98 public static String getKey(AccessPoint accessPoint) { in getKey() argument 99 return String.valueOf(accessPoint.hashCode()); in getKey() 209 public static void forget(Context context, AccessPoint accessPoint) { in forget() argument 211 if (!accessPoint.isSaved()) { in forget() 212 if (accessPoint.getNetworkInfo() != null in forget() 213 && accessPoint.getNetworkInfo().getState() != NetworkInfo.State.DISCONNECTED) { in forget() 216 AccessPoint.convertToQuotedString(accessPoint.getSsidStr())); in forget() 219 LOG.e("Failed to forget invalid network " + accessPoint.getConfig()); in forget() 223 wifiManager.forget(accessPoint.getConfig().networkId, in forget() 229 public static boolean isAccessPointDisabledByWrongPassword(AccessPoint accessPoint) { in isAccessPointDisabledByWrongPassword() argument [all …]
|
/packages/apps/Settings/src/com/android/settings/wifi/ |
D | WifiDialogActivity.java | 75 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 …]
|
D | WifiUtils.java | 134 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 …]
|
D | WifiSettings.java | 567 private void showDialog(AccessPoint accessPoint, int dialogMode) { in showDialog() argument 568 if (accessPoint != null) { in showDialog() 569 WifiConfiguration config = accessPoint.getConfig(); in showDialog() 570 if (WifiUtils.isNetworkLockedDown(getActivity(), config) && accessPoint.isActive()) { in showDialog() 583 mDlgAccessPoint = accessPoint; in showDialog() 700 private static boolean isDisabledByWrongPassword(AccessPoint accessPoint) { in isDisabledByWrongPassword() argument 701 WifiConfiguration config = accessPoint.getConfig(); in isDisabledByWrongPassword() 736 AccessPoint accessPoint = accessPoints.get(index); in updateAccessPointPreferences() local 738 if (accessPoint.isReachable()) { in updateAccessPointPreferences() 739 String key = accessPoint.getKey(); in updateAccessPointPreferences() [all …]
|
D | WifiConnectionPreferenceController.java | 108 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()
|
D | WifiDialog.java | 66 AccessPoint accessPoint, int mode) { in createModal() argument 67 return new WifiDialog(context, listener, accessPoint, mode, 0 /* style */, in createModal() 76 AccessPoint accessPoint, int mode, @StyleRes int style) { in createModal() argument 77 return new WifiDialog(context, listener, accessPoint, mode, style, in createModal() 81 /* package */ WifiDialog(Context context, WifiDialogListener listener, AccessPoint accessPoint, in WifiDialog() argument 86 mAccessPoint = accessPoint; in WifiDialog()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/slice/ |
D | WifiSlice.java | 130 final AccessPoint accessPoint = results.get(i); in getSlice() local 131 if (accessPoint.isActive()) { in getSlice() 133 listBuilder = getListBuilder(isWifiEnabled, accessPoint); in getSlice() 135 listBuilder.addRow(getAccessPointRow(accessPoint)); in getSlice() 147 private ListBuilder getListBuilder(boolean isWifiEnabled, AccessPoint accessPoint) { in getListBuilder() argument 151 final CharSequence summary = getSummary(accessPoint); in getListBuilder() 180 private ListBuilder.RowBuilder getAccessPointRow(AccessPoint accessPoint) { in getAccessPointRow() argument 181 final CharSequence title = getAccessPointName(accessPoint); in getAccessPointRow() 182 final IconCompat levelIcon = getAccessPointLevelIcon(accessPoint); in getAccessPointRow() 183 final boolean isCaptivePortal = accessPoint.isActive() && isCaptivePortal(); in getAccessPointRow() [all …]
|
D | ConnectToWifiHandler.java | 56 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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/ |
D | WifiDialogActivity.java | 72 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 …]
|
D | WifiUtils.java | 134 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 …]
|
D | WifiSettings.java | 562 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() 731 AccessPoint accessPoint = accessPoints.get(index); in updateAccessPointPreferences() local 733 if (accessPoint.isReachable()) { in updateAccessPointPreferences() 734 String key = accessPoint.getKey(); in updateAccessPointPreferences() [all …]
|
D | WifiConnectionPreferenceController.java | 108 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/apps/Settings/src/com/android/settings/wifi/slice/ |
D | WifiSlice.java | 168 private ListBuilder.RowBuilder getAccessPointRow(AccessPoint accessPoint) { in getAccessPointRow() argument 169 final boolean isCaptivePortal = accessPoint.isActive() && isCaptivePortal(); in getAccessPointRow() 170 final CharSequence title = accessPoint.getTitle(); in getAccessPointRow() 171 final CharSequence summary = getAccessPointSummary(accessPoint, isCaptivePortal); in getAccessPointRow() 172 final IconCompat levelIcon = getAccessPointLevelIcon(accessPoint); in getAccessPointRow() 177 .setPrimaryAction(getAccessPointAction(accessPoint, isCaptivePortal, levelIcon, in getAccessPointRow() 181 rowBuilder.addEndItem(getCaptivePortalEndAction(accessPoint, title)); in getAccessPointRow() 183 final IconCompat endIcon = getEndIcon(accessPoint); in getAccessPointRow() 191 private CharSequence getAccessPointSummary(AccessPoint accessPoint, boolean isCaptivePortal) { in getAccessPointSummary() argument 196 final CharSequence summary = accessPoint.getSettingsSummary(); in getAccessPointSummary() [all …]
|
D | ConnectToWifiHandler.java | 60 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/ |
D | WifiSettingsUiTest.java | 139 AccessPoint accessPoint = new AccessPoint(mContext, config); in setupConnectedAccessPoint() local 140 accessPoint.update(config, wifiInfo, networkInfo); in setupConnectedAccessPoint() 142 assertThat(accessPoint.getSsidStr()).isEqualTo(TEST_UNQUOTED_SSID); in setupConnectedAccessPoint() 143 assertThat(accessPoint.getBssid()).isEqualTo(TEST_BSSID); in setupConnectedAccessPoint() 144 assertThat(accessPoint.getNetworkInfo()).isNotNull(); in setupConnectedAccessPoint() 145 assertThat(accessPoint.isActive()).isTrue(); in setupConnectedAccessPoint() 146 assertThat(accessPoint.getSettingsSummary()).isEqualTo( in setupConnectedAccessPoint() 150 Lists.asList(accessPoint, new AccessPoint[] {})); in setupConnectedAccessPoint() 310 AccessPoint accessPoint = new AccessPoint(mContext, config); in wrongPasswordSavedNetwork() local 311 accessPoint.update(config, wifiInfo, null); in wrongPasswordSavedNetwork() [all …]
|
/packages/apps/Settings/src/com/android/settings/wifi/dpp/ |
D | WifiDppUtils.java | 197 WifiManager wifiManager, AccessPoint accessPoint) { in getConfiguratorQrCodeGeneratorIntentOrNull() argument 199 if (isSupportConfiguratorQrCodeGenerator(context, accessPoint)) { in getConfiguratorQrCodeGeneratorIntentOrNull() 205 final WifiConfiguration wifiConfiguration = accessPoint.getConfig(); in getConfiguratorQrCodeGeneratorIntentOrNull() 209 if (accessPoint.getSecurity() == AccessPoint.SECURITY_PSK_SAE_TRANSITION) { in getConfiguratorQrCodeGeneratorIntentOrNull() 226 WifiManager wifiManager, AccessPoint accessPoint) { in getConfiguratorQrCodeScannerIntentOrNull() argument 228 if (isSupportConfiguratorQrCodeScanner(context, accessPoint)) { in getConfiguratorQrCodeScannerIntentOrNull() 234 final WifiConfiguration wifiConfiguration = accessPoint.getConfig(); in getConfiguratorQrCodeScannerIntentOrNull() 352 AccessPoint accessPoint) { in isSupportConfiguratorQrCodeScanner() argument 353 if (accessPoint.isPasspoint()) { in isSupportConfiguratorQrCodeScanner() 356 return isSupportWifiDpp(context, accessPoint.getSecurity()); in isSupportConfiguratorQrCodeScanner() [all …]
|
D | WifiNetworkListFragment.java | 189 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()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/ |
D | NetworkFragment.java | 245 for (final AccessPoint accessPoint : accessPoints) { in updateWifiList() 246 accessPoint.setListener(this); in updateWifiList() 247 AccessPointPreference pref = (AccessPointPreference) accessPoint.getTag(); in updateWifiList() 249 pref = new AccessPointPreference(accessPoint, themedContext, mUserBadgeCache, in updateWifiList() 251 accessPoint.setTag(pref); in updateWifiList() 255 if (accessPoint.isActive()) { in updateWifiList() 257 WifiDetailsFragment.prepareArgs(pref.getExtras(), accessPoint); in updateWifiList() local 261 pref.setIntent(WifiConnectionActivity.createIntent(getContext(), accessPoint)); in updateWifiList() local 286 public void onAccessPointChanged(AccessPoint accessPoint) { in onAccessPointChanged() argument 287 ((AccessPointPreference) accessPoint.getTag()).refresh(); in onAccessPointChanged() [all …]
|
D | WifiDetailsFragment.java | 66 public static void prepareArgs(@NonNull Bundle args, AccessPoint accessPoint) { in prepareArgs() argument 68 accessPoint.saveWifiState(apBundle); in prepareArgs() 126 for (final AccessPoint accessPoint : accessPoints) { in onWifiListChanged() 127 if (TextUtils.equals(mAccessPoint.getSsidStr(), accessPoint.getSsidStr()) in onWifiListChanged() 128 && mAccessPoint.getSecurity() == accessPoint.getSecurity()) { in onWifiListChanged() 131 mAccessPoint = accessPoint; in onWifiListChanged() 189 public static void prepareArgs(@NonNull Bundle args, AccessPoint accessPoint) { in prepareArgs() argument 191 accessPoint.saveWifiState(apBundle); in prepareArgs()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/dpp/ |
D | WifiNetworkListFragment.java | 189 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()
|
D | WifiDppUtils.java | 189 WifiManager wifiManager, AccessPoint accessPoint) { in getConfiguratorQrCodeGeneratorIntentOrNull() argument 191 if (isSupportConfiguratorQrCodeGenerator(context, accessPoint)) { in getConfiguratorQrCodeGeneratorIntentOrNull() 197 final WifiConfiguration wifiConfiguration = accessPoint.getConfig(); in getConfiguratorQrCodeGeneratorIntentOrNull() 213 WifiManager wifiManager, AccessPoint accessPoint) { in getConfiguratorQrCodeScannerIntentOrNull() argument 215 if (isSupportConfiguratorQrCodeScanner(context, accessPoint)) { in getConfiguratorQrCodeScannerIntentOrNull() 221 final WifiConfiguration wifiConfiguration = accessPoint.getConfig(); in getConfiguratorQrCodeScannerIntentOrNull() 342 AccessPoint accessPoint) { in isSupportConfiguratorQrCodeScanner() argument 343 return isSupportWifiDpp(context, accessPoint.getSecurity()); in isSupportConfiguratorQrCodeScanner() 353 AccessPoint accessPoint) { in isSupportConfiguratorQrCodeGenerator() argument 354 return isSupportZxing(context, accessPoint.getSecurity()); in isSupportConfiguratorQrCodeGenerator()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/wifi/dpp/ |
D | WifiNetworkListFragmentTest.java | 148 final AccessPoint accessPoint = new AccessPoint(mContext, config); in setupConnectedAccessPoint() local 149 accessPoint.update(config, wifiInfo, networkInfo); in setupConnectedAccessPoint() 151 assertThat(accessPoint.getSsidStr()).isEqualTo(TEST_UNQUOTED_SSID); in setupConnectedAccessPoint() 152 assertThat(accessPoint.getBssid()).isEqualTo(TEST_BSSID); in setupConnectedAccessPoint() 153 assertThat(accessPoint.getNetworkInfo()).isNotNull(); in setupConnectedAccessPoint() 154 assertThat(accessPoint.isActive()).isTrue(); in setupConnectedAccessPoint() 155 assertThat(accessPoint.getSettingsSummary()).isEqualTo( in setupConnectedAccessPoint() 159 Lists.asList(accessPoint, new AccessPoint[]{})); in setupConnectedAccessPoint()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/setup/ |
D | ConnectState.java | 175 for (AccessPoint accessPoint: accessPointList) { in onWifiListChanged() 176 if (accessPoint != null && AccessPoint.convertToQuotedString( in onWifiListChanged() 177 accessPoint.getSsidStr()).equals(mWifiConfiguration.SSID)) { in onWifiListChanged() 178 inferConnectionStatus(accessPoint); in onWifiListChanged() 184 private void inferConnectionStatus(AccessPoint accessPoint) { in inferConnectionStatus() argument 185 WifiConfiguration configuration = accessPoint.getConfig(); in inferConnectionStatus() 208 accessPoint.clearConfig(); in inferConnectionStatus()
|