Commit Graph

1998 Commits

Author SHA1 Message Date
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
89a1c7bfc0 Request new Bluetooth runtime permissions. am: 9e07eab08f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13956086

Change-Id: I8517c50feb1d53bc018d8b1a748c4c72469fb4b3
2021-03-23 13:10:31 +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
Wesley.CW Wang
201445f80a Remove Battery Settings page default tips am: 3a52e335be
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13922078

Change-Id: I78509dc0c432c3b0f122560aa1718feb89535d3b
2021-03-23 09:05:19 +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
Jeremy Goldman
18acf73b5f Merge "Unit tests for the VpnInfoPreference." 2021-03-23 02:38:24 +00:00
Sally Yuen
b35c405705 Merge "Reduce RBC test flakiness" into sc-dev am: 1908c5357c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13919447

Change-Id: I6db7640c76e6a9f86674e685b229e9f926115b42
2021-03-22 19:24:25 +00:00
Sally Yuen
1908c5357c Merge "Reduce RBC test flakiness" into sc-dev 2021-03-22 16:27:49 +00:00
Arc Wang
86940142ad Merge "Only show storage category stats preferences for private volumes" into sc-dev am: e98a5a9932
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13922070

Change-Id: I260581ae4f06bb976f8a9b2b90a25a3c34687998
2021-03-22 11:41:32 +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
Jeremy Goldman
1e461619ab Unit tests for the VpnInfoPreference.
Test: atest -c VpnPreferenceController
Bug: 176821216

Change-Id: Ia9754023ac392b64fe1755aabcb399d9dd9ace6e
2021-03-22 16:26:32 +08:00
Bonian Chen
13fb77c652 Merge "[Settings] Convert to getSystemService(Class<T>)" 2021-03-22 08:18:59 +00:00
SongFerng Wang
552639ac25 Merge "Provider model CarrierItem's subtitle show no connection" into sc-dev am: 826a146c20
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13922069

Change-Id: I26dca0c67486767ad996fe29869e06848f5d8bbe
2021-03-22 08:14:49 +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
f5ce0c371f Add new battery settings feature provider. am: 34fb874647
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13915239

Change-Id: Ica2285c297ddc740793bd3a0f0bca08b4f8ecd50
2021-03-22 05:45:46 +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
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
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
Arc Wang
5fa38bbba2 Merge changes from topic "revamp storage settings header - master"
* changes:
  Add option menu in StorageDashboardFragment
  Revamp Storage Settings header part
2021-03-20 15:31:21 +00: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
TreeHugger Robot
c46da1bd47 Merge "Add Media Management Apps activity in Special App Access" into sc-dev am: 2d932aa5fb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13824387

Change-Id: I88bd6372ba7041aee932f2bd9aea71150d6ef2aa
2021-03-19 01:47:24 +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
TreeHugger Robot
900fc6d178 Merge "Smart Router settings UI changes" into sc-dev am: cb64ea60c2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13877245

Change-Id: Ie23173ea18d3e9ed05d9067157640f937378f9fc
2021-03-18 07:17:39 +00:00
TreeHugger Robot
cb64ea60c2 Merge "Smart Router settings UI changes" into sc-dev 2021-03-18 06:43:16 +00:00
SongFerng Wang
04f42d146d Merge "Moving the error messages from slice to panel's subtitle" into sc-dev am: 45726b937b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13812558

Change-Id: I1b39d00f88fa1774a15f0b7ecd1b7e917da8641d
2021-03-18 05:10:21 +00:00
SongFerng Wang
45726b937b Merge "Moving the error messages from slice to panel's subtitle" into sc-dev 2021-03-18 04:58:50 +00:00
Peter Wang
66fd9dbad2 Added an option in reset menu in Settings to enable resetting Euicc data
only

Bug: 159650638
Fix: 159650638
Test: Local
Change-Id: Ia260b47a4dd0ddf0363740891b5e1d818c8631b7
Merged-In: Ia260b47a4dd0ddf0363740891b5e1d818c8631b7
2021-03-17 15:47:48 -07:00
Peter Wang
3091978e7a Merge "Fix coding styles for erase euicc only options" into sc-dev am: 3f7d415e2d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13894357

Change-Id: I72404bc62312ee671238323332b970fad54d1510
2021-03-17 22:20:04 +00:00
Peter Wang
3f7d415e2d Merge "Fix coding styles for erase euicc only options" into sc-dev 2021-03-17 22:09:04 +00:00
Colin Cross
1871042664 Merge "resolve merge conflicts of d42d9a41f6 to sc-dev" into sc-dev am: 321f413343
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13904045

Change-Id: I019ec2f2f5ed6ec8d2be519d821ee7f139af4bb3
2021-03-17 22:02:02 +00:00
Janis Danisevskis
5cef487b4b resolve merge conflicts of d42d9a41f6 to sc-dev
Change-Id: Ifa6a4af09d7cd45773a8c057416ab90fac23061e
2021-03-17 19:09:29 +00:00
Chiachang Wang
03c2ccba3e Merge "Replace hidden CM#isNetworkSupported() usage" into sc-dev am: 6f41bb5722
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13892870

Change-Id: I3162e0f749d8cd30e924ccbf843d17b23ee718cf
2021-03-17 15:31:31 +00:00
Chiachang Wang
6f41bb5722 Merge "Replace hidden CM#isNetworkSupported() usage" into sc-dev 2021-03-17 15:21:17 +00:00
SongFerngWang
0c86903ec6 Moving the error messages from slice to panel's subtitle
Bug: 180888831
Test: atest ProviderModelSliceTest
atest ProviderModelSliceHelperTest
atest NetworkProviderWorkerTest
atest InternetConnectivityPanelTest
make RunSettingsRoboTests -j

Change-Id: I4572c8ad15effab0c95feaeac6a99f5aaabf6f90
2021-03-17 22:49:31 +08:00
SongFerngWang
2166de23f3 Change the behavior of notifyAllowedNetworkTypesChanged.
Bug: 180903931
Test: atest AllowedNetworkTypesListenerTest.java
Change-Id: Ic94816415920bf25896ef2b198e228f369039c94
Merged-In: Ic94816415920bf25896ef2b198e228f369039c94
2021-03-17 21:20:21 +08:00
Arc Wang
ba79fe6676 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
2021-03-17 20:44:36 +08:00
Arc Wang
89e6d99daf 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
2021-03-17 20:33:37 +08:00
TreeHugger Robot
2bad0d6b35 Merge "[Settings] Use TelephonyManasger.registerTelephonyCallback instead of TelephonyManager.listen" into sc-dev am: c7d3c5f1be
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13815935

Change-Id: I9685a196017eef12618efd72d31421a5cc27f4e9
2021-03-17 10:44:22 +00:00
TreeHugger Robot
c7d3c5f1be Merge "[Settings] Use TelephonyManasger.registerTelephonyCallback instead of TelephonyManager.listen" into sc-dev 2021-03-17 10:30:48 +00:00
Chiachang Wang
ffbe4e9b1e Replace hidden CM#isNetworkSupported() usage
It's a refactor work for connectivity mainline module. The
hidden methods access is no longer allowed, so the usage for
isNetworkSupported() should be replaced. Settings use it to
check if device support telephony, wifi or ethernet service.
There are alternative methods to check if device supports such
features. Replace as it is.

Bug: 172183305
Test: m ; make RunSettingsRoboTests
Change-Id: I8f1d11558b1be575a0777ed195abe027e838cb74
2021-03-17 15:21:43 +08:00
Ivan Chiang
d01c81e483 Add Media Management Apps activity in Special App Access
Add a settings page to control the permission MANAGE_MEDIA in Special
App Access. Apps can launch it by ACTION_REQUEST_MANAGE_MEDIA.

Test: m -j RunSettingsRoboTests ROBOTEST_FILTER=MediaManagementAppsDetailsTest
Test: m -j RunSettingsRoboTests
Test: manual
Bug: 181112025
Change-Id: Id7587cf179b8c5adbfd6477ca9c2d4a20a9852bb
2021-03-17 14:36:20 +08:00
Peter Wang
2404806afb Fix coding styles for erase euicc only options
Bug: 159650638
Test: Build
Change-Id: I08bb8d9f73dbe6b9f18f36c45ae7652b36d422b2
2021-03-16 18:09:49 -07:00
Weng Su
68b0057f66 Smart Router settings UI changes
- Remove "AP band" preference

- Add "Maximize Compatibility" switch preference
  - Use bridged mode API for new devices (after P21)

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

Bug: 168052744
Test: manual test
atest WifiTetherMaximizeCompatibilityPreferenceControllerTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherSettingsTest

Change-Id: Ib74156c0fa6eccdd13239854047b1fb4e49a293c
2021-03-16 21:50:55 +08:00
Bonian Chen
203f0fe89d [Settings] Code refactor - remove unused import lines
Remove some unused import lines within source code based on
https://source.android.com/setup/contribute/code-style

Bug: 182867979
Test: build pass
Change-Id: I76dbcfa9e5b435b2838401dfee15b12f472d07d0
2021-03-16 10:24:24 +00:00
TreeHugger Robot
00128511e0 Merge "Update settings for app hibernation" into sc-dev am: a922c902f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13762606

Change-Id: I70d1671e6934821af56b2564e943c5812979af1b
2021-03-16 06:27:50 +00:00