Commit Graph

25 Commits

Author SHA1 Message Date
Weng Su
51fa3d798a Restrict WifiDialogActivity
- Don't show WifiDialogActivity if user has DISALLOW_ADD_WIFI_CONFIG

Fix: 299931761
Bug: 314867581
Flag: None
Test: manual test with TestDPC
atest -c SettingsRoboTests:WifiDialogActivityTest

Change-Id: Icbb8f45922ded163208976be9c2816060dcf09f1
2024-01-26 18:01:28 +08:00
Yanting Yang
09e32b466b Ignore failing tests of WifiDialogActivityTest
Bug: 314867581
Test: post-submit
Change-Id: Ie0027de0a81e209a6db10a6075a92e680b1c1206
2023-12-06 15:14:02 +00:00
FanWu
1bb01ff055 Ignore failing tests under com.android.settings.wifi
Bug: 314867581

Test: not needed
Change-Id: Id721c8a91baa54c746aba007dd40a086276953e8
2023-12-05 12:01:30 +08:00
Chaohui Wang
9b4db8d33f Fix & ignore some tests
Fix the followings,
- SimSelectNotificationTest
- WifiCallingSliceHelperTest
- WifiDetailPreferenceController2Test
- WifiDialogActivityTest

Ignore the followings,
- WifiP2pSettingsTest

Fix: 300160894
Test: robo test
Change-Id: I27b6eb61dccbd0688a100154fc77b82a91eede57
2023-09-27 23:45:48 +08:00
Eric Rahm
802b922593 Revert "Test Fix SettingRobolectricTest Fail"
This reverts commit 818f77cd1f.

Reason for revert: Underlying issue fixed in ag/23454315.

Bug: b/275023433
Test: atest SettingsGlobalRoboTests

Change-Id: I1af272efd00b3c5bd35310512f5712d5d1c7d834
2023-09-11 13:38:36 +00:00
Vincent Wang
818f77cd1f Test Fix SettingRobolectricTest Fail
Bug: b/275023433
Test: NA
Change-Id: If2dcb8f6c196327129ccc9375b190e394c994efa
2023-05-09 06:26:39 +00:00
Weng Su
be23c28ff2 Prevent leaking Wi-Fi dialog on lock screen
- The Wi-Fi dialog is designed to be displayed on the system UI

- Dismiss Wi-Fi dialog to prevent leaking user data on lock screen

Bug: 231583603
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialogActivityTest

Change-Id: Ie67ff1138ffeddd3e358331d8cef61e0629173e2
2022-07-08 05:43:10 +08:00
Weng Su
a09c33f49c Restrict guest user to configure WiFi access points
- If the user is not allowed to configure Wi-Fi access points, close WifiDialogActivity.

Bug: 226133034
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialogActivityTest

Change-Id: I32d0c5beceb8a140a98636a5a0af97790495620d
2022-06-07 03:30:01 +08:00
Weng Su
9bd8f046a9 Fix WifiDialogActivityTest broken
- The ShadowWifiManager class is not working as expected

- Use Mockito class instead of Shadow class

Bug: 175369329
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialogActivityTest

Change-Id: Idbc851c4d9702be23561c2c48c9d7d077e5f452e
2022-01-06 08:45:40 +00:00
Weng Su
a27167dbd8 Remove ACCESS_COARSE_LOCATION permission checking
- The calling package needs ACCESS_FINE_LOCATION permission to get WiFi
result data.

- The ACCESS_COARSE_LOCATION permission is not allowed.

Bug: 185126813
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialogActivityTest

Change-Id: I2c9013a74d173066270b422ae2179b0d1018f2d7
2021-11-05 01:36:13 +08:00
Weng Su
71e728e934 Add permission checking to WifiDialogActivity
- Use getCallingPackage() to get calling package.

- Check if the calling package has ACCESS_COARSE_LOCATION or
ACCESS_COARSE_LOCATION permission.

- Only set result data to permission granted callers

Bug: 185126813
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialogActivityTest

Change-Id: If7ca069c842ed2bd1aed23f9d4041473c68a4dad
2021-07-02 23:10:11 +08:00
Tsung-Mao Fang
a6cd5b9cd4 Ignore the timeout test cases
Because some framework changes, two tests cause presubmit process can't
finish.

Ignore these two tests, and fix them as soon as possible.

Bug: 175076359
Test: Run robo test
Change-Id: I1ddb84500fb192329f4e36d440df796b9dd66bb0
2020-12-10 20:30:03 +08:00
Arc Wang
e57ead9a75 [Wi-Fi] Support WifiTrackerLib in WifiDialogActivity
After this change, WifiDialogactivity supports both WifiTrackerLib and
SettingsLib because this is an exported UI component, some other APPs
(e.g., SetupWizard) still use SettingsLib.

Bug: 152571756
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi.WifiDialogActivityTest
      manual
      In Wi-Fi Settings, manually add a Wi-Fi network.
      In SetupWizard, manually add a Wi-Fi network.
Change-Id: I87f477d905cc6ea34ef1afbfade3773920dad6eb
2020-07-22 15:50:42 +08:00
Greg Kaiser
9e9255fb2a Revert "[Wi-Fi] Apply WifiTrackerLib objects in Wi-Fi Slice"
This reverts commit 7b1aded2a6.

Reason for revert: Settings is crashing for WiFi selection in SetupWizard on wembley

Bug: 161434533
Change-Id: I1d90e9bae1b31862fba674db0d7497e43f987a7f
Test: Locally reverted, reflashed, and was able to select WiFi without Settings crashing.
Exempt-From-Owner-Approval: Revert to clear up P0 while all owners are outside of work hours
2020-07-16 14:47:31 +00:00
Arc Wang
7b1aded2a6 [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.

4. Use WifiTrackerLib's NetworkDetailsTracker & WifiEntry in
   WifiDialogActivity because it gets a WifiEntry key from Wi-Fi Slice.
   NetworkDetailsTracker can get the WifiEntry of th key.

Bug: 155613549
Bug: 152571756
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.slice
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: I0718f4647cea007a9b701922f3121a388dd43918
2020-07-16 15:56:42 +08:00
Arc Wang
8e3c49123d [Wi-Fi DPP] Refine Wi-Fi DPP UI layouts with SUW library
1. Use GlifLayout in all fragments
2. Fragments use 32dp icon instead of 48 dp
3. Replace ScrollView & ProgressBar & Header & Footer of original layout with GlifLayout design
4. Remove ActionBar (no more back button on screen top)

Bug: 129021867
Test: manual
Change-Id: I2fda48cb7f7819b2c8dd85c10d39e1f187463bd8
2019-05-21 13:59:39 +08:00
pastychang
ec0a30a8b9 Set QR scan activity to light theme in setup flow
Test: atest
Bug: 131029518
Change-Id: Ibec28e78fcf17390cd3844ead4a88a4e6bff6094
2019-04-23 13:38:39 +00:00
pastychang
1d2b51aeb0 Set WifiDialog to light theme in setup flow
Screenshot: https://screenshot.googleplex.com/X6tkxihEWFY

Test: Manual
Bug: 130507879
Change-Id: Icca6b827cdb62387fde4c91435d4df10e2ff4d04
2019-04-15 05:49:51 +00:00
James Lemieux
f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
tmfang
5bd7151413 Migrate all AlertDialogs to AndroidX version
- Let test cases can be compatible with AndroidX AlertDialog.
- Theme of Transparent needs to support AndroidX AlertDialog.

Change-Id: I0789b66f52feef30ebab7fb824d0e39d5ae9cc96
Fixes: 111413092
Test: make RunSettingsRoboTests -j56
2018-07-20 13:38:58 +08:00
Raff Tsai
0810afee9b Fix AlertDialog corner and color accent
- Add some attributes in Theme.AlertDialog

Change-Id: Ifb9ca98ee11f6c82cda4a576d10b5fde54f788be
Fixes: 110917586
Test: mannual
2018-07-18 15:40:51 +08:00
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
jeffreyhuang
cbfb099a40 Rename SDK_VERSION_O to SDK_VERSION
Test: make RunSettingsRoboTests -j40
Change-Id: I6715062d8addadda441e32809db1af55f15e3a90
2017-12-05 16:43:54 -08:00
Maurice Lam
44ce407d00 Add flag to not connect in WifiDialogActivity
Add flag connect_for_caller, which if false will not connect to the
Wi-Fi network on behalf of the caller.

Test: cd tests/robotests && mma
Bug: 34951731
Change-Id: Ie24a8ed1891aea1caec75a2de9a3d2bdb3dad8a7
2017-11-02 10:50:38 -07:00