Commit Graph

16192 Commits

Author SHA1 Message Date
Lais Andrade
82a3146c23 Merge "Create separate On/Off string resources for Vibration & haptics" into tm-dev am: 9c8d1e94fb am: c09c49fcf2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17914337

Change-Id: I4a46a73c2901720829056efa3c5d70ad89fb1114
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 00:15:40 +00:00
Weng Su
ff3ced78f9 Merge "Check Wi-Fi permissions for QrCode scanner" into tm-dev am: b6629ab55b am: 37169b93d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17944025

Change-Id: I398c19e8f68b32f47742c0c864ae57b69e30c426
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 23:49:41 +00:00
Lais Andrade
9c8d1e94fb Merge "Create separate On/Off string resources for Vibration & haptics" into tm-dev 2022-04-27 13:54:13 +00:00
Weng Su
b6629ab55b Merge "Check Wi-Fi permissions for QrCode scanner" into tm-dev 2022-04-27 09:33:26 +00:00
TreeHugger Robot
c28169adb9 Merge "Revert "[Settings] Code refactor for combining TelephonyCallback with Lifecycle"" into tm-dev 2022-04-27 05:56:10 +00:00
Bonian Chen
3bddc056d8 Revert "[Settings] Code refactor for combining TelephonyCallback with Lifecycle"
This reverts commit aeac0619df.

Reason for revert: merge failure in other branches

Change-Id: I601e674be41fc5d4c97bd8db54ab1982377455f1
2022-04-27 00:03:20 +00:00
Bonian Chen
73c8e2f45a Merge "[Settings] Code refactor for BroadcastReceiver under Lifecycle" into tm-dev 2022-04-26 10:25:31 +00:00
Bonian Chen
3fc05a917e Merge "[Settings] Code refactor for combining TelephonyCallback with Lifecycle" into tm-dev 2022-04-26 10:25:02 +00:00
Chaohui Wang
815ee3779b Merge "Update Personal / work selection UI." into tm-dev am: 1a39660de0 am: 334335bc6a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17716523

Change-Id: I87294478784f6518f58e57aaeba0eef5af5b0297
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-26 07:26:55 +00:00
Weng Su
71b9cc0e32 Check Wi-Fi permissions for QrCode scanner
- Launched package require ACCESS_WIFI_STATE and ACCESS_FINE_LOCATION permissions to get results

Bug: 187176859
Test: manual test
make RunSettingsRoboTests \
    ROBOTEST_FILTER=WifiDppQrCodeScannerFragmentTest

Change-Id: Ie80c4e5b3a5863749de518e4736873390478816e
2022-04-26 07:10:57 +00:00
Chaohui Wang
1a39660de0 Merge "Update Personal / work selection UI." into tm-dev 2022-04-26 06:34:37 +00:00
Hugh Chen
00a8568b1b Merge "Implement advanced vpn ui in vpn settings" 2022-04-26 05:33:27 +00:00
Lais Andrade
cc8790f7b3 Create separate On/Off string resources for Vibration & haptics
Some translators need to be able to adapt the text for On/Off preference
state to match the preference title "Vibration & haptics", which
requires a different inflection and plural form on some languages.

This change separates this resource string from the more generic one
that was used before to allow this flexible translation.

Fix: 228342641
Fix: 229060423
Test: VibrationPreferenceControllerTest
Change-Id: Ib46b3e0d0a980ff57e91f55c73348c440327bad7
2022-04-25 17:15:39 +01:00
Chaohui Wang
f250493787 Update Personal / work selection UI.
Implement the new-look by using AlertDialog's
custom title and custom view.
Using the RecyclerView so we can display profile
horizontally.

Bug: 174626616
Test: manual & robolectric
Change-Id: I9f5a7685d9217fc62e01799ad73f9b9a3ddbf19a
2022-04-25 19:12:38 +08:00
SongFerng Wang
87a5e19b64 Merge "Gray out the network mode UI before the carrier config is ready" into tm-dev am: 564c88485a am: a7a5061f08
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17903598

Change-Id: I65b36d6e24bb218870f27dd887b316b2d52857f1
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-25 08:13:13 +00:00
Prabal Singh
60615cbf3b Merge "Use settingslib util methods for work policy info" into tm-dev am: 591c2c3b38 am: 9fa00378f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17915088

Change-Id: I8f065a47384084cee16321c2ebe9ab61aa4eaa30
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-25 08:13:05 +00:00
Hugh Chen
cf210dd00b Implement advanced vpn ui in vpn settings
Bug: 220684478
Test: atest -c VpnSettingsTest

Change-Id: If89de16d02cb8b1f387b8f388f8fcf82ad39066b
2022-04-25 07:59:13 +00:00
SongFerng Wang
564c88485a Merge "Gray out the network mode UI before the carrier config is ready" into tm-dev 2022-04-25 07:40:43 +00:00
Prabal Singh
67007e5933 Use settingslib util methods for work policy info
Bug: b/229889270
Test: make ROBOTEST_FILTER=EnterprisePrivacyFeatureProviderImplTest RunSettingsRoboTests -j40
Change-Id: I0d968732a4dd601955e18b2ebb2af365638b450f
2022-04-23 20:35:41 +01:00
Bonian Chen
cc7474d50d [Settings] Fix flaky presubmit failure
Bug: 229689535
Test: unit test
Change-Id: I0fc193d6f34cfff13d15487ad0c1f646f67d4c97
2022-04-23 17:53:14 +00:00
SongFerngWang
b76feffe4f Gray out the network mode UI before the carrier config is ready
Bug: 202167671
Test: atest EnabledNetworkModePreferenceControllerTest
Change-Id: Ib502ac19ea2c19dae95025302dd82aa2b1c7ff88
2022-04-22 19:28:13 +08:00
Bonian Chen
2615ee4097 Merge "[Settings] Code refactor for monitoring service state" 2022-04-22 10:50:47 +00:00
Bonian Chen
aeac0619df [Settings] Code refactor for combining TelephonyCallback with Lifecycle
This is a helper class which may support monitoring the
TelephonyCallback under the condition of Lifecycle state STARTED or
RESUMED.

Bug: 229689535
Test: unit test
Change-Id: I6d26bee604d9559e207e107b2f26583f700f8e0a
(cherry picked from commit 7c5259efad)
2022-04-22 10:39:04 +00:00
Bonian Chen
6a2479e7d1 Merge "[Settings] Code refactor for monitoring voice call status" 2022-04-22 09:37:08 +00:00
Bonian Chen
e7de4a415d [Settings] Code refactor for monitoring service state
This is for monitoring the status of service state when Lifecycle state
STARTED or RESUMED.

Bug: 229689535
Test: unit test
Change-Id: If6bac5c04caae67d6293c5a69e3130789e9e588e
2022-04-22 13:54:54 +08:00
TreeHugger Robot
49cc66afd3 Merge "[Settings] Code refactor for async Lifecycle listening" into tm-dev 2022-04-22 05:50:05 +00:00
Bonian Chen
887ec6c32c [Settings] Code refactor for monitoring voice call status
This is for monitoring the status of voice call when Lifecycle state
STARTED or RESUMED.

Bug: 229689535
Test: unit test
Change-Id: Ifa3e0c5aa474a2539ad66338ea8c3564ea33744e
2022-04-21 11:13:48 +08:00
Bonian Chen
7c5259efad [Settings] Code refactor for combining TelephonyCallback with Lifecycle
This is a helper class which may support monitoring the
TelephonyCallback under the condition of Lifecycle state STARTED or
RESUMED.

Bug: 229689535
Test: unit test
Change-Id: I6d26bee604d9559e207e107b2f26583f700f8e0a
2022-04-21 11:04:44 +08:00
Bonian Chen
81d230b250 [Settings] Code refactor for BroadcastReceiver under Lifecycle
This is an implementation of BroadcastReceiver which supported by
LifecycleCallbackConverter.
Registration of BroadcastReceiver only take place when Lifecycle in
RESUME status.

Bug: 229689535
Test: unit test
Change-Id: Ia2af82d5cbb391034627e5259a9e0c8683a0c5a1
(cherry picked from commit c2030898ef)
2022-04-20 16:54:41 +00:00
Bonian Chen
ee0756f684 Merge "[Settings] Code refactor for BroadcastReceiver under Lifecycle" 2022-04-20 16:54:04 +00:00
PETER LIANG
b579c1aa43 Merge "Should popup the confirmation toast after clicking the reset button." into tm-dev am: 8cb0439d9c am: cc4af05607 am: 37fa12e2d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17822267

Change-Id: I078115b77edc9cd16a8ac4c5eb56f88b2048f2d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 14:07:51 +00:00
PETER LIANG
37fa12e2d6 Merge "Should popup the confirmation toast after clicking the reset button." into tm-dev am: 8cb0439d9c am: cc4af05607
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17822267

Change-Id: I74bb43797299b183a40f9050b6256e768361c7d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 13:20:24 +00:00
PETER LIANG
cc4af05607 Merge "Should popup the confirmation toast after clicking the reset button." into tm-dev am: 8cb0439d9c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17822267

Change-Id: I14be163454ca16655f88e1d9195e891e065c21bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 13:01:07 +00:00
Bonian Chen
3856ac4be9 [Settings] Code refactor for async Lifecycle listening
This is an extension of LifecycleCallbackAdapter.
A postResult(T) and a Consumer<T> is designed for supporting pass result
back to UI thread, and is invoked only when required.

Bug: 229689535
Test: unit test
Change-Id: I0ef5afc31cd23aa865a2dd1d05f9b212242c2e41
(cherry picked from commit 5d2a76cbb4)
2022-04-20 12:47:39 +00:00
Bonian Chen
37a326bd3e [Settings] Code refactor for Lifecycle listening
This is an abstract class for building a set of callback behavior
based on Lifecycle status change.

Through extending this class, the implemented methods are invoked
only when required.

Bug: 229689535
Test: unit test
Change-Id: I7534393546f821738a63ebde121a5a88ee03b23b
(cherry picked from commit 9a4c66d23b)
2022-04-20 12:46:26 +00:00
Bonian Chen
3cf84f393c Merge "[Settings] Code refactor for async Lifecycle listening" 2022-04-20 12:26:17 +00:00
Bonian Chen
5d2a76cbb4 [Settings] Code refactor for async Lifecycle listening
This is an extension of LifecycleCallbackAdapter.
A postResult(T) and a Consumer<T> is designed for supporting pass result
back to UI thread, and is invoked only when required.

Bug: 229689535
Test: unit test
Change-Id: I0ef5afc31cd23aa865a2dd1d05f9b212242c2e41
2022-04-20 16:45:08 +08:00
Peter_Liang
b833fe1bad Should popup the confirmation toast after clicking the reset button.
Goal: Users may not notice what the change after resetting all settings configs in the Text and reading options. So we will use the toast to give nice feedback for them.

Fix: 220126995
Test: make RunSettingsRoboTests  ROBOTEST_FILTER=TextReadingPreferenceFragmentTest
Change-Id: Ife42b0c9d8a0241d7b8c3e5dbe7f9f1e2a6d759a
2022-04-20 15:39:11 +08:00
Arc Wang
4eafad5f36 Merge "Fix ManageStoragePreferenceController always consume click event" into tm-dev am: 96491e1ea9 am: f94760e74c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17799722

Change-Id: Ia4fe33d0b2fa089b84d19abd39d5b61db1a3b4c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 01:49:50 +00:00
Arc Wang
1cdcca0064 Merge "Fix ManageStoragePreferenceController always consume click event" into tm-dev am: 96491e1ea9 am: 5202c0db9e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17799722

Change-Id: I7224cc93d6057a3afb3b451f5a9b50d6155fcd40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 01:49:21 +00:00
Arc Wang
f94760e74c Merge "Fix ManageStoragePreferenceController always consume click event" into tm-dev am: 96491e1ea9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17799722

Change-Id: I7aa4104198b2210aad9b65cb5834ebc7eb0e2784
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 01:17:52 +00:00
Arc Wang
96491e1ea9 Merge "Fix ManageStoragePreferenceController always consume click event" into tm-dev 2022-04-20 00:54:15 +00:00
TreeHugger Robot
a5d6861390 Merge "Update auto-rotate strings/toggles for better accessibility" into tm-dev am: 07950adad9 am: 3f7f5386c5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17767144

Change-Id: I56f2d65fadf3e9a0143e55532f71501a5d804dcb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 00:32:23 +00:00
TreeHugger Robot
3f7f5386c5 Merge "Update auto-rotate strings/toggles for better accessibility" into tm-dev am: 07950adad9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17767144

Change-Id: I283f489b4422f5cbab61626214e575ac2255d25c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 00:24:08 +00:00
TreeHugger Robot
07950adad9 Merge "Update auto-rotate strings/toggles for better accessibility" into tm-dev 2022-04-19 23:44:38 +00:00
Abel Tesfaye
238b2cc721 Update auto-rotate strings/toggles for better accessibility
This change will update some strings for smart-auto-rotate and replace
the activity based switchbar with SettingsMainSwitchPreference. The
switchbar had to be replaced to allow the new text to appear above the main toggle.

Test: locally with flame and with resolver service enabled & disabled

Bug: 220182618
Change-Id: I4b60bf006bdde9e47b33a52c7719ec770caf5746
Merged-In: I4b60bf006bdde9e47b33a52c7719ec770caf5746
2022-04-19 21:21:34 +00:00
Bonian Chen
c2030898ef [Settings] Code refactor for BroadcastReceiver under Lifecycle
This is an implementation of BroadcastReceiver which supported by
LifecycleCallbackConverter.
Registration of BroadcastReceiver only take place when Lifecycle in
RESUME status.

Bug: 229689535
Test: unit test
Change-Id: Ia2af82d5cbb391034627e5259a9e0c8683a0c5a1
2022-04-19 23:25:14 +08:00
Neil Fuller
8bdd44b67e Merge "Fix logic used for auto time zone settings" 2022-04-19 15:21:40 +00:00
Arc Wang
ea4260c0e7 Fix ManageStoragePreferenceController always consume click event
ManageStoragePreferenceController should only consume click
event when its preference key matches the key of the clicked
preference.

Bug: 228970667
Test: atest ManageStoragePreferenceControllerTest
Change-Id: Ia6c62cf457fc4cadc27dc160dbd9b04ec3392d68
2022-04-19 17:35:05 +08:00
TreeHugger Robot
b0f783b29d Merge "[Settings] Code refactor for Lifecycle listening" 2022-04-19 08:54:35 +00:00