Commit Graph

1128 Commits

Author SHA1 Message Date
Almaz Mingaleev
dd2a685756 Allow alternative time zone ID to be set device's zone.
If America/Godthab is set as device time zone, display it as if
America/Nuuk is chosen.
If time zone is known, but is not an alternative and not shown
in time zone picker, region will de derived from user's locale.

Bug: 155738410
Test: atest com.android.settings.datetime.timezone.model
Test: set persist.sys.timezone via adb and checked
Date & Time screen

Change-Id: I168fb4319e144dbe9e2496d06a681d4c09b411c0
2021-03-29 11:18:57 +01: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
Peter Wang
5babfac3d1 Fix coding styles for erase euicc only options
Bug: 159650638
Test: Build
Change-Id: I08bb8d9f73dbe6b9f18f36c45ae7652b36d422b2
Merged-In: I08bb8d9f73dbe6b9f18f36c45ae7652b36d422b2
2021-03-25 11:13:29 -07:00
Marie Matheson
24ef404cc4 Adds SecuritySetting feature for providing an alternative SecuritySettings fragment am: 4b302a166e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13959948

Change-Id: Ic64333aafe28c21b8d1657f3d264604c1ea1a2e3
2021-03-25 14:00:21 +00: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
14db8ee16e Merge "Fix resource problem in PrivateVolumeForgetTest" into sc-dev am: 89222adb7f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13989775

Change-Id: I6c77ad950d3744784ed365afd8de05c8807f60df
2021-03-25 09:24:58 +00:00
Weng Su
c3b036845e Merge "Correct the defined value of Maximize compatibility" into sc-dev am: 4675222987
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13981642

Change-Id: I09f264fb071f7af47c461bc19f246cc394c519a4
2021-03-25 09:22: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
4b8a6cd4b8 Merge "Removed unused import" am: 3fbb8612f5 am: 3cac950712 am: 204f35dc58 am: fe042ac08e
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1652770

Change-Id: I3daef123a7aee6810f4512f099c18c7fa22eb533
2021-03-25 05:47:51 +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
d2d32a8dc0 Merge "Fix HibernationSwitchPreferenceControllerTest" into sc-dev am: bad7c091d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13986126

Change-Id: If6b6de316c761e30ffca47a8174bd4a93b563e38
2021-03-24 20:55:30 +00:00
Kevin Han
bad7c091d6 Merge "Fix HibernationSwitchPreferenceControllerTest" into sc-dev 2021-03-24 20:37:03 +00:00
Ahaan Ugale
861a58ab89 Merge "Autofill Settings: Display the number of saved passwords." into sc-dev am: a8df0386ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13803855

Change-Id: I7e0be679fd52df2f3c5fd17779166521801b5a14
2021-03-24 18:55:51 +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
fd8f6c9159 Merge "Fix resource problem in SettingsSliderPreferenceControllerTest" into sc-dev am: 7ed6ce93da
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13981625

Change-Id: I138a8d5dd0479b6d89987c49822f0023b6e67580
2021-03-24 11:32:25 +00: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
d64dff2c98 Merge "Update summary based on hibernated apps number" into sc-dev am: 59aa4f9cb1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13955152

Change-Id: I2eaf37a821808a3797d0cf620ad9eeb852c01651
2021-03-24 06:48:01 +00: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
Bonian Chen
90bb37b6aa Merge "[Settings] Support getSystemService(Class<T>)" into sc-dev am: 8debbfa8a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13973145

Change-Id: Iccfaf2ad15c5915d998ec291fcddd815bae6047e
2021-03-24 04:44:09 +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
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