Commit Graph

177 Commits

Author SHA1 Message Date
Oli Thompson
974bb9ba9f Merge "Add show emergency button call to biometric prompt" into main 2023-08-18 17:54:34 +00:00
Oli Thompson
111b073ca9 Add show emergency button call to biometric prompt
useDefaultSubtitle has to be set explicitly from promptInfo rather than being assumed true

remove subtext for managed profile challenge screen to create space for emergency call button

Test: manually tested
Bug: 286391641
Bug: 286422726
Change-Id: I848e00dcd0013124e59ef711c3615e6773c3d210
2023-08-15 16:52:36 +00:00
chelseahao
3ecc87b345 Created a new activity in settings App.
This activity displays a WifiDppQrCodeGeneratorFragment after unlocking. This will be used by the new "Share Wi-Fi" button in quick settings InternetDialog.

Bug: 294487249

Test: atest com.android.settings.wifi.dpp.WifiDppConfiguratorAuthActivityTest
Change-Id: I58b61f597db67082f23a1acb4fae5a4556238584
2023-08-10 05:35:47 +00:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Wenhui Yang
ed505c25fa Merge "Add bp subtitle for WiFi sharing" into udc-qpr-dev am: c2b7914778 am: b41875eff3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24211335

Change-Id: I413b6692409ca97f48f6c68ad99b894d12e4734a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-07 20:33:36 +00:00
Wenhui Yang
c2b7914778 Merge "Add bp subtitle for WiFi sharing" into udc-qpr-dev 2023-08-07 19:55:44 +00:00
Matt Casey
2710d5a85f Merge "Remove dependency on ChooserActivity resources" into udc-qpr-dev am: 39715d3023 am: 3362abc551
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24265323

Change-Id: I95a7256b5488b7847ebd348c455162fa08a2c3cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-07 19:47:09 +00:00
Matt Casey
39715d3023 Merge "Remove dependency on ChooserActivity resources" into udc-qpr-dev 2023-08-07 17:56:15 +00:00
Etan Cohen
726bda1d98 Merge "Fix WiFi (ZX or DPP) QR code parsing to ignore leading spaces" into udc-qpr-dev am: dca9c6b88f am: a20cb88cf6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24285925

Change-Id: Ib3aa9df47d9fa91a2fa56c6d771b9da0c9d512f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-05 01:15:16 +00:00
Etan Cohen
0fb1a3b3a7 Fix WiFi (ZX or DPP) QR code parsing to ignore leading spaces
Increase robustness of QR code parsing: while leading spaces aren't
expected (or allowed) they are observed in the wild and can be safely
ignored.

Bug: 292331368
Test: validated that QR code with scan is now parsed correctly
Test: atest WifiQrCodeTest
Change-Id: Ifff79870bea2ec9924f7b2e8100c2c01fd350846
2023-08-03 14:25:38 +00:00
Wenhui Yang
cf8ba456bb Add bp subtitle for WiFi sharing
Move the screen lock message selection logic to Utils and update the
related strings as suzannechen@ suggested.

Test: manual (see bug)
Test: atest UtilsTest
Fixes: 291307701
Change-Id: I346c25426395eea1320edc07ce2d962efeb8daa6
2023-08-01 21:11:33 +00:00
Charlotte Lu
98608f5ca6 Password on wifi sharing screen is NOT monospace.
Difficult to distinguish I from l in the password display on the wifi sharing screen.

Fix: 266182587
Test: Visual Test

Change-Id: Iea266fa17edcdf08f161429a44e6c24051084fdd
2023-08-01 08:52:16 +00:00
Matt Casey
9a7ed87222 Remove dependency on ChooserActivity resources
Fork the needed resources.

Bug: 292222314
Test: mp sysuig, view wifi QR code screen
Change-Id: I69fabb8c293e8e8819d93a61df39549b9667c0fa
2023-07-31 14:17:40 +00:00
TreeHugger Robot
d82f2eae5c Merge "Revert "Disallow screenshot on Wi-Fi QR code settings"" into tm-qpr-dev am: 23c17977fb am: b3599ae3b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22317902

Change-Id: I3940fb8e1333d051d12ddb5001717d473bf89d39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-30 17:18:01 +00:00
Weng Su
cc53f44d49 Revert "Disallow screenshot on Wi-Fi QR code settings"
This reverts commit 950837b20f.

Reason for revert: The security issue is downgraded to NSI, remove the screenshot protection to rollback the original design.

Change-Id: Iecaf7e4e19dc3452a7d2aeaf32bf38619e760c76
2023-03-28 19:30:11 +00:00
Chaohui Wang
f55f9932d9 Remove lifecycle-extensions from Settings
Bug: 259352947
Test: Make Settings
Change-Id: Ide9749494ae89ca401120eb5ffee9c0d87043c48
2022-11-16 18:56:05 +08:00
Weng Su
950837b20f Disallow screenshot on Wi-Fi QR code settings
- Add FLAG_SECURE to WifiDppConfiguratorActivity to avoid screenshot security issue

Bug: 249980936
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppConfiguratorActivityTest

Change-Id: I5e62c2584122f79127ab505e8491565e163de296
2022-10-31 08:59:40 +00:00
Weng Su
a8ccc3456c Restrict guest user to configure WiFi by QR code
- Don't show WifiDppConfiguratorActivity if the user is a guest.

Bug: 224772890
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppConfiguratorActivityTest

Change-Id: I160761edfe2893475676421ba2b59205da8d0224
2022-06-14 01:20:54 +08:00
Weng Su
71b9cc0e32 Check Wi-Fi permissions for QrCode scanner
- Launched package require ACCESS_WIFI_STATE and ACCESS_FINE_LOCATION permissions to get results

Bug: 187176859
Test: manual test
make RunSettingsRoboTests \
    ROBOTEST_FILTER=WifiDppQrCodeScannerFragmentTest

Change-Id: Ie80c4e5b3a5863749de518e4736873390478816e
2022-04-26 07:10:57 +00:00
cnchen
27536c8333 Properly apply the SUW dynamic color theme
Activity should apply a base theme before apply dynamic color theme

Bug: 225800660
Test: Manual testing
Change-Id: Iad6e03b1750e1a4bd29878c9eb88e8c4a08a867f
2022-04-01 14:57:58 +08:00
Weng Su
2088b4985d WiFi restricted connection when scan QR code
- Use WifiEntry#canConnect() to determine if the network can be
  connected.

- Add WiFi network but don't connect if WiFi restricted connection.

- See the result screenshot in b/203168943#comment16

Bug: 203168938
Bug: 203168943
Test: manual test
make RunSettingsRoboTests \
  ROBOTEST_FILTER=WifiDppQrCodeScannerFragmentTest

Change-Id: I06d1e832176e540ddd1adce8da46ef8659534ab7
2022-04-01 06:04:34 +08:00
Zoey Chen
bf99e37329 [LeAudio] Remove the QrCamera and decorateView in Settings
Bug: 214340362
Test: Manual test
Change-Id: Ibc29f0e90af28e14a11164fa8940920745545c7e
2022-03-24 21:19:18 +08:00
Betty Chang
0ef919db7e Merge "Move the QrCodeGenerator from Settings to SettingsLib for Wifi and BT" into tm-dev 2022-03-24 08:21:16 +00:00
changbetty
dacce1fae3 Move the QrCodeGenerator from Settings to SettingsLib for Wifi and BT
Bug: 214338905
Test: Manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=QrCameraTest
Change-Id: I1ca3e9e0b2cdc9fd3f32da8c5329c0e887ee3427
2022-03-23 13:38:46 +00:00
Treehugger Robot
64e4a57fa3 Merge "Crash when scanning WiFi QR code" am: 6c31283455 am: 7950a0acaf am: 7ada247bac
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2020675

Change-Id: I02f6d022aff0740281e53d208809ca9a3b10860c
2022-03-16 17:03:37 +00:00
David Magno
351af8ebd1 Crash when scanning WiFi QR code
Fix two crashes when scanning a WiFi QR code.
The crashes are due to the asynchronous nature of the scan/decode
process, where the result is delivered after the activity has been
destroyed.

Bug: 223640678
Test: manual, Settings -> Network & internet -> Internet
      Press the 'Scan QR code' icon
      Start to scan a WiFi QR code
      Just before then scan/decode completes, press Back
Change-Id: Ic19ca08590ed76ca9be46eabe3e0b17419fb0b44
2022-03-16 08:53:37 +00:00
cnchen
3aff4b1513 Add dynamic color support
(before)https://hsv.googleplex.com/6220707954425856
(after)https://hsv.googleplex.com/6270261408038912

Bug: 209889556
Test: see the hsv above
Change-Id: Ifee0392c189dbe7210ba2561355e2c275e7cb7fe
2022-03-04 11:58:26 +08:00
Weng Su
fe5690598c Check WiFi restrictions for WiFi QR code intent
- If WiFi configuration is not allowed, the WiFi QR code intent is
ignored.

- Add SafetyNet Logging to b/202017876.

Bug: 202017876
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppEnrolleeActivityTest

Change-Id: I147d2f4f4fabe2e24d5d3eaaad701b81059e8eee
2021-12-29 09:33:42 +00:00
Weng Su
26a0fdb4f6 Check WiFi restrictions for WiFi QR code intent
- If WiFi configuration is not allowed, the WiFi QR code intent is
ignored.

- Add SafetyNet Logging to b/202017876.

Bug: 202017876
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppEnrolleeActivityTest

Change-Id: I147d2f4f4fabe2e24d5d3eaaad701b81059e8eee
2021-12-24 09:44:38 +08:00
Linus Tufvesson
553ca3e58d Make WifiDppEnrolleeActivity launches explicit
Bug: 180518134
Test: make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiDppUtilsTest\|WifiDialogActivityTest
Test: Manually verified b/180518134 attack is no longer possible

Change-Id: I8c4e1e17117582c78671d0e4658bd87715a9a046
(cherry picked from commit 59c0a7bc63)
2021-12-20 15:21:25 +00:00
Joshua Duong
c960e8973a Fix QR code scanner layout in "Pair devices over Wi-Fi" page.
The toolbar needs to be disabled to remove the empty space at the top
of the page. Also added the landscape layout xml.

Bug: 193602141
Test: atest SettingsUnitTests and manual

Change-Id: I30368835979b360a8f09e16f70adf57064784517
(cherry picked from commit fd009229e5)
2021-09-17 15:36:32 +00:00
Joshua Duong
fd009229e5 Fix QR code scanner layout in "Pair devices over Wi-Fi" page.
The toolbar needs to be disabled to remove the empty space at the top
of the page. Also added the landscape layout xml.

Bug: 193602141
Test: atest SettingsUnitTests and manual

Change-Id: I30368835979b360a8f09e16f70adf57064784517
2021-08-12 18:44:15 +00:00
Quang Luong
cbb0b73aed Remove NetworkScoreManager from WifiTrackerLib classes
NetworkScoreManager is being removed from WifiTrackerLib classes since
it was used for network scoring, which is being removed from the
Wifi picker UI. Remove the NetworkScoreManager argument from the
WifiTrackerLib constructors.

Bug: 194521441
Test: build
Change-Id: I60a1dcdc926f6494f1ef54b197e49992668f16ec
2021-07-26 11:10:27 -07:00
Linus Tufvesson
59c0a7bc63 Make WifiDppEnrolleeActivity launches explicit
Bug: 180518134
Test: make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiDppUtilsTest\|WifiDialogActivityTest
Test: Manually verified b/180518134 attack is no longer possible

Change-Id: I8c4e1e17117582c78671d0e4658bd87715a9a046
2021-07-06 12:09:10 +00:00
Quang Luong
91dcd42319 Add WifiTrackerLib as separate dependency from SettingsLib
WifiTrackerLib should be removed from SettingsLib to avoid tying it to
SettingsLib's min_sdk_version. Modules that need WifiTrackerLib should
now explicitly add it as a static_lib.

Bug: 187099809
Test: build, make RunSettingsRoboTests
ROBOTEST_FILTER=WifiEntryPreferenceTest

Change-Id: I09b7cad0b3b17ba1a24c1200b7ea3255ca4e227f
2021-06-10 14:33:05 -07:00
Pasty Chang
fbf5506b86 Migrate summary text in wifi QR scan page to DescriptionMixin
The description in the setup flow would follow the new style to align to the left.

Bug: 188593594
Test: atest & manual
Change-Id: Idfc00f51710d725d5c653396902446f29861cb88
2021-05-24 03:24:26 +00:00
Weng Su
d451d16712 Show security screen for ACTION_PROCESS_WIFI_EASY_CONNECT_URI intent
Bug: 183181987
Test: manual test
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiDppConfiguratorActivityTest

Change-Id: I26e97142cc1c30909bd14eb85d466442274446a9
2021-04-23 20:34:07 +08:00
Bonian Chen
234b698fb2 Revert "[Settings] Support getSystemService(Class<T>)"
This reverts commit d5ccde31a8.

Reason for revert: failure on test cases

Change-Id: I0a179a6ebb5ef1dec566ce6e8facd5f3b82d7c8a
2021-03-30 00:51:15 +00:00
Bonian Chen
d5ccde31a8 [Settings] Support getSystemService(Class<T>)
Add getSystemService(Class<T>) to align the capability with framework
part.

This is a back port from aosp/1639943, aosp/1645152 and aosp/1648047

Bug: 179640862
Test: local
Change-Id: I035db55a71f94000ca35f8d71f03c19208423c73
2021-03-24 00:59:46 +08:00
Abel Tesfaye
cb03fb955f Correct Wifi Share UI margins and capitalization
Test: locally with crosshatch

Bug: 176926579
Change-Id: Ida59174f93ae696e4f2a91c353cf9b1649f1faac
2021-01-15 20:15:45 +00:00
Weng Su
b9c865b704 Add Hotspot WPA3 Settings
- Add WPA3 SAE security types
  - "WPA3-Personal"
  - "WPA2/WPA3-Personal"

- Verify valid WPA3 password

- Enable QR code scanner for Hotspot WPA3

- Avoid null point exception when settings keyword searching

- Screenshot
  https://screenshot.googleplex.com/B6u54wh8w35Xnyf
  https://screenshot.googleplex.com/8hWHHUTb6UaS9vB

Bug: 167968488
Test: manual test
- atest WifiTetherSecurityPreferenceControllerTest
- atest WifiUtilsTest

Change-Id: I2992040498f8add107a4cce70a92c1c6ee6ab805
2021-01-10 08:38:39 +00:00
Steven Liu
c1477650c9 Introduce a WifiTrackerLibProvider.
This make the WifiTrackerLib can be customized.

Bug: 149540986
Test: manual test wifi picker, and atest com.android.settings
Change-Id: I1418ae39c895ce2ff87f18005a226a4835f9e083
2021-01-06 08:44:34 -08:00
bsears
598ab32345 Revert "Add Hotspot WPA3 Settings"
This reverts commit e0062af10c.

Reason for revert: Bug 176569060 - Droidfood blocking crash in Settings app.

Change-Id: Id50c96e8ce704b19e5ffb9b9a9fcbb0db2d81aee
2020-12-31 21:16:51 +00:00
Weng Su
e0062af10c Add Hotspot WPA3 Settings
- Add WPA3 SAE security types
  - "WPA3-Personal"
  - "WPA2/WPA3-Personal"

- Verify valid WPA3 password

- Enable QR code scanner for Hotspot WPA3

- Screenshot
  https://screenshot.googleplex.com/B6u54wh8w35Xnyf
  https://screenshot.googleplex.com/8hWHHUTb6UaS9vB

Bug: 167968488
Test:
- Manual Test
- atest WifiTetherSecurityPreferenceControllerTest
- atest WifiUtilsTest

Change-Id: I155ed0bfd187d27ba864f9fb1b78d08c437740f3
2020-12-29 08:04:10 +00:00
Alex Salo
65c319a7d5 Merge "Implemented nearby button that displays wifi sharing intent and long press button that opens wifi qr share fragment" 2020-11-16 21:45:34 +00:00
Abel Tesfaye
8881f91349 Implemented nearby button that displays wifi sharing intent and long press button that opens wifi qr share fragment
Test: manual - took a video
Change-Id: I931aabaada09c87b4a7936bcde4fcff8bc237dd0
2020-11-13 22:20:31 +00:00
pihuei
55fb2b745d Use system day/night to switch theme instead of from intent extra.
Use value-night to give theme instead of directly from intent extra when Setup day/nNight mode enabled and in Setup flow

Before:
<vision settings>
https://hsv.googleplex.com/4837266235064320
<wifi dialog>
https://hsv.googleplex.com/5687053981319168
<lock screen with disabling button>
https://hsv.googleplex.com/4843506419892224
<lock screen with enabling button>
https://hsv.googleplex.com/5650348922372096
<fingerprint intro>
https://hsv.googleplex.com/5133769046491136
<fingerprint touch>
https://hsv.googleplex.com/5681937198874624
<fingerprint left touch>
https://hsv.googleplex.com/5767441676238848
<squeeze release>
https://hsv.googleplex.com/6632476812247040

After:
<vision settings>
https://hsv.googleplex.com/6213298875793408
<wifi dialog>
https://hsv.googleplex.com/6025790804197376
<lock screen with disabling button>
https://hsv.googleplex.com/5747461219942400
<lock screen with enabling button>
https://hsv.googleplex.com/5766700781797376
<fingerprint intro>
https://hsv.googleplex.com/6751334529236992
<fingerprint touch>
https://hsv.googleplex.com/5625963293442048
<fingerprint left touch>
https://hsv.googleplex.com/4518139360444416
<squeeze release>
https://hsv.googleplex.com/5220720579706880

Bug: 169734655
Test: robo test
Change-Id: I4aab843e28a932c7b823f36f1d8df1e5b2341f4e
2020-11-05 05:09:14 +00:00
Arc Wang
166ece8f1d [Wi-Fi] Remove WifiTrackerLib/AccessPoint constant & API usage
Bug: 152571756
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.dpp
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.details
Change-Id: I857cf0e261c1b07c3d7b6bc08632880ed8c71ee1
2020-07-22 07:53:52 +00:00
Arc Wang
0496d2c142 [Wi-Fi] Apply WifiTrackerLib objects in Wi-Fi Slice
This change uses WifiTrackerLib's WifiPickerTracker & WifiEntry
to replace SettingLib's WifiTracker & AccessPoint.

This change includes

1. WifiScanWorker has the callbacks similar to a lifecycle component
   but it's not a lifecycle component. Let WifiScanWorker implements
   LifecycleOwner and provides #getLifecycle() for WifiPickerTracker.

2. Remove captive portal related code because WifiEntry#connect will
   handle captive portal login if it's necessary.

3. Create WifiSliceItem to wrap WifiEntry because WifiEntry is an
   abstract object and it does not provide copy constructor.
   Without copy construcor, Wi-Fi Slice may show unexpected information
   when a WifiEntry is updated.

Bug: 155613549
Bug: 152571756
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.slice
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: I2d66ea4905daca3244ec4cf8f2935cda817480b1
2020-07-22 07:53:18 +00:00