Commit Graph

13339 Commits

Author SHA1 Message Date
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
Tim Peng
7e6762de8a Get low battery level through metadata
Bug: 183469297
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedBluetoothDetailsHeaderControllerTest
Change-Id: Iae8971a5c1f183fe141d4246e23d8feb6d68d0ff
2021-03-24 09:32:26 +08:00
Rajeev Kumar
cafc769a51 Merge "Update Managed Device Info text for a financed device" into sc-dev 2021-03-23 20:55:27 +00:00
Rajeev Kumar
d85317e4e5 Merge "Update Privacy Settings text for a financed device" into sc-dev 2021-03-23 20:55:27 +00:00
Almaz Mingaleev
fcf1fcfe9b Show pop-up banner when Location is off and user tries to enable GeoTZ.
As of now GeoTZ state remains unchanged even if user enables
Location toggle.

Bug: 152746236
Test: m -j30 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.datetime.LocationTimeZoneDetectionPreferenceControllerTest"
Test: checked manually that dialog opens Location settings page
Change-Id: I5fd3288e9d5a7aac3bc82da6944b4ccd6bb9e0f5
2021-03-23 19:43:49 +00: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
Dmitri Plotnikov
5cc7c7c1de Merge "Change getStatsStartRealtime to getStatsStartTimestamp" into sc-dev 2021-03-23 17:29:35 +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
Salud Lemus
a9a24372fd Update Managed Device Info text for a financed device
Bug: 183448705
Test: Used a test device that is registered via ZT
Test: m RunSettingsRoboTests ROBOTEST_FILTER=EnterprisePrivacyPreferenceControllerTest

Change-Id: Iea2567e7943b122c6c6d2772380f8ddd57066a3f
2021-03-23 16:39:56 +00:00
Salud Lemus
930df91e66 Update Privacy Settings text for a financed device
Bug: 182802692
Test: Used a test device that is registered via ZT
Test: m RunSettingsRoboTests ROBOTEST_FILTER=EnterprisePrivacySettingsTest
Test: m RunSettingsRoboTests ROBOTEST_FILTER=PrivacySettingsEnterprisePreferenceTest
Test: m RunSettingsRoboTests ROBOTEST_FILTER=PrivacySettingsFinancedPreferenceTest

Change-Id: Icc131252430cd147e2a06ba2aa260f6ea26734bb
2021-03-23 16:06:01 +00: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
Alex Johnston
46c72f3cac Settings: Disable USB preferences if USB signaling is off
* When developer options is turned
  off and on again, 'Default USB
  configuration' and 'Disable USB
  audio routing' should not be enabled
  if USB data signaling is disabled.

Manual testing:
* Disable USB data signaling
* Verify preferences are disabled
* Turn developer options off and on
* Verify preferences remain disabled

Bug: 180711035
Test: manual testing
      make RunSettingsRoboTests -j ROBOTEST_FILTER=UsbAudioRoutingPreferenceControllerTest
      make RunSettingsRoboTests -j ROBOTEST_FILTER=DefaultUsbConfigurationPreferenceControllerTest
Change-Id: Id08228da812b7534e2217b0c3f30a7ac989f7553
2021-03-23 11:43:28 +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
Bill Lin
9f046e55b6 Merge "2/ Set Swipe bottom for notification OFF by default" into sc-dev 2021-03-23 01:22:38 +00:00
Dmitri Plotnikov
3b5c5f0d7c Change getStatsStartRealtime to getStatsStartTimestamp
Bug: 183434301
Test: make RunSettingsRoboTests
Test: make RunSettingsGoogleRoboTests
Change-Id: Ic86a04a91d910c863706a0f799c757dcd7c5262d
2021-03-22 15:51:21 -07:00
Sally Yuen
1908c5357c Merge "Reduce RBC test flakiness" into sc-dev 2021-03-22 16:27:49 +00:00
Bonian Chen
1f5c043b0c Merge "[Settings] Rollback design for getSystemService(String)" am: 7a8463dbf8 am: de520dd11a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1648047

Change-Id: I88dff2ed3675305469015351c54272ea6a0d1854
2021-03-22 13:01:19 +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
Weng Su
020af77825 Hide edit menu if network is uneditable
- Screenshot:
  https://screenshot.googleplex.com/3BhZRBrmQXjeaGL

Bug: 161896161
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiNetworkDetailsFragment2Test

Merged-In: I47ea2cf19e178eff48f23e56903d0daa4ef8fa28
Change-Id: I47ea2cf19e178eff48f23e56903d0daa4ef8fa28
(cherry picked from commit b7dbd3a911)
2021-03-22 09:43:57 +00:00
Bonian Chen
f9f2fe3f84 Merge "[Settings] Convert to getSystemService(Class<T>)" am: 13fb77c652 am: 70f887af52
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1645152

Change-Id: I89fa2de521bb07911f0c7ee0122ba3b2cb062fab
2021-03-22 09:36:16 +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
SongFerng Wang
826a146c20 Merge "Provider model CarrierItem's subtitle show no connection" into sc-dev 2021-03-22 07:45:20 +00:00
SongFerngWang
fb2a1d9db9 Provider model CarrierItem's subtitle show no connection
CarrierItem's subtitle show no connection when Wi-Fi
off + no service

Bug: 182433548
Test: atest ProviderModelSliceTest
atest ProviderModelSliceHelperTest
atest NetworkProviderWorkerTest
atest InternetConnectivityPanelTest
make RunSettingsRoboTests -j

Change-Id: I04778cf2b184c0a75dc6999ffde011a9ad5e0690
2021-03-22 14:21:55 +08:00
Bonian Chen
db6c47756d [Settings] Convert to getSystemService(Class<T>)
Change to getSystemService(Class<T>) to align the capability with framework
part.

Bug: 179640862
Test: local
Change-Id: I1b4812044fc4876bec6645570049a60f9470dbbd
2021-03-22 06:20:19 +00:00
Tiffany Nguyen
34fb874647 Add new battery settings feature provider.
Test: No-op class
Bug: 181827863

Change-Id: Iafd4c6128ba63d3c794c076edaaa7638e3de3a42
2021-03-22 05:22:38 +00:00
SongFerng Wang
34c8d35cd3 Merge "Change the behavior of notifyAllowedNetworkTypesChanged." am: 3ac3cce15b am: b3f2e9090a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1641828

Change-Id: I5ba679ca3d2a6f6411dae1ffdc441527508d4763
2021-03-22 03:56:36 +00:00
TreeHugger Robot
8bdbdf4b91 Merge "Hide edit menu if network is uneditable" into sc-dev 2021-03-22 01:53:59 +00:00
sallyyuen
b75902f0ba Reduce RBC test flakiness
Read the setting directly, which is successfully being set by the
display manager

Bug: 182099323
Test: forrest
Change-Id: Ia68c8206187995fc5a615d6815f04b8ad01f9312
2021-03-21 18:03:35 +00:00
SongFerng Wang
3ac3cce15b Merge "Change the behavior of notifyAllowedNetworkTypesChanged." 2021-03-21 16:45:59 +00:00
TreeHugger Robot
d7fff5790a Merge changes from topic "revamp storage settings header" into sc-dev
* changes:
  Add option menu in StorageDashboardFragment
  Revamp Storage Settings header part
2021-03-20 16:06:50 +00:00
Oli Lan
228cc886ae Merge "Add a setting to turn clipboard access notifications on/off." into sc-dev 2021-03-20 12:07:41 +00:00
Rubin Xu
88cd3dae5f Merge "Fix Settings password robo tests." into sc-dev 2021-03-19 16:23:59 +00:00
TreeHugger Robot
b4205dc1bd Merge "Change Magnification Mode Settings UI" into sc-dev 2021-03-19 12:07:17 +00:00
Rubin Xu
d9b740df26 Fix Settings password robo tests.
Bug: 151913744
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
Change-Id: I7d4f221f4f4c0375f06780f907b769946aebd272
2021-03-19 11:37:25 +00:00
ryanlwlin
0272002335 Change Magnification Mode Settings UI
To support new settings UI, we change the UI from scrollview
to listview to simplify UI initialization.

Bug: 182118397
Test: atest MagnificationSettingsFragmentTest
      and manual test.
Change-Id: Ib65dc139ba54f2281e5cb7e2dc55b3574ad2c733
2021-03-19 18:24:26 +08:00
Arc Wang
c22749530b Add option menu in StorageDashboardFragment
Add option menu for each kind of storage

1. Unsupported disk: Format.
2. Missing volume record: Forget.
3. Unmounted storage: Mount.
4. Default internal storage: Migrate.
5. Private volume: Rename / Unmount / Format as portable / Migrate.
6. Publuc volume: Rename / Unmount / Format / Format as internal.

Bug: 174964885
Test: atest VolumeOptionMenuControllerTest
Change-Id: I85fa117ff0a49ec7a53ba36580591c7ce7f5a8dc
Merged-In: I85fa117ff0a49ec7a53ba36580591c7ce7f5a8dc
2021-03-19 18:08:48 +08:00
Arc Wang
d496a737ce Revamp Storage Settings header part
1. Add new object StorageEntry to encapsulate VolumeInfo and
   unsupported DiskInfo and missing VolumeRecord.
2. Replaces StorageSummaryDonutPreference with UsageProgressBarPreference.
3. Add storage select spinner.
4. Add a "Free up storage" preference to replace "Manage storage" button.

Bug: 174964885
Test: atest com.android.settings.deviceinfo.storage
      atest com.android.settings.deviceinfo
      manual
      Insert an USB drive, select the drive in StorageDashboardFragment
      and observe UI.
Change-Id: I83877f76869414de4fb2788b6b18fe507aa5cfcf
Merged-In: I83877f76869414de4fb2788b6b18fe507aa5cfcf
2021-03-19 18:08:38 +08:00
Zoey Chen
927a1cac10 [Settings] Revert the test for using mPhoneStateListener since the Robolectric test is broken
Bug: 183066948
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=AirplaneModeEnablerTest
Change-Id: Ic5c67a9a2996f40fcb07d0840f5c677494e1dc0a
2021-03-19 17:00:00 +08:00
Dmitri Plotnikov
a7f7d79431 Merge "Remove unused code" into sc-dev 2021-03-19 05:10:48 +00:00
Haining Chen
0981e4d65b Merge "Update settings tests with biometric component info" into sc-dev 2021-03-19 03:49:10 +00:00
TreeHugger Robot
2d932aa5fb Merge "Add Media Management Apps activity in Special App Access" into sc-dev 2021-03-19 01:00:40 +00:00
Dmitri Plotnikov
3bd707ab1a Remove unused code
Bug: 173745486
Test: make RunSettingsRoboTests
Change-Id: I9e6e32e4ad594b7d6f5f984bf1b839caf654066b
2021-03-18 12:59:15 -07:00
Yu-Han Yang
2a1f61829e Remove tests for Location Services summary
Bug: 183068632
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.location.LocationServicesPreferenceControllerTest"
Change-Id: I9c310ba1c320c182030e5ba7c64099e1b65ea109
2021-03-18 11:12:57 -07:00
Dmitri Plotnikov
e4fc48f33e Merge "Remove references to BatteryStatsHelper from PowerUsageBase" into sc-dev 2021-03-18 15:33:47 +00:00
Chiachang Wang
04f43b188d Merge "Update mocking to correct target methods" am: efa884758b am: b64bf233a3 am: 7dce573e9d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1644306

Change-Id: I99179fe4a754849f50f6b06ce9b7424a88478184
2021-03-18 15:14:07 +00:00
Chiachang Wang
7dce573e9d Merge "Update mocking to correct target methods" am: efa884758b am: b64bf233a3
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1644306

Change-Id: I8fed607cd748348e714470f5fe8159abe445313d
2021-03-18 14:29:12 +00:00
Weng Su
b7dbd3a911 Hide edit menu if network is uneditable
- Screenshot:
  https://screenshot.googleplex.com/3BhZRBrmQXjeaGL

Bug: 161896161
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiNetworkDetailsFragment2Test

Change-Id: I47ea2cf19e178eff48f23e56903d0daa4ef8fa28
2021-03-18 17:35:25 +08:00
Almaz Mingaleev
39396b0bb2 Merge "Fix imports in LocationTimeZoneDetectionPreferenceController." into sc-dev 2021-03-18 09:23:30 +00:00