Commit Graph

48899 Commits

Author SHA1 Message Date
Candice Lo
48999d3808 Doing null check before generating Extra Dim tooltip
Since the lifecycle of controller is independent of that of preference,
we do null check on the switch to avoid generating tooltip from the
switch when it is not ready. The fix is a temporary solution for the
issue and we would like to move the logic of tooltip to systemUI to
match the general view's lifecycle in the future.

Bug: 286810561
Test: manually - check the tooltip won't be shown and also won't cause exception after rotating the phone. (The switch view has not been created if it is out of screen.)
Test: manually - attach video to the bug
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityQuickSettingsPrimarySwitchPreferenceControllerTest
Change-Id: I75d810e4b85baf06d57a3e31797a55daac791b79
2023-06-17 09:37:04 +00:00
Candice Lo
b66f6b67c8 Doing null check before generating Font Size tooltip
Since the lifecycle of controller is independent of that of preference,
we do null check on the seekbar to avoid generating tooltip from the
seekbar when it is not ready. The fix is a temporary solution for the
issue and we would like to move the logic of tooltip to systemUI to
match the general view's lifecycle in the future.

Bug: 279549685
Test: manually - check the tooltip won't be shown and also won't cause exception after rotating the phone. (The seekbar view has not been created if it is out of screen.)
Test: manually - attach video to the bug
Test: make RunSettingsRoboTests ROBOTEST_FILTER=PreviewSizeSeekBarControllerTest
Change-Id: I50111f0cc59cad4401ab67b06cd62e9067e8ed76
2023-06-17 09:36:40 +00:00
TreeHugger Robot
7d941f3e34 Merge "[Settings] Avoid NPE when user enter WifiCallingSettings back and forth" into udc-d1-dev am: 1765c1dc6e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23695884

Change-Id: Ic8c4d4ddb031a1d47ac359b78ba50b33048fab1b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-17 07:05:59 +00:00
Treehugger Robot
d9c0cf79e8 Merge "[Settings] Imporve MMS message UI state update" into udc-d1-dev am: 8182348d5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23669450

Change-Id: Ic3a17c6731869827bfff43d8a5de227ea0f9a657
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-17 07:05:29 +00:00
Matías Hernández
f5355dbb51 Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99 am: 2b1faa0aea am: dcbe38baa9 am: e8cfc9cb3d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I152c75f7bde652a89db3780858914d31751b2ddd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-17 07:04:00 +00:00
Treehugger Robot
7abcb94693 Merge "Fix Hotspot & tethering settings crash" into udc-d1-dev am: 3494d09de4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23691725

Change-Id: I2cc82b781919c303a70bcdb39c162d5a68fa7e34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-17 07:01:44 +00:00
Yi-Ling Chuang
2a9b9cfd4c Update BatterySettingsFeatureProvider interface
Added context to each method for more flexibility.

Bug: 276399056
Test: robotests
Change-Id: I0bbf8841775bc2f584d66c59c2c78ed4e5c951c2
2023-06-17 12:49:46 +08:00
Julia Tuttle
b23136041d Fix colors in importance and conversation priority preferences
This would have been simpler and faster, but the ChannelPanelActivity
was giving me a context where Material colors always inflated in light
theme even if the device was in dark theme, so I had to work around it.

On the plus side, whoever next needs to change these colors will find
them neatly organized in themes.xml!

Bug: 284380876
Test: manual
Change-Id: I2eee877fe44d307a96d60168d0317444ff002669
2023-06-16 19:17:09 +00:00
Chaohui Wang
c91d017080 [LE Broadcast] Fix crash when scan QR code
Crash happens when rotated screen.

QrCodeScanModeFragment should only have default constructor.

Remove unused params to fix.

To start this page,
adb shell am start \
    -a android.settings.BLUETOOTH_LE_AUDIO_QR_CODE_SCANNER

Fix: 287363885
Test: Manually
Change-Id: I3c4bcfdb8ae6ddf750e16d8e7565cb9d45d11788
2023-06-16 16:10:53 +00:00
Tetiana Meronyk
e992927655 Merge "Add padding to dialog" into udc-qpr-dev 2023-06-16 11:56:04 +00:00
Chaohui Wang
879ff5f271 Merge "Migrate PlatformCompat App List to SPA" into udc-qpr-dev 2023-06-16 07:59:01 +00:00
Treehugger Robot
9718f0e04f Merge "Guard slices from being requested by guest user" into udc-qpr-dev 2023-06-16 01:14:40 +00:00
Treehugger Robot
2f87be66ce Merge "Shutdown secondary SAP automatically" into udc-d1-dev am: 57522f0fcc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23680143

Change-Id: I6b737218b4bec1500ea31218c0b7d13fb0a57f42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 22:15:59 +00:00
Grace Cheng
71a57d8cec Merge "Fix NPE in updateAddPreference" into udc-d1-dev am: 8ba960014c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23672674

Change-Id: Ibde63cfed809364db4fdebdc97b45b7dadce5912
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 20:50:58 +00:00
Tetiana Meronyk
4899e50224 Add padding to dialog
Bug: 287265141
Test: on device with multiple admins enabled (default for HSUM) create a new
user and open User details view. Toggle Make this user an admin on/off.
Observe increased padding.

Change-Id: I216a91c4685eb12986cc4c61ae7be439358f55b2
2023-06-15 13:20:17 +00:00
TreeHugger Robot
a1fd330fb5 Merge "Fix bluetooth settings pairing page stuck" into udc-qpr-dev 2023-06-15 09:42:19 +00:00
Chaohui Wang
ed6d6c9e0f Migrate PlatformCompat App List to SPA
So hidden modules are not shown in the list.

This will also improve the developer experience.

Bug: 273913035
Test: Manually with App Compatibility Changes
Test: Unit test
Change-Id: Ic78a51819159a0f848db6173f751b1be8c6b1e70
2023-06-15 09:37:11 +00:00
Chaohui Wang
9aa7466cf2 Merge "Remove primaryUserOnly param from UsageStats" into udc-qpr-dev 2023-06-15 09:29:39 +00:00
Chaohui Wang
bb47f32011 Fix bluetooth settings pairing page stuck
There is heavy work to do when add device to list in the
DeviceListPreferenceFragment, off load these work from main thread
to solve the issue.

Make devicePreferenceMap a ConcurrentHashMap to avoid potential race
condition.

Also no longer use getCachedPreference(key) since we not put anything
into the cache, the fallback flow is always used.

Also in BluetoothDevicePreference.onPreferenceAttributesChanged(), move
more heavy work to background thread.

Using System.currentTimeMillis() to sort devices could cause flaky
because System.currentTimeMillis() could be same for different device,
use AtomicInteger instead.

Fix: 286628533
Test: Following the step in bug
Change-Id: Ia9750adb6b4c1424d084381e9d7c2ca8e7912391
2023-06-15 08:43:17 +00:00
Mill Chen
d4eecf6132 Guard slices from being requested by guest user
According to patch of A-231987122, AOSP restricts app to modify relevant
mobile settings when user is a guest. This change intends to prevent the
slices related to mobile settings from being requested by guest user.

Bug: 278616139
Bug: 277333776
Bug: 262244832
Bug: 278616520
Bug: 278615120
Test: robotests
Change-Id: I4dc4bbfdb5cf76e188e6f62ebfd74ef6fa2fe33b
2023-06-15 14:29:01 +08:00
Rhed Jao
e1c9d65cda Merge "[Settings] Add a verification flow for exiting repair mode" into udc-qpr-dev 2023-06-15 04:55:45 +00:00
TreeHugger Robot
1765c1dc6e Merge "[Settings] Avoid NPE when user enter WifiCallingSettings back and forth" into udc-d1-dev 2023-06-15 04:07:32 +00:00
Treehugger Robot
8182348d5c Merge "[Settings] Imporve MMS message UI state update" into udc-d1-dev 2023-06-15 03:02:41 +00:00
Chaohui Wang
8617f63823 Merge "Call onViewCreated in DashboardFragment" into udc-qpr-dev 2023-06-15 03:00:52 +00:00
tom hsu
8bb09238bb [Settings] Avoid NPE when user enter WifiCallingSettings back and forth
Bug: 277833102
Test: Manual test
Change-Id: Ifd3272ddf8b8a27fc7772d860653df2c33a3df7b
2023-06-15 02:58:42 +00:00
Rhed Jao
b7a4a7daa4 [Settings] Add a verification flow for exiting repair mode
Handles the ACTION_CONFIRM_REPAIR_MODE_DEVICE_CREDENTIAL
intent to launch the confirm device credential activity for
users to exiting repair mode. The activity passes a special
user id USER_REPAIR_MODE to the framework and verify credentials
that the user enrolled in normal mode.

Bug: 277561275
Test: am start -a android.app.action.PREPARE_REPAIR_MODE_DEVICE_CREDENTIAL
      settings put global repair_mode_active 1
      am start -a android.app.action.CONFIRM_REPAIR_MODE_DEVICE_CREDENTIAL
      The credential is verified successfully.
Change-Id: I9ffe32f9925ee2b990c49d5674d27196a4c9edf7
2023-06-15 02:14:41 +00:00
Hao Dong
61659799de Merge "Wait for systemui udfps overlay ready to show settings udfps enroll view." into udc-qpr-dev 2023-06-15 01:22:22 +00:00
Matías Hernández
e8cfc9cb3d Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99 am: 2b1faa0aea am: dcbe38baa9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: Ic1d0d1cda4e35705215fe4268974f304350cfbc0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 16:37:43 +00:00
Matías Hernández
dcbe38baa9 Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99 am: 2b1faa0aea
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I69d2ef43afb54ce3b9d141d4f676b688dd1c5c59
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 15:52:58 +00:00
Matías Hernández
2b1faa0aea Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I715da9406bd9d3fe88ff7b5353db1780109880e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 15:09:53 +00:00
Matías Hernández
0aa241be99 Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I8cd7cc9605b3728f9f96c3479d17aa1b362d9cda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 14:22:10 +00:00
Matías Hernández
a49e14f8ff Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I840d7836ae899bcd40eafc772b96c9460c3f8a02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 13:42:07 +00:00
Matías Hernández
50df60c93c Don't hide approved NLSes in Settings am: ff255c6eda
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I42099e38ef7b479b9339b545fe8d12d3bbe95112
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 12:57:15 +00:00
Treehugger Robot
3494d09de4 Merge "Fix Hotspot & tethering settings crash" into udc-d1-dev 2023-06-14 12:00:21 +00:00
Weng Su
6a20a8c5df Fix Hotspot & tethering settings crash
- Cannot omit addPreferencesFromResource even if UI is restricted

Bug: 287172382
Test: manual test
atest -c WifiTetherSettingsTest

Change-Id: I1f5c0215a635fddefe7eaa20c1d765634b505121
2023-06-14 18:59:30 +08:00
tom hsu
0a4458a9d1 [Settings] Imporve MMS message UI state update
- When activity entered from outside, the MMS message is not udpated.
   Therefore, add a update behavior to onStart()

Bug: 281566495#5
Test: Manual test passed
Test: atest passed.
Change-Id: I3e5994ad0dbcdd1b78ae3e10e3cb564ce210e93e
2023-06-14 12:28:59 +08:00
Chaohui Wang
eb4fea1a36 Call onViewCreated in DashboardFragment
To let fragment's view lifecycle owner passed in to controllers.

For UI usage, view lifecycle owner is the best choice, controller could
use this lifecycle owner to observe events and do UI related works.

Usage DataSaverController as first example.

Bug: 287005021
Test: Manually for DataSaverController
Change-Id: Id965ea3a24d61f4d0ec6735632944f41f72ba06a
2023-06-14 12:22:12 +08:00
Treehugger Robot
57522f0fcc Merge "Shutdown secondary SAP automatically" into udc-d1-dev 2023-06-14 03:35:18 +00:00
Zaiyue Xue
8c25fe4c60 Merge "Don't load battery entry names and icons in offline job to improve memory usage." into udc-dev 2023-06-14 03:01:25 +00:00
Weng Su
20fd4a46c8 Shutdown secondary SAP automatically
- If the "Extend compatibility" preference is not supported, then set to shutdown secondary SAP automatically within the "Turn off hotspot automatically" preference.

Bug: 285914977
Test: manual test
atest -c WifiTetherAutoOffPreferenceControllerTest

Change-Id: I405107a4782a6f023442d196d0fca27515aab00e
2023-06-14 05:51:43 +08:00
Wenhui Yang
d56f96aaba Merge "Fix face model delete message" into udc-d1-dev 2023-06-13 20:43:42 +00:00
Grace Cheng
f58714496a Fix NPE in updateAddPreference
Update mAddFingerprintPreference to avoid NPE

Fixes: 286495189
Test: Rotate screen during first fingerprint enrollment, complete enrollment, and observe no crash
Change-Id: Id7edde492168b467360c6c99b326721cd883bba8
Merged-In: Id7edde492168b467360c6c99b326721cd883bba8
2023-06-13 19:23:04 +00:00
Wenhui Yang
08d11518a8 Fix face model delete message
Add new strings for face model deletion when fingerprint unlock is available.

Test: Manual - test on devices and observe the error message is correct.
Fixes: 283122570
Change-Id: I0511e58d030b8b63391d8406bfc0447fe33fa9fc
(cherry picked from commit 5e71aee4cd)
2023-06-13 18:37:26 +00:00
Grace Cheng
2365ad895a Fix NPE in updateAddPreference
Update mAddFingerprintPreference to avoid NPE

Fixes: 286495189
Test: Rotate screen during first fingerprint enrollment, complete enrollment, and observe no crash
Change-Id: Id7edde492168b467360c6c99b326721cd883bba8
2023-06-13 16:52:51 +00:00
Tetiana Meronyk
38b627b69c Merge "Remove unused parameter from createDialog method in User Info edit dialog" into udc-qpr-dev 2023-06-13 09:36:23 +00:00
tom hsu
5c5a39adbe [Settings] Fix MMS message UI is no consistency between UI and real state. am: 5216eeaaec
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23655882

Change-Id: Id741c5c75d5982da0ceae3ceef767858e2bcf462
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-13 08:58:46 +00:00
tom hsu
5216eeaaec [Settings] Fix MMS message UI is no consistency between UI and real state.
Bug: 285253872
Bug: 281566495
Test: Manual test passed.
Change-Id: I805490fd5c4417e88c38a047f99ef626c16f600a
2023-06-13 06:01:25 +00:00
Rhed Jao
cc1fe61339 Merge "Passing the writing repair mode password flag to verify credential api" into udc-qpr-dev 2023-06-13 02:14:22 +00:00
Wenhui Yang
bfa2feb316 Merge "Fix fingerprint unlock stuck after renaming" into udc-qpr-dev 2023-06-13 01:02:42 +00:00
Wenhui Yang
14b115177c Merge "Fix face re-enroll stuck for work profile" into udc-qpr-dev 2023-06-13 01:02:08 +00:00