Commit Graph

19316 Commits

Author SHA1 Message Date
Chaohui Wang
d42cc8e5e2 Fix DataUsagePreferenceController ANR
Offload calculation work from main thread to fix.

Fix: 286082055
Test: manual - on Mobile Settings page
Test: unit test
Change-Id: I7865823d6af2c812afa35d047bd79b60ae4b0fb7
2023-07-04 12:06:53 +08:00
Daniel Huang
114d068fbb Merge "Log metrics for PK settings topics" into udc-qpr-dev 2023-07-04 02:26:13 +00:00
Vania Januar
ebc0b9c323 Do not show a summary in Tail button preferences if no app found
Bug: 289054758
Test: StylusDevicesControllerTest
Change-Id: I985194b2e64d36844a9b88f19394db2728ea70e4
2023-07-03 14:44:59 +01:00
Allen Su
5d207a7b4b Merge "[Panlingual]Log metrics for App's locale from the suggested" into udc-qpr-dev 2023-06-30 16:08:25 +00:00
Treehugger Robot
dc98948cc1 Merge "Check P2P channel before requesting network info" into udc-qpr-dev 2023-06-30 14:48:12 +00:00
Michael Mikhail
c156b6c427 Merge changes from topic "cherrypick-volume-gar-chain-" into udc-qpr-dev
* changes:
  Trigger talkback for notification volume change
  Add content description to volume title in settings.
2023-06-30 12:56:45 +00:00
tom hsu
0b3da89a91 [Settings] Fix inactive SIM show display name with subectiption id.
- Cached active SIM' display name with last 4 digits phone number to
   avoid that this active SIM change to inactive SIM then show the
   display name with subscription id.

Bug: 271567615
Test: Manual test passed
Test: atest passed
Change-Id: I119d60ab4e92b1f04fb42f96df10bc81aa378a7c
2023-06-30 05:51:40 +00:00
Quang Anh Luong
36d71f8785 Check P2P channel before requesting network info
WifiP2pSettings requests network info from WifiP2pManager whenever it
gets onDeviceInfoAvailable, but sChannel may be null causing an
IllegalArgumentException. Check that sChannel is not null before
requesting network info.

Bug: 289004627
Test: atest WifiP2pSettingsTest
Change-Id: Ied8c3f8a894683d7b8e368e5c52343adb7d05e4b
2023-06-30 12:21:30 +09:00
Hao Dong
04b1932b25 Merge "Fix pattern rotation header text." into udc-d1-dev 2023-06-29 23:52:00 +00:00
Hao Dong
72f2058d3e Merge "Fix Fingerprint enrollment UI when display size is largest." into udc-d1-dev 2023-06-29 23:51:50 +00:00
Jason Chang
c0f0b0ca1a Fix the “screen lock option” and password restriction view are
in the wrong position on PIN/Password/Pattern in the landscape mode.

1. Move the description position under the GlifLayout header
2. Move the position "Screen lock options" button under the
GlifLayout header

Bug: 272676038
Bug: 285271342

Test: manully test with reproducible steps:
STEPS TO REPRODUCE:
1. Go through the setup flow
2. Continue steps until “set pin” page
3. The “screen lock option” is in the wrong position

Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings
.password.SetupChooseLockPasswordTest"

Change-Id: I24464e6b7e93f20abbeb59426919ed7fec5c7cbb
2023-06-29 07:11:42 +00:00
Allen Su
c871c5654d [Panlingual]Log metrics for App's locale from the suggested
Bug: 258128535
Test: atest AppLocalePickerActivityTest
Change-Id: I007c0e76d8b88f08518ba2696d42bd1db194f5b7
Merged-In: I007c0e76d8b88f08518ba2696d42bd1db194f5b7
2023-06-29 03:44:11 +00:00
Shawn Lin
f733b7b0ff Merge "Fix lock pattern is truncated during SUW in folded state" into udc-qpr-dev 2023-06-29 03:40:36 +00:00
Matías Hernández
e20f52a05a Merge "Settings: don't try to allow NLSes with too-long component names" into udc-dev am: 4d34eb2c7a am: aaddfd88e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23726247

Change-Id: I8fc3a7b239ce0545b34eafc860df72a42cfd2e05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 18:39:16 +00:00
Matías Hernández
aaddfd88e9 Merge "Settings: don't try to allow NLSes with too-long component names" into udc-dev am: 4d34eb2c7a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23726247

Change-Id: If35fbb5c16a642b56de29012ce43ecd7f068d5b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 17:14:55 +00:00
Shawn Lin
a2e032bb8e Fix lock pattern is truncated during SUW in folded state
Remove the bottom margin of the header view.

Bug: 285290323
Test: 1. Go through SUW
      2. Select lock pattern
      3. Check if UI truncated
Test: m RunSettingsRoboTests ROBOTEST_FILTER=
      com.android.settings.password.SetupChooseLockPatternTest
Change-Id: I48ac3d897e6b876bd7a1c325cc4a5e797e140da2
2023-06-28 06:52:40 +00:00
Hao Dong
7b99d92464 Fix pattern rotation header text.
Bug: 278055194
Test: atest ChooseLockPatternTest
Change-Id: I36ec325b46d7a7f583d94dc26f9962cadc3874cd
Merged-In: I36ec325b46d7a7f583d94dc26f9962cadc3874cd
2023-06-27 17:50:15 +00:00
Hao Dong
2ca3f3232c Fix Fingerprint enrollment UI when display size is largest.
1. Remove land/udfps_enroll_enrolling and use the default land layout
instead. Swap header and content when necessary to avoid overlap.
2. Add UdfpsEnrollEnrollingView.java

Test: manual test - 1. Set system display and font size largest
	            2. Launch fingerprint enrollment and check UI.
Test: atest FingerprintEnrollEnrollingTest
Bug: 269060514
Bug: 283169056
Change-Id: Ifbe6c92c4213979952f2f89a1cd595c9c4bff6ec
Merged-In: Ifbe6c92c4213979952f2f89a1cd595c9c4bff6ec
2023-06-27 17:48:16 +00:00
Michael Mikhail
2f393303c9 Add content description to volume title in settings.
Adds content description that is announced by talkback when a11y focus
is on volume preference. This improves talkback announcement when view changes.

Fixes: 285529113
Bug: 285455826
Fixes: 285487766
Test: atest VolumeSeekBarPreferenceControllerTest
Test: atest VolumeSeekBarPreferenceTest
Change-Id: Ibe80b4b1d489dc058df1cc79c96b034d5ddc6e56
2023-06-27 17:32:01 +00:00
Michael Mikhail
499f965c1c Add content description to volume title in settings.
Adds content description that is announced by talkback when a11y focus
is on volume preference. This improves talkback announcement when view changes.

Fixes: 285529113
Bug: 285455826
Fixes: 285487766
Test: atest VolumeSeekBarPreferenceControllerTest
Test: atest VolumeSeekBarPreferenceTest
Change-Id: Ibe80b4b1d489dc058df1cc79c96b034d5ddc6e56
2023-06-26 23:35:39 +00:00
Hao Dong
be823bc598 Wait for systemui udfps overlay ready to show settings udfps enroll view.
Previously, we show settings's udfps enroll animation view (the fingerprint icon and progress view) once the FingerprintEnrollEnrolling is shown.
However, touch events have to wait for systemui's udfps overlay to be valid. This CL lets settings's udfps enroll view wait for systemui's overlay.
1. Sets udfps enroll animation view's default visibility Gone.
2. Propagates FingerprintManager#onUdfpsOverlayShown to
   FingerprintEnrollEnrolling and when it's called, set the enroll view
   visible.

Besides, this CL renames onPointerDown() and onPointerUp() with Udfps.

Bug: 280718879
Test: atest FingerprintEnrollEnrollingTest
Change-Id: Ieed3e74c182828918785edcacb021f19a3665f2a
2023-06-26 20:21:05 +00:00
danielwbhuang
7aaff67c3c Log metrics for PK settings topics
1. Log metrics for touchpad settings
2. Log metrics for modifier keys remapping
3. Log metrics for physical keyboard settings

Bug: 271391879
Test: manual, atest
Change-Id: I3f948927719ec6fc3dca78cdcb995c3037d8f97f
2023-06-26 16:33:10 +08:00
Quang Anh Luong
260142b495 Use speed string from WifiEntry
Use speed string from WifiEntry.getTx/RxSpeedString() instead of
creating it from the raw Mbps value.

Bug: 286246206
Test: atest WifiDetailPReferenceController2Test, manually verify speed
string is populated correctly in the Network Details page

Change-Id: I89fa0e387d8ef4a5bbfa14871517273ed77bb0e0
2023-06-26 16:19:49 +09:00
Chaohui Wang
99b29e068e Merge "Fix ANR in TelephonyStatusControlSession" into udc-qpr-dev 2023-06-26 06:21:38 +00:00
Hao Dong
a7af958f4c Merge "Fix pattern rotation header text." into udc-qpr-dev 2023-06-23 17:57:12 +00:00
Hao Dong
35ebdefcd8 Fix pattern rotation header text.
Bug: 278055194
Test: atest ChooseLockPatternTest
Change-Id: I36ec325b46d7a7f583d94dc26f9962cadc3874cd
2023-06-23 02:37:22 +00:00
Hao Dong
c9a99978f9 Fix require on screen toggle on guest user.
Bug: 286018876
Test: atest FingerprintSettingsFragmentTest
Change-Id: I432ffd3b8b32caeaf7ac8c6bc3c2ee2a0ee53a08
2023-06-23 00:32:32 +00:00
Matías Hernández
027f0a46ae Settings: don't try to allow NLSes with too-long component names
* NotificationAccessConfirmationActivity (triggered through CompanionDeviceManager) -> Don't show the dialog, bail out early similarly to other invalid inputs.
* NotificationAccessSettings (from Special App Access) -> No changes, but use the canonical constant now.
* ApprovalPreferenceController (used in NotificationAccessDetails) -> Disable the toggle, unless the NLS was previously approved (in which case it can still be removed).

Fixes: 260570119
Fixes: 286043036
Test: atest + manually
Change-Id: Ifc048311746c027e3683cdcf65f1079d04cf7c56
2023-06-21 17:02:32 +02:00
Chaohui Wang
88fd45b1e6 Fix ANR in TelephonyStatusControlSession
Feature.get() blocks on the main thread, which cause the ANR.

Cancel the job instead to fix.

Fix: 287702163
Test: Manually with MobileNetworkSettings
Test: atest TelephonyStatusControlSessionTest
Change-Id: Id873e56359dbf198c31686c2280c979294c95c3d
2023-06-21 16:43:17 +08:00
TreeHugger Robot
d6ae6f8655 Merge "Remove Wi-Fi hotspot from settings search for non-admin users" into udc-d1-dev am: c548cdc4a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23753764

Change-Id: I8eb18e0f788a9a26da01222abd17149c350fc4ee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 05:02:26 +00:00
Weng Su
7bd6646e5f Remove Wi-Fi hotspot from settings search for non-admin users
- Don't use ViewModel if the settings UI is restricted

Bug: 284931681
Test: manual test
atest -c WifiTetherSettingsTest

Change-Id: I3ae23b01b3be821c3560552b39cbd83ab51b2095
2023-06-21 06:58:18 +08:00
TreeHugger Robot
fcd80ade3b Merge "Update BatterySettingsFeatureProvider interface" into udc-qpr-dev 2023-06-20 02:08:25 +00:00
Chaohui Wang
7aaceaa782 [lint] Fix Wrong Resource Type
Bug: 285231003
Test: m Settings
Change-Id: I8dfbaf1342f014af35cd08906ac3f498b6c8c11a
2023-06-19 10:17:35 +08:00
Treehugger Robot
7d837a745a Merge "[Settings] Fix roboletric test fail and add new test case." into udc-dev am: 08366227b5 am: 44fddb456e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23691723

Change-Id: Ia18d8a3915dbea04de48d6306f12ce81a361dc5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-17 07:06:17 +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
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
Treehugger Robot
44fddb456e Merge "[Settings] Fix roboletric test fail and add new test case." into udc-dev am: 08366227b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23691723

Change-Id: I2fe19557e53756a2e61071ae530f89756cb32eab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 12:05:57 +00:00
Treehugger Robot
08366227b5 Merge "[Settings] Fix roboletric test fail and add new test case." into udc-dev 2023-06-15 11:18:51 +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
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
Chaohui Wang
36dfb5ac0b Fix SettingsRoboTests
Mock the getViewLifecycleOwner in test to fix.

Fix: 287387514
Test: m RunSettingsRoboTests
Change-Id: I346930e9655e4f78227276aee4c2a4e5ae6962e0
2023-06-15 16:33:05 +08: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
Treehugger Robot
8182348d5c Merge "[Settings] Imporve MMS message UI state update" into udc-d1-dev 2023-06-15 03:02: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