Commit Graph

10 Commits

Author SHA1 Message Date
Kohsuke Yatoh
bdfab1de26 Define "Add network" preference in XML.
Move the definition from Java to XML, so that SearchIndexProvider can
include it in the getXmlResourcesToIndex().
Also update getNonIndexableKeys() to return the corresponding key when
the preference is hidden.

If the Internet settings are restricted, "Add network" still appears on
search. When clicked, it opens the Internet settings page in restricted
mode, so that users can know that the settings are restricted.

Bug: 224421762
Fix: 224421762
Test: atest SettingsRoboTests:NetworkProviderSettingsTest
Change-Id: Ie9ea58070843a390844b461ce766f0ce29e64fab
2023-08-15 11:41:05 +00:00
Weng Su
a81bb19618 Show policy transparency dialog if adding Wi-Fi config is not allowed
- When the user is restricted by UserManager.DISALLOW_ADD_WIFI_CONFIG, clicking on a Wi-Fi network will show the Settings policy transparency dialog.

- The "Not allowed by your organization" summary in Wi-Fi networks will be removed in a separate CL.

Bug: 233871529
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=Wifi

Change-Id: Ia978be8e85a5809de1331f3e0edc11fbc8925c80
2022-10-07 02:34:49 +08:00
changbetty
06df9c9fc0 Add WiFi Enterprise restrictions check for WiFi Configuration Addition
When UserManager.DISALLOW_ADD_WIFI_CONFIG is set to true.
  - Disable the "Add network" item in the Internet settings.

  - Activity action API for ACTION_WIFI_ADD_NETWORKS should not be
    permitted and the user shouldn’t see a prompt for approval

Bug: 203169077
Test: make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AddAppNetworksActivityTest
Change-Id: I18d7703b5972bfbc12dca10b6432d756813abace
2022-01-10 16:06:20 +00: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
Amin Shaikh
3f1de20c7e Fix themed settings icons.
- Added android prefix for homeAsUpIndicator attribute
- Override ic_arrow_down_24dp from androidx
- Remove ic_lock drawable overlay
- Update date and time icon
- Dedupe ic_menu_add and ic_add_24dp

Bug: 131346125
Test: mp settings;
Change-Id: I7223249f2adccc5569a37e8b68cae5499e7c7620
2019-05-03 17:02:46 +00:00
Arc Wang
2b0c8a0c6b Fix Wi-Fi QR code scanning icon disappears problem
Should not do one time initialization for the View in
Preference#onBindViewHolder. Because A view setup in
PreferenceViewHolder may be recycled.

Bug: 127502788
Test: manual
Change-Id: Iedf023fa00d2745a02521b65e5c12165c2bc025b
2019-04-10 14:20:11 +08:00
Arc Wang
25595994b7 Add divider line in Preference for scan QR code button and share hotspot button
Use com.android.settingslib.R.layout.preference_two_target in
WifiTetherSsidPreference to add divider line.

Bug: 128940862
Test: manual test
Change-Id: I46dabcee31a91b68b8c2e57c9840a59f8a1be304
2019-03-22 18:06:11 +08:00
Arc Wang
8040f4c59f Revert "Add divider line in Preference for scan QR code button and share hotspot button"
This reverts commit 890f3a4340.

Reason for revert: I find a UI defect in this fix.

Change-Id: Icdbb1d2b5319636b8c4c54bcdc0fc3562585a15a
2019-03-22 05:36:59 +00:00
Arc Wang
890f3a4340 Add divider line in Preference for scan QR code button and share hotspot button
Bug: 128940862
Test: manual test
Change-Id: If576f0840cc8924b63348f04fe12c3a0d4edcb89
2019-03-21 10:48:55 +08: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