Commit Graph

18383 Commits

Author SHA1 Message Date
Chaohui Wang
bb4d0250bb Add AppStoragePreference for Spa
Also add new SettingsSpaUnitTests.

Bug: 236346018
Test: Manual with App Info page
Test: atest SettingsSpaUnitTests
Test: Manual compare generated Settings AndroidManifest.xml
Change-Id: I9f6b2ca446fd3d196792a876a6e4049c5cf97a1d
2022-10-13 17:21:08 +08:00
Chaohui Wang
a1042f2e2d Merge "Rename AppSettings to AppInfoSettings for Spa" 2022-10-13 06:04:41 +00:00
Behnam Heydarshahi
ee4d902410 Merge "Add notification volume controller in settings" into tm-qpr-dev am: 7f6c833b89 am: 8b2496eb9e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19940409

Change-Id: Ia1b13bf425da2ef90c287b3aaee6231891c67bd2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-12 20:38:18 +00:00
Behnam Heydarshahi
8b2496eb9e Merge "Add notification volume controller in settings" into tm-qpr-dev am: 7f6c833b89
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19940409

Change-Id: Iffd5dcd7eb9ad645807d9529f352582457dc3f0e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-12 20:07:05 +00:00
Weng Su
10ef69316f Refine the check restriction function in WifiEntryPreference
- Move checkRestrictionAndSetDisabled function from WifiEntryPreference to necessary child-classes to avoid impacting other child-classes such as SavedAccessPointsPreference.

- Avoid adding ShadowRestrictedPreference to the unnecessary test class.

Bug: 233871529
Test: manual test
make RunSettingsRoboTests

Change-Id: Ia2145401558b293b5f4eaa0860f83b7d3bbab548
2022-10-13 03:52:08 +08:00
Behnam Heydarshahi
7f6c833b89 Merge "Add notification volume controller in settings" into tm-qpr-dev 2022-10-12 19:37:26 +00:00
Raphael Kim
98ace3f8f2 Merge "Fix build error from AssociationInfo constructor change" 2022-10-12 18:43:42 +00:00
Chloris Kuo
873b8544e1 Disable Enhanced notifications setting when default NAS is not available
Test: NotificationAssistantPreferenceControllerTest
Bug: 251400808
Change-Id: Idec520013bea32cfaea0285f33c525a6e37f0124
2022-10-12 11:05:25 -07:00
Chaohui Wang
d44e2ad3f6 Rename AppSettings to AppInfoSettings for Spa
To align with current naming.

Bug: 236346018
Test: Make Settings App
Change-Id: I20b2423faf5ee433a530e6a963dd6bb3de33ba90
2022-10-12 19:00:59 +08:00
Xuanang Zhao
bac24478a1 Merge "Fix the slice provider test." 2022-10-12 10:14:24 +00:00
Xuanang Zhao
890d8d2940 Fix the slice provider test.
Change-Id: Ia711b6f66ef7737f57f388b16f9fb9586727e395
Bug: 249101421
2022-10-12 08:33:26 +00:00
Chaohui Wang
2fc09c5117 Clean up AppPermissionSummaryJavaTest
Kotlin Robolectric test could be directly run.

Bug: 236346018
Test: m RunSettingsRoboTests
Change-Id: I0a520236191655d01f2c4b81454627a73a271da5
2022-10-12 16:01:52 +08:00
Hugh Chen
b1fac0fb92 RESTRICT AUTOMERGE Refactoring settings UI am: f891f7ba86
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20034710

Change-Id: I2e6bb7660f690b2aa2db5a2ef4c628e406d674c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-12 06:35:46 +00:00
Wei Wang
f71883b2bb Merge "Fix tests broken by below CL:" 2022-10-12 05:54:54 +00:00
Wei Wang
878ce96163 Fix tests broken by below CL:
platform/packages/apps/Settings/+/0fe65b582abde16c1b46cb314a8358752cef1658

Change-Id: Ie6b6b7ffca15476a05e363fc68d2fa4ba0693895
Test: m RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.wifi.p2p.WifiP2pSettingsTest.*"
Bug: 252671269
2022-10-12 05:54:34 +00:00
Lauren Winston
246597c1ac Merge "Revert "Add a cursor preference to Accessibility Settings"" 2022-10-11 23:00:34 +00:00
Michael Groover
6ce57b67fb Add unaudited exported flag to exposed runtime receivers
Android T allows apps to declare a runtime receiver as not exported
by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag;
receivers registered with this flag will only receive broadcasts from
the platform and the app itself. However to ensure developers can
properly protect their receivers, all apps targeting U or later
registering a receiver for non-system broadcasts must specify either
the exported or not exported flag when invoking #registerReceiver;
if one of these flags is not provided, the platform will throw a
SecurityException. This commit updates all the exposed receivers
with a new RECEIVER_EXPORTED_UNAUDITED flag to maintain the existing
behavior of exporting the receiver while also flagging the receiver
for audit before the U release.

Bug: 234659204
Test: Build
Change-Id: I8fbcf69575d829f26e02d661498d69f5fc8740d0
2022-10-11 17:26:02 -05:00
Lauren Winston
4f493778a6 Revert "Add a cursor preference to Accessibility Settings"
This reverts commit 205018a854.

Reason for revert: Software Cursor not launching in Android U

Change-Id: Ieddc6b27a8a28910e7c12328ee6d1b5e0d2e4c17
2022-10-11 18:32:27 +00:00
SongFerngWang
c27b674e38 [MEP] the user can't enable the psim when revmovable esim is enabled
The isRemovableSimEnabled method at ToggleSubscriptionDialogActivity
UI is for psim, not esim. It should skip the revmovable esim slot.

Bug: 251384644
Test: build pass. atest UiccSlotUtilTest
Change-Id: I11d0f9528961ec5e47cd8682cf9b6bb988a5700f
2022-10-11 18:48:36 +08:00
Chaohui Wang
2b11c1fe12 Add AppPermissionPreference for Spa
This is the permission preference in the App Settings page.
The summary is single line.

Add the first Kotlin Robolectric Test for Settings, since Kotlin is not
directly supported by the Robolectric test, using a Java class as a
wrapper.

Bug: 236346018
Test: Manual with App Settings page
Test: Robolectric Test
Change-Id: Ic5a4f7d965885a9cd143428a8cd1900981e316a9
2022-10-11 09:15:26 +00:00
Hugh Chen
f891f7ba86 RESTRICT AUTOMERGE Refactoring settings UI
Bug: 248174653
Test: build & boot pass
Change-Id: I124a65941349d3338145865cae2c8354678897fa
2022-10-11 04:30:09 +00:00
Behnam Heydarshahi
3ac6aaf796 Add notification volume controller in settings
Separate notification and ring controllers based on the ring/volume
stream alias boolean in config.xml.

For both ring and volume controller: Not show vibrate icon when vibration is not supported on device. Show
silent icon instead.

Known issue: Add the notification volume slider only in Settings, and
not in VolumePanelDialog. When the alias is set to false and the streams
separated, the ring volume slider in VolumePanelDialog keeps its title
of "Ring & notification volume" instead of changing to "Ring volume".

Bug: b/38477228

Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=NotificationVolumePreferenceControllerTest RunSettingsRoboTests -j40
      make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=RingVolumePreferenceControllerTest RunSettingsRoboTests -j40
      make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=SoundSettingsTest RunSettingsRoboTests

Change-Id: Id17523f49b291a5cf612b90f93c3b2ab6486c62f
2022-10-10 14:42:56 +00:00
Chaohui Wang
41716cd24e Update onPermissionSummaryResult()
standardGrantedPermissionCount is removed.

Bug: 236346018
Test: m Settings
Change-Id: Id1b6a7d5302416f073e342d5b0d70b9b3dd102f0
2022-10-09 19:36:40 +08:00
Chaohui Wang
a947e88c9f Clean up unused AppPermissionsPreferenceController
This one is replaced by AppPermissionPreferenceController.

Bug: 234570979
Test: m Settings
Change-Id: Id9d16caf33cdea626f79a3cd142dfcde2c54769f
2022-10-09 15:42:01 +08:00
TreeHugger Robot
88f9c8fe7e Merge "Do not show 2nd FingerprintErrorDialog" into tm-qpr-dev am: 4fd86cc096 am: 45bab9ddc4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20120050

Change-Id: Ia6c96f2c1f1ea869f1fdaebeebd977b0e1612263
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-08 07:53:32 +00:00
TreeHugger Robot
45bab9ddc4 Merge "Do not show 2nd FingerprintErrorDialog" into tm-qpr-dev am: 4fd86cc096
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20120050

Change-Id: I68b6a8afeb51b04b1c48cf7e4c94e6e9ff5f346e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-08 07:21:06 +00:00
TreeHugger Robot
4fd86cc096 Merge "Do not show 2nd FingerprintErrorDialog" into tm-qpr-dev 2022-10-08 06:54:15 +00:00
Evan Severson
38eb8fea44 Merge "Make SensorToggleControllers lifecycle aware" 2022-10-07 19:11:16 +00:00
TreeHugger Robot
2d83f8b5bf Merge "Show policy transparency dialog if adding Wi-Fi config is not allowed" 2022-10-07 08:12:56 +00:00
Lauren Winston
3f8d62fbf1 Revert "Add toggles for two Software Cursor settings: keyboard shift and trigger"
This reverts commit 28b4b34f92.

Reason for revert: Software Cursor is not launching in Android U

Test: manual

Change-Id: I213cf64ca94fce51883a30a9d6b734b4ed874dad
2022-10-06 23:58:50 +00:00
Xin Li
302b01f8e2 Merge tm-qpr-dev-plus-aosp-without-vendor@9129937
Bug: 248070379
Merged-In: I9ebe26c6a8058798ea654523ad1405a8447268b8
Change-Id: Ib8c6441f2165784804a1863bcfce6b05d20ecfd3
2022-10-06 12:22:57 -07:00
Weng Su
a81bb19618 Show policy transparency dialog if adding Wi-Fi config is not allowed
- When the user is restricted by UserManager.DISALLOW_ADD_WIFI_CONFIG, clicking on a Wi-Fi network will show the Settings policy transparency dialog.

- The "Not allowed by your organization" summary in Wi-Fi networks will be removed in a separate CL.

Bug: 233871529
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=Wifi

Change-Id: Ia978be8e85a5809de1331f3e0edc11fbc8925c80
2022-10-07 02:34:49 +08:00
Milton Wu
328be58b48 Do not show 2nd FingerprintErrorDialog
When fingerprint enrollment is stopped because of credential timeout, it
pops a FingerprintErrorDialog, and this error dialog triggers
onWindowFocusChanged(), and the 2nd FingerprintErrorDialog is shown. To
fix this case, checking mIsCanceled flag do nothing  in
onWindowFocusChanged() method.

On the first dialog, the 'Try again' button relaunch activity with new
Intent, and it causes that activity result fails to pass back to caller.
To fix this bug, add FLAG_ACTIVITY_FORWARD_RESULT on new Intent to pass
result back.

Bug: 248165760
Test: Manually test credential timeout behavior and dialog buttons
Test: Manually test enrollment process has been cancelled for scenarios,
      like "Swipe down Notification Shade" and "Recents"
Test: robo test for FingerprintEnrollEnrollingTest
Change-Id: I4441ba026db9b594f1d6184280668a374126a2fb
2022-10-06 15:40:51 +08:00
Alice Kuo
6ecbe4c18e Remove A2dp offload disabled and LE audio offload enabled combination
In order to reduce the complexity, LE audio offload couldn't be
enabled as a2dp offload disabled. Remove the combination from the
developer option
1. As a2dp offload disabled, LE audio offload couldn't be switched.
2. As the user disable a2dp offload, LE audio offload would be disabled
   as well

Bug: 238268927
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioHwOffloadPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothA2dpHwOffloadPreferenceControllerTest
Change-Id: I9ebe26c6a8058798ea654523ad1405a8447268b8
Merged-In: I9ebe26c6a8058798ea654523ad1405a8447268b8
(cherry picked from commit 7cc845026c)
2022-10-06 10:35:03 +08:00
Xin Li
2af8366306 Merge "Merge TP1A.221005.003" 2022-10-05 22:20:14 +00:00
Treehugger Robot
c6c8515d00 Merge "Remove A2dp offload disabled and LE audio offload enabled combination" am: bcde51cf09 am: fe38c3c91e am: bf19bf23a5 am: b969c8a4c7 am: ff788fa9b9
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2240358

Change-Id: I57bbacb82d15770d21a45b9043a8954ec268bf62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-05 18:23:43 +00:00
Treehugger Robot
ff788fa9b9 Merge "Remove A2dp offload disabled and LE audio offload enabled combination" am: bcde51cf09 am: fe38c3c91e am: bf19bf23a5 am: b969c8a4c7
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2240358

Change-Id: I011b9815444d73b85b470db94d0bb53f5479c51b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-05 17:54:58 +00:00
Treehugger Robot
b969c8a4c7 Merge "Remove A2dp offload disabled and LE audio offload enabled combination" am: bcde51cf09 am: fe38c3c91e am: bf19bf23a5
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2240358

Change-Id: Ibae8540c83dbabec5cf5bfa96ddaab3219ec5b6f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-05 17:26:59 +00:00
Treehugger Robot
bf19bf23a5 Merge "Remove A2dp offload disabled and LE audio offload enabled combination" am: bcde51cf09 am: fe38c3c91e
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2240358

Change-Id: I3db9d784789e88ee04f50f040eb3741a87768640
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-05 16:59:01 +00:00
Neil Fuller
15910795f2 Merge "Track method renames" 2022-10-05 15:45:42 +00:00
Alice Kuo
7cc845026c Remove A2dp offload disabled and LE audio offload enabled combination
In order to reduce the complexity, LE audio offload couldn't be
enabled as a2dp offload disabled. Remove the combination from the
developer option
1. As a2dp offload disabled, LE audio offload couldn't be switched.
2. As the user disable a2dp offload, LE audio offload would be disabled
   as well

Bug: 238268927
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioHwOffloadPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothA2dpHwOffloadPreferenceControllerTest
Change-Id: I9ebe26c6a8058798ea654523ad1405a8447268b8
2022-10-04 23:48:11 +08:00
Tsung-Mao Fang
fa7394afbc Disable eager initialization of Jetpack libraries
Test: atest -c SettingsUnitTests
Fix: 208883742
Fix: 213872855
Change-Id: Ia2a2f88939d16c84255404696ea159c4a01b3bb5
2022-10-04 15:51:45 +08:00
Xin Li
f51d201af3 Merge TP1A.221005.003
Merged-In: Ia825853dde2e966e3d390cecfbe1a99f6439d31e
Change-Id: Ia7b51d3cc694287b930d240c77e5ba0ed9a527f4
2022-10-03 13:17:48 -07:00
TreeHugger Robot
b85726f975 Merge "Make preference unselectable" 2022-10-03 13:58:28 +00:00
Neil Fuller
f3c4f68abf Track method renames
Track method renames:

getSuggestManualTimeZoneCapability() ->
getSetManualTimeZoneCapability()

getSuggestManualTimeCapability() ->
getSetManualTimeCapability()

Assuming that TimeManager.setManualTime() and
TimeManager.setManualTimeZone() become system APIs in the next release,
they can be used in SettingsUI in place of
TimeDetector.suggestManualTime() and
TimeZoneDetector.suggestManualTimeZone() (in a later commit).

Bug: 236612872
Test: build only
Change-Id: Ifffc022c109fa68ae705e32400db9bfc8a1632ca
2022-10-03 13:59:00 +01:00
Bill Lin
e4bf1025d1 Merge "Do not override SUW Glif theme when onApplyThemeResource() callback" into tm-qpr-dev am: e5a4e38c8c am: 6b763d1999
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20080179

Change-Id: I6ead342e386b2a208515997686e9a341075cdce2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-01 00:55:08 +00:00
Bill Lin
6b763d1999 Merge "Do not override SUW Glif theme when onApplyThemeResource() callback" into tm-qpr-dev am: e5a4e38c8c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20080179

Change-Id: I5a16ac472b0a08273d2410b39741675a6f998f51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-01 00:22:29 +00:00
Bill Lin
e5a4e38c8c Merge "Do not override SUW Glif theme when onApplyThemeResource() callback" into tm-qpr-dev 2022-09-30 23:54:31 +00:00
Tsung-Mao Fang
05412c37c7 Make preference unselectable
Because Encrypt phone is not an entry which can launch to next page,
let's make it unselectable now.

Change-Id: I860c76c501fccc488b2e120a4702c652f1bee134
Test: Manual test
Fix: 249193859
2022-09-30 15:15:50 +08:00
lbill
39175b2f87 Do not override SUW Glif theme when onApplyThemeResource() callback
1. Accodring to settings & setupdesign lib theme architecture
Only force apply sytle SetupWizardPartnerResource for current
activity/contextThemeWrapper is sufficient, override GlifV3Theme
again will cause incorrect resource mapping of private attributes.

2. Set Theme_AlertDialog style for AlertDialog in for Material design
- FingerprintEnrollEnrolling
- FingerprintEnrollFindSensor

3. Add test for AlertDialog theme, and fix broken test cases

Fixes: 245684949
Bug: 249789759
Bug: 248994476
Test: manual in SUW `adb shell cmd uimode night yes` and check visual
Test: manual in SUW enrolling check timeout dialog apply theme
Test: manual in SUW enroll UDFPS tips lottie view showing expectedly
Test: manual in SUW enroll UDFPS landscape showing correct layout
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      SetupFingerprintEnrollFindSensorTest
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      FingerprintEnrollEnrollingTest
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      FingerprintEnrollFindSensorTest
Change-Id: I17cbf26e38318e6681ba124d23bf86317a0f1e1d
2022-09-30 04:58:28 +00:00