Commit Graph

3370 Commits

Author SHA1 Message Date
Pranav Vashi
b52dea13a3 Settings: Prevent Wifi Tethering NPE
Log:

time: 1740837422345
msg: java.lang.NullPointerException: Attempt to read from field 'java.lang.String[] android.net.TetheringConfigurationParcel.tetherableWifiRegexs' on a null object reference in method 'java.lang.String[] android.net.TetheringManager.getTetherableWifiRegexs()'
stacktrace: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.Settings$WifiTetherSettingsActivity}: java.lang.NullPointerException: Attempt to read from field 'java.lang.String[] android.net.TetheringConfigurationParcel.tetherableWifiRegexs' on a null object reference in method 'java.lang.String[] android.net.TetheringManager.getTetherableWifiRegexs()'
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4129)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4316)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:222)
	at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:133)
	at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:103)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:80)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2719)
	at android.os.Handler.dispatchMessage(Handler.java:109)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8787)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:871)
Caused by: java.lang.NullPointerException: Attempt to read from field 'java.lang.String[] android.net.TetheringConfigurationParcel.tetherableWifiRegexs' on a null object reference in method 'java.lang.String[] android.net.TetheringManager.getTetherableWifiRegexs()'
	at android.net.TetheringManager.getTetherableWifiRegexs(TetheringManager.java:1637)
	at com.android.settings.wifi.tether.WifiTetherBasePreferenceController.<init>(WifiTetherBasePreferenceController.java:50)
	at com.android.settings.wifi.tether.WifiTetherSSIDPreferenceController.<init>(WifiTetherSSIDPreferenceController.java:59)
	at com.android.settings.wifi.tether.WifiTetherSettings.buildPreferenceControllers(WifiTetherSettings.java:295)
	at com.android.settings.wifi.tether.WifiTetherSettings.createPreferenceControllers(WifiTetherSettings.java:289)
	at com.android.settings.dashboard.DashboardFragment.onAttach(DashboardFragment.java:127)
	at com.android.settings.wifi.tether.WifiTetherSettings.onAttach(WifiTetherSettings.java:206)
	at androidx.fragment.app.Fragment.performAttach(Fragment.java:3075)
	at androidx.fragment.app.FragmentStateManager.attach(FragmentStateManager.java:510)
	at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:279)
	at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2211)
	at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2106)
	at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2049)
	at androidx.fragment.app.FragmentManager.executePendingTransactions(FragmentManager.java:779)
	at com.android.settings.SettingsActivity.switchToFragment(SettingsActivity.java:723)
	at com.android.settings.SettingsActivity.launchSettingFragment(SettingsActivity.java:515)
	at com.android.settings.SettingsActivity.createUiFromIntent(SettingsActivity.java:324)
	at com.android.settings.SettingsActivity.onCreate(SettingsActivity.java:283)
	at android.app.Activity.performCreate(Activity.java:9019)
	at android.app.Activity.performCreate(Activity.java:8997)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1532)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4111)
	... 13 more

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:32 +09:00
Gao Honghua
b893ae175e Fix memory leak on wifi
Google: 3425623
Change-Id: I5cd3c427280ebb2e8ed1b18d39d1b29c962b7658
Signed-off-by: Jia Jia <jia.jia@zte.com.cn>
2025-12-10 00:41:31 +09:00
minaripenguin
c51ca8b50f WifiTetherClientLimitPreference: Fix compilation 2025-12-10 00:41:31 +09:00
cjybyjk
6a3db1f45b Settings: SoftAp: add Hidden SSID preference
Signed-off-by: cjybyjk <cjybyjk@zjnu.edu.cn>
Change-Id: I8a222a9a9ae8f005953b738368168d551a502491
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:29 +09:00
cjybyjk
279130665f Settings: SoftAp: add support for setting shutdown timeout
Change-Id: I80aebe3ca8e13e3dc5c503d5a8527282e96e486a
Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
Co-authored-by: jhonboy121 <alfredmathew05@gmail.com>
Signed-off-by: cjybyjk <cjybyjk@zjnu.edu.cn>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:29 +09:00
cjybyjk
2a8e418b1e Settings: SoftAP: Add client manager
Change-Id: If9f0c1000ff4e7dd0b602a61299f1eb2c7608ac5
Signed-off-by: cjybyjk <cjybyjk@zjnu.edu.cn>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:29 +09:00
Ido Ben-Hur
89dce4d1e8 Settings: Long press to copy wifi password
Instead of marking and manually copying. Better UX
2025-12-10 00:41:29 +09:00
TogoFire
62c569e201 Revert "[Wi-Fi] Remove 'Do not validate' option in CA certificate spinner"
This is not a definitive fix, so revert it. WPA2-Enterprise (802.1X) or
WPA2-PSK.

[xawlw]:
- Sometimes we can't connect to some Enterprise WiFi networks because we
  don't know its domain so let's revert this 'Security' feature
- Read more about it here:
  https://www.xda-developers.com/android-11-break-enterprise-wifi-connection/

This reverts commit 33cde5dbee.
This reverts commit 94b8579607.

Signed-off-by: TogoFire <italomellopereira@gmail.com>
Signed-off-by: xawlw <abdulazizawlw@gmail.com>
Change-Id: I3cec92b74a419b5463c5e5db496863e66d034703
2025-12-10 00:41:28 +09:00
someone5678
aedee4b1db Settings: Forcefully enable Hotspot Speed setting
* Follows device's configurations, not country code

Change-Id: Ifbbd3a746345da2790cc6582ac0d3e0524bf4ba8
Signed-off-by: someone5678 <someone5678@users.noreply.github.com>
2025-12-10 00:41:28 +09:00
xyyx
b04df88ac3 WiFi: Remove country code checking.
Always allow 5gHz AP option

Edit: Only remove getCountryCode

Change-Id: I1205c7cec7715c1fac25eb29a311e347855f4d49
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:28 +09:00
Ido Ben-Hur
8d9c9c044a Settings: Skip auth for WiFi net share when unlocked in the last 60s
So it matches with the QS tile behavior

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:27 +09:00
Fabian Leutenegger
82754f2212 Settings: Fix potential NPE in WifiTetherSecurityPreferenceController
* if updateDisplay() gets called but mShouldHidePreference was set to true during init in the constructor, [1] will cause an npe due to securityNames and securityValues being null
 * adding that check as well to updateDisplay() will prevent this from happening

[1]:
for (int i = 0; i < securityNames.length; i++) {
mSecurityMap.put(Integer.parseInt(securityValues[i]), securityNames[i]);
}

Change-Id: Ib9dec499b7aebcfa424f2dd9b310317d4fb0eaf0
2025-12-10 00:41:26 +09:00
maxwen
3123a2f7ea Settings: Check wifi direct feature for showing preferences
Change-Id: I706bd7bb35e8da004a0dfc8c0949beea082514ea
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:26 +09:00
Oliver Scott
77909062da Wi-Fi timeout feature
Also includes squashed change:

Author: Tommy Webb <tommy@calyxinstitute.org>
Date:   Thu May 18 13:47:42 2023 -0400

    fixup! Wi-Fi timeout feature

    Only allow admin users to adjust the Wi-Fi timeout.

    Issue: calyxos#1633
    Change-Id: I9379bdd1fae136b2900692b4ea49c10106b3f285

Issue: calyxos#228
Change-Id: Ib35e45c38ca8c4f7146c8868b92ab98ca8d3c5b3
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:26 +09:00
jhonboy121
c20a46b63a Settings: Fix rest of the edit menu icon tint
Signed-off-by: jhonboy121 <alfredmathew05@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:26 +09:00
Dmitry Muhomor
b45269eb32 add per-connection Wi-Fi MAC address randomization option
fixup! add per-connection Wi-Fi MAC address randomization option
2025-12-10 00:41:26 +09:00
Treehugger Robot
65a0e43a43 Merge "Fix force close in WiFi API test code" into main am: 4f52f40cf9 am: 8871bd5bb6
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3534241

Change-Id: I016283e58365cffe98b9746edb0a1a8b98d16533
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-03-19 04:04:54 -07:00
Weng Su
040e2a867a Fixed accessibility issues in Wi-Fi password view in Settings
- Keep the Save button enabled at all times

- Show "*required" or "The password is invalid" to remind the user
  - Show "Password (optional)" to indicate that it can remain unchanged, when modifying Wi-Fi configuration

Bug: 386897596
Bug: 402694144
Flag: EXEMPT bugfix
Test: Manual testing
  atest SettingsUnitTests:AddNetworkFragmentTest
  atest WifiConfigControllerTest \
        WifiConfigController2Test \
        WifiDialogActivityTest
Change-Id: I09b7684674ff376139565fcc196cde8d8d20a864
2025-03-14 21:05:16 +08:00
Weng Su
351e6a94e0 Fixed accessibility issues in Wi-Fi password view for SUW
- Keep the Save button enabled at all times

- Show "*required" or "The password is invalid" to remind the user

Bug: 386897596
Flag: EXEMPT bugfix
Test: Manual testing
  atest WifiConfigControllerTest
Change-Id: I442d2f958efd85f3c92309d0bed7cd3aa9ec9876
2025-03-13 15:40:12 +08:00
hoffc
6bafe1b1c0 Fix force close in WiFi API test code
Enable WiFi network with empty net id, force close will occur.

Add number format exception catch when parsing net id.

Bug: 402260924

Change-Id: I540fdeddc7072e7a9414ac7f9d7aca348d06cd30
2025-03-11 12:28:10 +08:00
Weng Su
e82b0b2eea Update the required or optional styles of EditText in VPN settings
- Follow the Required text indicator in the Google Material 3 guidelines

Bug: 401956268
Flag: EXEMPT refactor
Test: Manual testing
Change-Id: Ifeb1b882b34151ebef18edc32e7f2a3c116921c2
2025-03-10 15:32:42 +08:00
Xin Li
10d930d1cf Merge 25Q1 (ab/BP1A.250305.020) to aosp-main-future
Bug: 385190204
Merged-In: I04f90b42907d07c6111a7b41a531f7717df33672
Change-Id: I58e92a6e45193de820f7432dcb365c41c14d3141
2025-03-06 12:22:41 -08:00
Weng Su
3cdc1a58a7 Fixed accessibility issues in VPN Settings
- Show "(required)" and errors in required fields to alert users

- Show "(optional)" below each optional field

Bug: 386025633
Flag: EXEMPT bugfix
Test: Manual testing
  atest WifiConfigController2Test
Change-Id: Iefbd68e6658af7b073db219b3e04e94805092759
2025-03-06 16:19:47 +08:00
Weng Su
9f943bad9d Validate SSID only on the Submit button
- Avoid to validate the SSID when scanning a QR code

Bug: 399791242
Flag: EXEMPT bugfix
Test: Manual testing
  atest SettingsUnitTests:AddNetworkFragmentTest
Change-Id: I91f010f8708490e397d762c96401569fc13601dd
2025-03-03 10:29:57 +08:00
Weng Su
288a5971d2 Fixed accessibility issues in Wi-Fi SSID view for SUW
- Keep the Save button enabled at all times

- Show "Enter the SSID" to remind the user

Bug: 386897596
Flag: EXEMPT bugfix
Test: Manual testing
  atest WifiDialogActivityTest \
        WifiConfigControllerTest
Change-Id: I577e78c34cbaa0640479adf09a916a526500fe68
2025-02-27 13:14:28 +08:00
Xin Li
5bfde9fbf5 Merge 25Q1 (ab/12770256) to aosp-main-future
Bug: 385190204
Merged-In: Iaee6792d1a27be8fa4b443f783a47a3715b6d3a1
Change-Id: I0ac29cecfec526a38cf4a120b8ef704ee7bc01b3
2025-02-26 11:59:26 -08:00
Owner Cleanup Bot
71eb73374c Merge "[owners] Remove arcwang@google.com from src/com/android/settings/wifi/OWNERS" into main am: 0997a62f67 am: 1ea637ca4b
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3503652

Change-Id: I76b8d66fbadbfea1eea66239af526feafb7ddaa3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-21 07:09:39 -08:00
Owner Cleanup Bot
a25b7045e9 [owners] Remove arcwang@google.com from src/com/android/settings/wifi/OWNERS
This suggested change is automatically generated based on group
memberships and affiliations.

Please approve this change and vote the highest CR. This will keep the OWNERs
file tidy.  We ask that you do not ignore this change and approve it
unless you know a reason the OWNER should remain.  It can always be
reverted if needed.

If this change is in error, vote the lowest CR value (i.e. reject the CL)
and the bot will abandon it.

See the owner's recent review activity for context:
https://android-review.googlesource.com/q/arcwang@google.com

To report an issue, file a bug in the Infra>Codereview component.

Change-Id: Ib6ec33ee0331fef36c7c048be5b588e275e8de4d
2025-02-20 07:50:43 -08:00
Owner Cleanup Bot
f1c3bfbac3 Merge "[owners] Remove bonianchen@google.com from src/com/android/settings/wifi/calling/OWNERS" into main am: 5c16cc9139 am: a51502b4fc
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3498934

Change-Id: Id4530616d92c5e20b9040e0d8d9dd1ee96b5f14c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-19 07:34:49 -08:00
Treehugger Robot
22e2cd594e Merge "Fixed accessibility issues in Wi-Fi SSID view" into main 2025-02-18 22:38:53 -08:00
Weng Su
d44941bd00 Fixed accessibility issues in Wi-Fi SSID view
- Keep the Save button enabled at all times

- Show "Enter the SSID" to remind the user

Bug: 386897596
Flag: EXEMPT bugfix
Test: Manual testing
  atest SettingsUnitTests:AddNetworkFragmentTest
  atest WifiConfigController2Test
Change-Id: I6cc6b197864511ee2c1c92affc67698b1761f11d
2025-02-19 13:22:26 +08:00
Owner Cleanup Bot
105d03ae8a [owners] Remove bonianchen@google.com from src/com/android/settings/wifi/calling/OWNERS
This suggested change is automatically generated based on group
memberships and affiliations.

Please approve this change and vote the highest CR. This will keep the OWNERs
file tidy.  We ask that you do not ignore this change and approve it
unless you know a reason the OWNER should remain.  It can always be
reverted if needed.

If this change is in error, vote the lowest CR value (i.e. reject the CL)
and the bot will abandon it.

See the owner's recent review activity for context:
https://android-review.googlesource.com/q/bonianchen@google.com

To report an issue, file a bug in the Infra>Codereview component.

Change-Id: Id0eb15daeefb919819a81e2d583ec3a10a38cb5b
2025-02-18 15:13:06 -08:00
Hakjun Choi
1a53ea7a05 Clean up aconfig flag carrier_enabled_satellite_flag
Bug: 393951373
FLAG: EXEMPT flag clean up
Test: atest NetworkSelectSettingsTest WifiCallingSettingsForSubTest SatelliteSettingsPreferenceControllerTest
Test: manual test in live network
Change-Id: I154e9be8a8c771fafb37af078be7b495f18b6100
2025-02-18 08:41:14 +00:00
Jacky Wang
a2e663dadd [Catalyst] Move PreferenceRestrictionMixin
NO_IFTTT=Catalyst only

Bug: 377600992
Flag: EXEMPT refactor
Test: atest
Change-Id: I3c26a5a56d8fd6e887e4ff4d38d8e8eb97844672
2025-02-11 20:18:43 +08:00
Jacky Wang
afbcf06654 [Catalyst] Move metrics class
NO_IFTTT=Catalyst only

Bug: 389886085
Flag: EXEMPT refactor
Test: atest
Change-Id: I8c24a4edf768aa2286adf66f16077e962080bb48
2025-02-11 20:18:30 +08:00
Sunny Shao
e9f0fdcd66 [Catalyst] Implement metrics/tags for Settings Catalyst
NO_IFTTT=Catalyst only

Bug: 394002861
Flag: com.android.settings.flags.catalyst
Test: devtool
Change-Id: Ia879883c3f29cd7ac286b431680d66ab52e87db0
2025-02-08 08:37:35 +00:00
Treehugger Robot
a477817f06 Merge "[Catalyst] Implement metrics/tags for "Wi-Fi"" into main 2025-02-07 01:55:53 -08:00
Sunny Shao
476dfa9131 [Catalyst] Implement metrics/tags for "Wi-Fi"
NO_IFTTT=Catalyst only

Bug: 394002861
Flag: com.android.settings.flags.catalyst
Test: devtool
Change-Id: I5c271aca902d74eadb7f8d462c967a31472d0c9f
2025-02-07 07:21:20 +00:00
Sunny Shao
dcc13e91f3 [Catalyst] Implement metrics/tags for "Wi-Fi Calling"
Bug: 394002861
Flag: com.android.settings.flags.catalyst
Test: devtool
Change-Id: I5cd0141639415eee0d230187beb056692cd7694e
2025-02-07 06:48:09 +00:00
SongFerng Wang
f9dc6c821f Merge "Add the missed call of super.onCreateView()" into main 2025-02-05 23:30:06 -08:00
Jacky Wang
ef3b232523 [Catalyst] Add more constants to SettingsContract
Bug: 388061003
Flag: EXEMPT refactor
Test: N/A
Change-Id: I906b345a56fa87909411ef64c73e2696240388ae
2025-02-05 19:02:41 +08:00
SongFerng Wang
01ba868b1e Add the missed call of super.onCreateView()
Bug: 393662651
Change-Id: I7f16fa45f3e32c6e1e78745248258b46836b7cbc
Test: build pass
Flag: EXEMPT bugfix
2025-02-04 22:22:23 -08:00
Jacky Wang
2e265d4a7a [Catalyst] Introduce SettingsContract file
The new file contains all contract constants for external usages (e.g.
slice, external Get/Set API). Also reuse existing constants in
SettingsSlicesContract.

NO_IFTTT=Catalyst only

Bug: 388061003
Flag: EXEMPT refactor
Test: atest
Change-Id: I449b7b6cf82e1e102f2c96a21835191605f09943
2025-02-04 18:24:46 +08:00
Jacky Wang
7a24cd61ac [Catalyst] Migrate WifiCallingScreen to parameterized screen
Bug: 388420844
Bug: 372732219
Flag: com.android.settings.flags.catalyst_wifi_calling
Test: devtool
Change-Id: I322001acc453eae0d69761f7a585c6f33087ef6a
2025-01-23 17:16:41 +08:00
Weng Su
6f2b7e4e4a Update Wi-Fi hotspot log
- Update "allowedChannels" log to avoid confusion by "WifiService: getUsableChannels" log

Bug: 390232242
Flag: EXEMPT log only update
Test: Manual testing
Change-Id: I030220d0fa6c28fe2dea06d1c9e64c6ae87b09a8
2025-01-22 22:11:04 +08:00
Fan Wu
297941ba2f [Catalyst] Remove PreferenceMetadata usages
Classes that implement PersistentPreference don't need to implement PreferenceMetadata

Bug: 388167302
Test: atest and manual
Flag: EXEMPT refactor
NO_IFTTT=refactor

Change-Id: Icf7d5eb4bbd426eb7e8dd562eda3c0a775457a3e
2025-01-16 17:46:28 -08:00
Jacky Wang
5a747c5a14 [Catalyst] Leverage PrimarySwitchPreferenceBinding
NO_IFTTT=Catalyst only

Bug: 335132588
Flag: com.android.settings.flags.catalyst
Test: manual
Change-Id: I3a566d98500bd09526c1f8d34fb7c47e9dff68b7
2025-01-16 17:13:20 +08:00
Fan Wu
4ca85b1e5c [Catalyst] Update DataChangeReason usages to PreferenceChangeReason
Bug: 388677104
Test: atest and manual
Flag: EXEMPT refactor
NO_IFTTT=refactor
Change-Id: I3c1aae3dc10a1c78e1b2b0ead8ffc83da933e174
2025-01-09 20:03:09 -08:00
Weng Su
cd9af665c3 [Catalyst] Add back Wi-Fi switch metrics
- The original Wi-Fi switch metrics is recorded by WifiEnabler.

- Since the design of Catalyst removes WifiEnabler, the metrics needs to be added to Catalyst preference.

NO_IFTTT=Catalyst only

Bug: 388547699
Flag: EXEMPT bugfix
Test: Manual testing
atest -c WifiSwitchPreferenceTest

Change-Id: I8819e8f660784b8b04c7958b65f4792b5d4d0919
2025-01-09 03:37:06 +08:00
Hani Kazmi
57e649ae4e Merge "Revert "Revert "[AAPM] Add advanced protection dialog according ..."" into main 2025-01-03 09:25:46 -08:00