Commit Graph

775 Commits

Author SHA1 Message Date
lucaslin
09bbb51d29 Replace the hidden API to public API or other alternatives
Some of connectivity related files are going to be a part of
mainline module, so the external callers cannot call its hidden
API.
Replace the hidden API to public API or other alternatives from
the callers side.

Bug: 182859030
Test: 1. Remove "framework-connectivity.impl"
      2. atest SettingsUnitTests:InternetUpdaterTest
      3. atest SettingsUnitTests:ProviderModelSliceHelperTest
      4. atest SettingsUnitTests:MobileNetworkUtilsTest
      5. make RunSettingsRoboTests \
         ROBOTEST_FILTER=AppDataUsagePreferenceControllerTest
      6. make RunSettingsRoboTests \
         ROBOTEST_FILTER=TetherPreferenceControllerTest
      7. make RunSettingsRoboTests \
         ROBOTEST_FILTER=WifiDetailPreferenceController2Test
      8. make RunSettingsRoboTests \
         ROBOTEST_FILTER=ContextualWifiSliceTest
Change-Id: Idd1ca57d8f2790070e9c401936c5af2a05bcfe9d
2021-04-14 11:36:54 +00:00
SongFerng Wang
c7d2169120 Merge "The Network Select shows wrong operator name" into sc-dev 2021-04-12 02:45:52 +00:00
Suprabh Shukla
39086c24fd Merge "Changes to "Alarms and Reminders" permission" into sc-dev 2021-04-09 22:27:50 +00:00
Sally Yuen
550072d0fa Merge "Get Extra Dim availability through ColorDisplayManager" into sc-dev 2021-04-09 16:21:32 +00:00
SongFerngWang
5c2b140483 The Network Select shows wrong operator name
It get the empty subscriptionInfoList from
 SubscriptionManager#getAccessibleSubscriptionInfoList, so the UI
 shows default subId's operator.
 Since this item appears, when sim is active, using
 getActiveSubscriptionInfoList is enough.

 - https://screenshot.googleplex.com/9aHtDVpnYQBsiQr

Bug: 182020952
Test: atest MobileNetworkUtilsTest
atest OpenNetworkSelectPagePreferenceControllerTest

Change-Id: I0d86ec41236a0d1be657ccd57fd0cf90f96b8b89
2021-04-09 12:07:00 +00:00
lesl
80af71b92c wifi settings: Fix incorrect maximum compativibility toggle behavior
Correct behavior:

maximize_compatibility (enabled) 2.4 GHz Single AP
maximize_compatibility (disabled) 5 GHz Preferred Single AP

Bug: 184802466
Bug: 184802508
Test: Manual Test to check toggle behavior
Test: RunSettingsRoboTests
Test: atest -c WifiTetherMaximizeCompatibilityPreferenceControllerTest
Change-Id: I0e97455ea9cf62294b50514ce912ef66d274db8d
2021-04-09 07:29:59 +08:00
Jeremy Goldman
b71cb56c05 Merge "Subscription name has whitespace trimmed to determine uniqueness" into sc-dev 2021-04-08 01:16:14 +00:00
Suprabh Shukla
202bd8581a Changes to "Alarms and Reminders" permission
Calling AlarmManager to know the state of the permission, which is now
the source of truth, as the logic deciding the state of the permission
may change.
Also killing the app when the permission changes to denied, this avoids
the app maintaining stale state about this permission.

Test: make -j RunSettingsRoboTests
atest SettingsUnitTests:AppStateAlarmsAndRemindersBridgeTest

Manually: Toggle the state of an app to "Not allowed" and check the logs
for activity manager kill messages.

Bug: 181152252
Bug: 183136253
Change-Id: I438782eaef4caae50fd76685c675a3e45ee28d9f
2021-04-07 16:06:09 -07:00
sallyyuen
ee9cb2d147 Get Extra Dim availability through ColorDisplayManager
Test: atest ReduceBrightColorsIntensityPreferenceControllerTest
Bug: 170970675
Change-Id: Ibccca13d6491e8861263887e33021dd467fc227f
2021-04-07 12:30:11 -07:00
Jeremy Goldman
a51780f35d Subscription name has whitespace trimmed to determine uniqueness
For example, if a subscription has the name "subsc" and another has
"subsc    " the extra unique information will be added to the
subscriptions.

Test: atest -c SubscriptionUtilTest
Bug: 183664625
Change-Id: Ia137169f6cdd9804ab04126e5045c9fb61556d54
2021-04-07 16:26:52 +08:00
Weng Su
4981dc6ea1 Maximize compatibility string update
- Single AP device:
  Title: Extend compatibility
  Summary: Helps other devices find this hotspot. Reduces hotspot connection speed.

- Dual AP device:
  Title: Extend compatibility
  Summary: Helps other devices find this hotspot. Increases battery usage.

- Screenshot:
  https://screenshot.googleplex.com/84sFvsDegjvJfWT

Bug: 184595717
Test: manual test
atest -c WifiTetherMaximizeCompatibilityPreferenceControllerTest

Change-Id: Idca20d4cf5b174110f800fbed91c404d13994b94
2021-04-07 02:27:00 +08:00
Julia Reynolds
6ca32df6b6 Merge "Only show enhanced options for migrated apps" into sc-dev 2021-04-05 13:30:57 +00:00
Julia Reynolds
cc907eadaf Only show enhanced options for migrated apps
Apps that are using the API or target > S.

Test: settings unit tests
Bug: 184027330
Change-Id: Ifae94e6392a19a215ea9beb1e816c221381bf057
2021-04-02 10:39:29 -04:00
Beth Thibodeau
6812256031 Merge "Update style of main media setting toggle" into sc-dev 2021-04-01 15:47:07 +00:00
Bill Lin
e3e3fc915a Merge "2/ Make One handed mode support multiple user switch" into sc-dev 2021-04-01 02:02:39 +00:00
Beth Thibodeau
643eb42323 Update style of main media setting toggle
Bug: 183347608
Test: visual
Test: atest MediaControlsPreferenceControllerTest
Change-Id: I0a882b769af93914ff01e428f9c07d3ab22cc36a
2021-03-31 12:12:27 -04:00
Bill Lin
49ba85dc8a 2/ Make One handed mode support multiple user switch
Previously OHM did not support for multile user switch.
We get current user id in settings and get/put settings value
with currentUserId.

Test: manual switch user and check Settings > System > Gesture > One-Handed
Test: make RunSettingsRoboTests -j40

Bug: 182278800
Change-Id: I12dcc7b634ae19375358733357dc95197e81067c
2021-03-31 17:48:23 +08:00
Arc Wang
a1fb47beb8 Fix com.android.settings.deviceinfo.storage.StorageEntryTest
StorageEntry#isStub() is unused and not built in apk.
Remove the method to fix test fail.

Bug: 184045592
Test: atest com.android.settings.deviceinfo.storage
Change-Id: I89d73c45111918c2ff01174d6fbb47f8c59f6968
2021-03-31 10:05:09 +08:00
Weng Su
4e341b780a Merge "[Provider Model] Move the Internet unavailable Wi-Fi down" into sc-dev 2021-03-30 11:32:57 +00:00
Arc Wang
dd2f2f51e0 Merge "Show "Files" category for public storage in Storage Settings" into sc-dev 2021-03-30 09:48:04 +00:00
Arc Wang
c626380689 Show "Files" category for public storage in Storage Settings
Users can click this preference to see public storage files
in external file browsers.

Bug: 170918505
Test: make RunSettingsRoboTests ROBOTEST_FILTER=StorageItemPreferenceControllerTest
      manual
      Select private storage and public storage and observe UI
Change-Id: If3f0d59b2ebf941d70e81e60c4c2015b80e7cf33
2021-03-30 15:51:49 +08:00
Bonian Chen
fecfb7f5e4 Merge "Revert "[Settings] Support getSystemService(Class<T>)"" into sc-dev 2021-03-30 05:31:52 +00: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
Weng Su
439cc64b1c [Provider Model] Move the Internet unavailable Wi-Fi down
- Check the Wifi network have both INTERNET and VALIDATED capabilities
to achieve effective network access

- Move the Internet unavailable Wi-Fi down to the top of Wi-Fi list

- Don't paint color for the Internet unavailable Wi-Fi

- Screenshot:
  https://screenshot.googleplex.com/w82kbALssdTZmg4

Bug: 178457619
Bug: 178926547
Bug: 178978070
Test: manual test on device
atest -c InternetUpdaterTest \
         NetworkProviderWorkerTest \
         ProviderModelSliceTest

Change-Id: Idf04e556ab5a87abc5bc96d1934f5e8fd91fbfaa
2021-03-26 23:24:14 +08:00
Marie Matheson
4b302a166e Adds SecuritySetting feature for providing an alternative SecuritySettings fragment
Bug: 181764224
Test: New tests added to SettingsUnitTests.
Test: Tested manually with and without feature-provided fragment.
Test: No new failures in SettingsUnitTests, or robolectric. No failures in security directory of robolectric tests.
Change-Id: I21038baf3098c18e1713a332085a5efc376f73da
2021-03-25 11:50:27 +00:00
Arc Wang
89222adb7f Merge "Fix resource problem in PrivateVolumeForgetTest" into sc-dev 2021-03-25 09:17:58 +00:00
Weng Su
4675222987 Merge "Correct the defined value of Maximize compatibility" into sc-dev 2021-03-25 08:30:02 +00:00
Arc Wang
e22d1493af Fix resource problem in PrivateVolumeForgetTest
Somehow Resource IDs are inconsistent between SettingsLib and
SettingsUnitTests. Import SettingsLibMainSwitchPreference to fix.

Bug: 183342958
Test: atest com.android.settings.deviceinfo.PrivateVolumeForgetTest
Change-Id: Id8dfccd520577fc1a8e5177e20e99b52bb57a66a
2021-03-25 06:31:57 +00:00
Peter Wang
fe042ac08e Merge "Removed unused import" am: 3fbb8612f5 am: 3cac950712 am: 204f35dc58
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1652770

Change-Id: Ib9676c28c112cc712f91f9e8c40b1e1e9aa61fa4
2021-03-25 05:09:59 +00:00
Jeremy Goldman
c3723e22d5 Merge "VpnPreferenceControllerTest converted to JUnit" into sc-dev 2021-03-25 03:24:40 +00:00
Kevin Han
bad7c091d6 Merge "Fix HibernationSwitchPreferenceControllerTest" into sc-dev 2021-03-24 20:37:03 +00:00
Ahaan Ugale
a8df0386ae Merge "Autofill Settings: Display the number of saved passwords." into sc-dev 2021-03-24 18:42:50 +00:00
Peter Wang
f8f7876c01 Removed unused import
Test: Build
Bug: N/A
Change-Id: Idd87913a67486deaf125b5b5aed89600bfac1982
2021-03-24 11:26:16 -07:00
Peter Wang
0b5532f67c Merge "Added an option in reset menu in Settings to enable resetting Euicc data only" 2021-03-24 18:12:14 +00:00
Zhen Zhang
c86abd9b99 Fix HibernationSwitchPreferenceControllerTest
Fix the HibernationSwitchPreferenceControllerTest

Test: this is the test
Bug: 183585589
Change-Id: If97f664596e2724b3435b88ed7f3ea8c3fa4df94
2021-03-24 10:56:30 -07:00
Weng Su
f50e9c24c1 Correct the defined value of Maximize compatibility
- The return value defined by the Wi-Fi framework API is opposite to the
UI
  Compatibility on:  isBridgedModeOpportunisticShutdownEnabled() = false
  Compatibility off: isBridgedModeOpportunisticShutdownEnabled() = true

- Need to use the reverse value from Settings UI to the Wi-Fi framework API.

Bug: 183576049
Test: manual test
atest -c WifiTetherMaximizeCompatibilityPreferenceControllerTest

Change-Id: I731156806661bfbca14e7eaaa648a205a3d77b74
2021-03-24 21:56:57 +08:00
Arc Wang
7ed6ce93da Merge "Fix resource problem in SettingsSliderPreferenceControllerTest" into sc-dev 2021-03-24 11:17:53 +00:00
Arc Wang
2383c6c806 Fix resource problem in SettingsSliderPreferenceControllerTest
Somehow Resource IDs are inconsistent between Settings and
SettingsUnitTests. Import SettingsLibTwoTargetPreference to fix.

Bug: 183340630
Test: atest SettingsSliderPreferenceControllerTest
Change-Id: Icc404d8ebefe1399806775272a37c56845406bc7
2021-03-24 16:39:05 +08:00
Zhen Zhang
59aa4f9cb1 Merge "Update summary based on hibernated apps number" into sc-dev 2021-03-24 06:42:56 +00:00
Jeremy Goldman
dcbde1138b VpnPreferenceControllerTest converted to JUnit
global settings string set to guarantee pre-test environment.
PreferenceManager and PreferenceScreen instantiated instead of mocks,
and mock preference inserted with getKey function overridden.

Bug: 176821216
Test: atest -c VpnPreferenceControllerTest
Change-Id: I94a881df13d1b35126de10f561d657136e4fed7f
Merged-In: I94a881df13d1b35126de10f561d657136e4fed7f
(cherry picked from commit 7361f8557c)
2021-03-24 05:33:13 +00:00
Ahaan Ugale
63fb2f10d5 Autofill Settings: Display the number of saved passwords.
We bind to each available AutofillService, fetch the number of saved
passwords, then unbind and update the UI.

Each ServiceConnection is wired up to the controller's lifecycle so they
can be unbound when the lifecycle owner is destroyed.

Bug: 169455298
Test: manual - check value in the UI
Test: manual - no ServiceConnection leak, even when there's no response
Test: atest \
 SettingsUnitTests:com.android.settings.applications.autofill.PasswordsPreferenceControllerTest
Change-Id: I7008e979e9292b99c8611010e49b3e738c82bfed
2021-03-23 19:33:48 -07:00
Zhen Zhang
1f99d6a4b5 Update summary based on hibernated apps number
Update the summary of "unused apps" based on how many apps are
hibernated or auto revoked.

Test: HibernatedAppsPreferenceControllerTest
Bug: 181172051

Change-Id: I274eb3c0ada3d063937368232f31e52c20287552
2021-03-23 11:10:43 -07: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
Jeff Sharkey
9e07eab08f Request new Bluetooth runtime permissions.
An upcoming platform change is introducing a new "Nearby devices"
runtime permission which contains the new BLUETOOTH_CONNECT and
BLUETOOTH_SCAN permissions.

We have logic in place to use <split-permission> to translate the
older BLUETOOTH and BLUETOOTH_ADMIN permissions into these new
runtime permissions, but modern apps will need to pivot to
requesting them directly as part of targeting Android S.

This change requests both the old and new permissions to avoid
breakage while the new permission enforcement is being phased in.

Bug: 181813006
Test: atest CtsPermission2TestCases
Test: atest CtsPermission3TestCases
Test: atest CtsStatsdAtomHostTestCases
Change-Id: I0a6ff040520deaa7c7a6fecd83e8608a9bf28c4a
2021-03-23 12:35:36 +00:00
Wesley.CW Wang
3a52e335be Remove Battery Settings page default tips
- Remove SummaryTips from default tips
 - Clean up test file import
 Screenshot: https://screenshot.googleplex.com/6rYrnMvoTbeCS7m.png

Bug: 183079415
Test: make RunSettingsRoboTests -j40
Change-Id: I1001d75235a6d8d5947b974939884103eb0834da
2021-03-23 08:44:42 +00:00
Sally Yuen
1908c5357c Merge "Reduce RBC test flakiness" into sc-dev 2021-03-22 16:27:49 +00:00
Arc Wang
e98a5a9932 Merge "Only show storage category stats preferences for private volumes" into sc-dev 2021-03-22 11:06:47 +00:00
Bonian Chen
0fd51cc9ea [Settings] Rollback design for getSystemService(String)
Some of the design are intented for getSystemService(String).
Rollback those items.

Bug: 179640862
Test: local
Change-Id: I581070afb380a86c6352322f927c269b4527aee9
2021-03-22 09:44:22 +00:00
Arc Wang
40396d532f Only show storage category stats preferences for private volumes
Hide it because there is no framework API to get storage
category stats of public volumes.

Bug: 174964885
Test: manual
      Observe storage settings UI of a USB flash drive.
Change-Id: I7272cd18c186793f86548a87b5cb88bb957ff8d5
2021-03-22 16:28:59 +08:00
Bonian Chen
13fb77c652 Merge "[Settings] Convert to getSystemService(Class<T>)" 2021-03-22 08:18:59 +00:00