Commit Graph

28 Commits

Author SHA1 Message Date
changbetty
39ebb7c9a8 Remove feature flag for provider model in wifi settings
Bug: 206338507
Test: manual test
Change-Id: I1ec83c94f801b489bcc716a6d78cbe7beab9638f
2021-11-17 15:57:14 +00:00
Weng Su
b91aa1edba Fix the broken test on WifiSettingsTest
- Use the same service name(Context.USER_SERVICE) to mock
UserManager.class

- Set the Provider Model feature flag to false

Bug: 183921235
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiSettingsTest

Change-Id: I7f83431c08f1e2bd61be0d4b7894116fa7d60168
2021-03-30 01:44:50 +08: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
Arc Wang
41f23de712 [Wi-Fi] Replace WifiTracker with WifiPickerTracker in WifiSettings
WifiSettings uses WifiTracker in SettingsLib while WifiSettings2
uses WifiPickerTracker in WifiSettingsLib.

1. Remove WifiSettings.
2. Rename WifiSettings2 to WifiSettings.
3. Remove the files only used in the removed WifiSettings.
   (Saved networks files are not included)

Bug: 152571756
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi
      atest WifiSettingsUiTest
Change-Id: I800b434c8049121db115cff87d51e164e4529999
2020-05-14 21:24:57 +08:00
Arc Wang
4fafe6716c [Wi-Fi] Fix Wi-Fi broken tests
Bug: 150910070
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: Ie9b9384610857e2999fe4642a93c2d31ce3315f3
2020-03-20 15:41:29 +08:00
Tsung-Mao Fang
9a32a3c86c Ignore some broken tests
In order to running presubmit asap,
we ignore broken tests first.

Test: Run robotest
Bug: 150910070
Change-Id: I6c774eeef7d81b085e5dc4d8f6066b103c54c6cf
2020-03-06 12:10:47 +08:00
Roshan Pius
a7e96dd80e Settings: Use new API for setting wifi scan always on
Bug: 148514485
Test: Manually verified the toggle from Settings
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: I0a55b7212c97c11d50b0a05eec743e8ebe9ea6d8
2020-02-18 12:53:49 -08:00
Thomas Devaux
158d17fef6 Auto-open Captive Portal when user clicks on open network.
Rationale: many users are confused about what to do after tapping the captive
portal network in Settings, and since there is explicit user action to
connect to that network at that point, auto-opening the portal is
natural and makes it simpler.

Bug: 148538768
Test: manually with local AP with Captive Portal and:
> make RunSettingsRoboTests -j40
> atest com.android.server.ConnectivityServiceTest

Change-Id: I29573132cd3e46ff22e6f67bb3678516fabac47d
2020-02-12 00:45:46 +00:00
Roshan Pius
93f6c463d6 Merge "Settings: Use new API for wifi wakeup feature toggle" 2020-02-11 00:36:17 +00:00
Hai Shalom
ae7d2cf99c [Passpoint] Fix broken test: com.android.settings.wifi.WifiSettingsTest
Fix broken test: com.android.settings.wifi.WifiSettingsTest.
PasspointConfiguration objects require both HomeSp and Credential
objects initialized, and since today it is enforced in the Wi-Fi API.
Updated the test mocks to initialize the Credential object which was
missing.

Bug: 149175146
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.WifiSettingsTest
Change-Id: I709a6bc104141ac88b2c88bdac4f3a9a3d296ec9
2020-02-10 04:14:12 +00:00
Roshan Pius
65291297a9 Settings: Use new API for wifi wakeup feature toggle
Bug: 148514485
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi
Test: Verified wifi wakeup feature toggle in wifi settings.
Change-Id: I1e7c0b3ca053a9b7d6105cad16362df38517b51e
2020-02-07 12:33:18 -08:00
Edgar Wang
0934babbfc Make the fragment title can’t searchable
we shouldn't take users so deep into the settings IA because it's easy
to feel lost in settings after clicking on a result without additional
context.

Bug: 143055215
Test: robotest & manual
Change-Id: I337cb5ead31e1e4e7bf9be78132e90630f83ee43
2020-02-06 19:07:11 +08:00
Arc Wang
0614a7d1ea [Wi-Fi] Fix unit test fails
Bug: 144405885
Test: WifiSettingsTest
      WifiSettings2Test
      WifiDetailPreferenceControllerTest
      WifiDetailPreferenceController2Test

Change-Id: Ib6a34364c3eb47d59a153f07e31c9cddddcf1f8a
2019-11-25 14:46:03 +08:00
Tsung-Mao Fang
6a2d48d158 Ignore all failed test cases
Test: Run all robo test
Bug: 144405844
Bug: 144407418
Bug: 144407438
Fix: 144406422
Bug: 144405885
Bug: 144408475

Change-Id: Ia94636632106206b062d35b2ca53a028d0cbc35d
2019-11-13 20:31:01 +08:00
Arc Wang
f4d3ba1049 [Wi-Fi][A11Y] Fix TalkBack lose focus in WifiSettings & WifiSettings2
Use stable ID feature of RecycleView to keep preference focus.

Bug: 126132618
Test: WifiSettingsTest
      WifiSettings2Test
      manual visual

Change-Id: Id73157b0935186c9a59d1ef68190d853f671ebc2
2019-11-01 09:47:37 +08:00
Raff Tsai
966fa01423 Use SettingsLib Indexable
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId

Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
2019-09-25 18:24:56 +08:00
Sunny Shao
5da24591ea Update testcases which failed due to the SupportLibrary changed
Fragment.oncreate() causes an IllegalStateException. We use a
ShadowFragment to stop the calling sequence.

Fixes: 135086559
Test: robotest
Change-Id: I601e0f2513f826b0b7749cb2c013b7e4c0a94a33
2019-06-13 10:02:50 +00:00
TreeHugger Robot
bb00e4c028 Merge "[PasspointV2] Set summary of saved networks preference" into qt-dev 2019-04-18 00:58:22 +00:00
cosmohsieh
e6e4b4d78d [PasspointV2] Set summary of saved networks preference
Summary text of "saved networks" preference has number of both normal
networks and subscriptions

Bug: 130259573
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi.WifiSettingsTest
Change-Id: I8bdf41c1a85165298a2ccd9e688c30b0bd593bfa
2019-04-17 18:21:09 +08:00
cosmohsieh
faede7ceb9 Implement context menu for ConnectedAccessPointPreference
1) User wants to long press ConnectedAccessPointPreference to forget network if this
is a captive portal network.
2) Change context menu string

Bug: 113756562
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: If5c45c45fe126f627eeb53a6c1873a070ad23ae8
(cherry picked from commit 9f8522565a)
2019-04-16 07:35:36 +00:00
clownshen
fafdfea72c Add Wi-Fi data usage field
Add Wi-Fi data usage field at Wi-Fi Setting to show out the total Wi-Fi
data usage for user.

Bug: 129474341
Test: atest WifiSettingsTest
Test: manual test
Change-Id: Iad5bee47bd83ed143a2730f042d77907344f4017
2019-04-03 17:04:36 +00:00
Arc Wang
baf002d61a Fix Wi-Fi Easy Connect buttons UI defects
1. Apply attr/colorAccent to button icons for theme UI control
2. Apply attr/selectableItemBackground for button tapping ripple effect
3. Use ConstraintLayout to separate ssid EditText and scan button
4. Remove ButtonPreference and add AddNetworkPreference.
   ButtonPreference's naming and design look like a general purpose UI
   component but it's not. This change refactors the code.
5. In AddNetworkPreference, use settingslib layout file
   'preference_access_point' to fix UI alignment problems.

Bug: 126964552
Bug: 125434239
Bug: 126762937

Test: manual test
      atest com.android.settings.wifi.WifiSettingsTest
Change-Id: Ib899a1e10f96bb8427ff00d6b5dfca37a0642c44
2019-03-19 16:27:04 +08: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
jackqdyulei
ef79de6ad9 Remove the unnecessary preferenceCategory
In talkback, it counts the untitled preferenceCategory as an visiable
item. This CL remove unnecessary cateogry and add divider line manually.

Bug: 118796245
Test: RunSettingsRoboTests

Change-Id: I77151fdce671cf91322b3c1badc06a3b7861dcc0
2018-11-02 13:24:14 -07: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
db00a3177a Refactor add network page
WifiDialog.java can be launched as "full screen mode"
in some use cases. However the way it's done is that
it uses theme to fake the full screen appearance.
It just feels hacky to use a dialog for full screen UI.
So, we created an "AddNetworkFragment" to make this
page can look like a normal fragment.

Also, clean up some useless code about "full screen mode"
of WifiDialog.

Change-Id: Iedd04c6a8e403cbceb872313314e1cba0d514246
Fixes: 111875856
Test: robo test, manual test
2018-08-18 00:16:14 +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
Ben Lin
848f67d17a Add ability to show/hide Wi-Fi settings, and all related sub-settings.
This adds a new boolean flag, config_show_wifi_settings, which when set
to false will hide the "Wi-Fi" page in network & internet (there is no
key value associated with this preference page). It will also hide
nested pages from search results, such as Wi-Fi preferences.

Bug: 62379554
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=ConfigureWifiSettingsTest
and
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiSettingsTest
and
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiMasterSwitchPreferenceControllerTest
all pass.

Change-Id: Iedc6bc272e0cb2b561c6bf25968e70f355aaaa8e
2018-01-03 20:05:55 +00:00