Commit Graph

46473 Commits

Author SHA1 Message Date
YK Hung
cf8ab7eef3 Merge "Update string for all defenders" into tm-qpr-dev am: d388dc1809
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20743066

Change-Id: I271e279c86e90360b9fae18f96dc8c913f9f430f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-16 05:23:35 +00:00
YK Hung
3aca71cfc2 Merge "Move setup optimization mode to main thread" into tm-qpr-dev 2022-12-16 04:53:06 +00:00
YK Hung
c89f78c68f Merge "Update dock defender helper URL" into tm-qpr-dev 2022-12-16 04:52:18 +00:00
YK Hung
d388dc1809 Merge "Update string for all defenders" into tm-qpr-dev 2022-12-16 04:51:46 +00:00
Treehugger Robot
3b583fc371 Merge "Override onTrimMemory to apply trimMemory in AppIconCacheManager" am: 8ac09942b6 am: a8abd64b73 am: 691ddd7f07
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2311766

Change-Id: Ic3b54cb856ddf73f379db99404449aeb5980cc17
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-16 04:47:12 +00:00
Treehugger Robot
691ddd7f07 Merge "Override onTrimMemory to apply trimMemory in AppIconCacheManager" am: 8ac09942b6 am: a8abd64b73
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2311766

Change-Id: I5d95061c4a22b21b003ffdc2272da8d15ab64b8e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-16 04:38:44 +00:00
Treehugger Robot
8ac09942b6 Merge "Override onTrimMemory to apply trimMemory in AppIconCacheManager" 2022-12-16 03:44:18 +00:00
Zaiyue Xue
bce700f1db Refactor getting allowlist set from feature provider.
(1) Use Set<CharSequence> for all the allowlists.
(2) The contains() method of Set<CharSequence> also works for String. No
    need an extra contains() util function.

Bug: 262802531
Fix: 262802531
Test: presubmit
Change-Id: Ib2aaf9a3b8db4618a8c46f138e8d35f15b77c104
2022-12-16 10:39:26 +08:00
Bonian Chen
6d57edf9ac Merge "[Settings] Change network reset into reset mobile network" 2022-12-16 00:41:16 +00:00
William Xiao
71ee3c3a5d Merge "Default to timing out to dock user in 1 minute" into tm-qpr-dev am: 0be191aeb7 am: 26343e8926
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20683709

Change-Id: I63dedfa49ec3d7c64c156d6a5da33772abfcc4b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-16 00:04:15 +00:00
Yuri Lin
5db22756e4 Merge "Disable zen rule preferences with invalid activities" into tm-qpr-dev am: dc4100f148 am: de8a27b496
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20725886

Change-Id: I4c0309a1b5773d6d92c0f43ba631571e2b375e49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-16 00:00:17 +00:00
Eric Biggers
5f1d894252 Remove EncryptionInterstitial for Full Disk Encryption
Support for Full Disk Encryption was removed in Android 13, since now
File Based Encryption is always used instead.  It turns out that I
missed a fairly large chunk of obsolete code: EncryptionInterstitial,
which is the screen that asks whether the device will require the
primary user's lockscreen credential when it starts up.  This used to be
shown when setting the primary user's lockscreen credential, to
determine whether the full-disk encryption key would be tied to that
lockscreen credential or not.  But now it's unused code.

This CL removes all this unused code.

This should not change any behavior, with one very minor exception:
Settings will no longer explicitly set the REQUIRE_PASSWORD_TO_DECRYPT
setting to 0 whenever the primary user's lockscreen credential is
changed.  (This happened in SaveChosenLockWorkerBase.)  This setting is
a @SystemApi, but it no longer has any meaning, since it is never set to
1 anymore.  If there is a reason to keep it explicitly set to 0, instead
of unset, we should make LockSettingsService in system_server set it.

Test: Went through SUW, set a PIN, cleared the PIN, set a PIN again (all
      using the UI).  Nothing unusual seen.
Bug: 208476087
Change-Id: I039cc7a284e3f43e1e284970a5869958c909d1b7
2022-12-15 20:47:20 +00:00
William Xiao
26343e8926 Merge "Default to timing out to dock user in 1 minute" into tm-qpr-dev am: 0be191aeb7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20683709

Change-Id: I46a4c6300b2deb004417a78faaab25f10fd9ee50
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 20:46:32 +00:00
William Xiao
0be191aeb7 Merge "Default to timing out to dock user in 1 minute" into tm-qpr-dev 2022-12-15 20:04:15 +00:00
Florian Mayer
2be085005b Merge "[MTE] allow device policy to control setting" 2022-12-15 18:40:14 +00:00
Yuri Lin
de8a27b496 Merge "Disable zen rule preferences with invalid activities" into tm-qpr-dev am: dc4100f148
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20725886

Change-Id: I609c74ba96e7a32171ff20715d4aa8c68f8a68b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 16:51:30 +00:00
Yuri Lin
dc4100f148 Merge "Disable zen rule preferences with invalid activities" into tm-qpr-dev 2022-12-15 16:08:17 +00:00
Bonian Chen
8d43fd9a35 [Settings] Change network reset into reset mobile network
Replace reset network into Reset mobile network settings

Bug: 260034791
Test: local and auto
Change-Id: I9547f266c1586073fd2b96f35cc9df8861b0a105
2022-12-15 15:44:08 +00:00
Weng Su
28791f5ff0 Safely remove Wi-Fi user credentials
- Show "(In use)" if a credential is used by Wi-Fi networks

- Show Wi-Fi networks in use in the details dialog

- Disable "Uninstall" button if the credential is in use

Bug: 258542666
Test: manual test
atest -c UserCredentialsSettingsTest

Change-Id: I1fb29b58698d918f987b9a16c195127cf270c17e
2022-12-15 15:20:43 +00:00
Weng Su
ae8389165a Create Helper Classes for WifiTrackerLib
- Create a WifiTrackerBase for the base worker thread

- Create a SavedWifiHelper for the saved Wi-Fi network tracker

Bug: 258542666
Test: manual test
atest -c WifiTrackerBaseTest \
         SavedWifiHelperTest

Change-Id: Ie6b2f5b348367376da96737acdf5b8e65ecaf067
2022-12-15 15:19:47 +00:00
Treehugger Robot
2f96743835 Merge "Align SETTINGS_PACKAGE_NAME reference to a single place" am: d03411f0ee am: 24835ea2f9 am: 8a26d010d0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2340884

Change-Id: I6b4edd0be16e090b56b628af51a0558c87822ef6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 13:41:13 +00:00
Treehugger Robot
8a26d010d0 Merge "Align SETTINGS_PACKAGE_NAME reference to a single place" am: d03411f0ee am: 24835ea2f9
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2340884

Change-Id: Ie89e48f670b7e3cc8d8d607149d35c678b67ae8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 12:59:37 +00:00
Wesley Wang
d907a12980 Move setup optimization mode to main thread
- Due to unclear root cause of optimization mode being reset after
   reboot, update the setup logic from deferred background thread to
   main thread, to avoid any possible background task unexecuted case.

Bug: 241735485
Test: make SettingsRoboTests
Change-Id: I2de2181321712f89fadc04bf5000aea91a01485a
Merged-In: I2de2181321712f89fadc04bf5000aea91a01485a
(cherry picked from commit 7423f4390c)
2022-12-15 11:49:14 +00:00
YK Hung
e047b4f400 Merge "Move setup optimization mode to main thread" 2022-12-15 10:56:09 +00:00
Zhenwei Chen
35caf2ffb7 Update dock defender helper URL
Bug: 261206713
Test: Unit test passed
Change-Id: I6a8489b7e1a54d2c1d88cf6b04c8d1a4c9c6c235
2022-12-15 10:09:55 +00:00
Edgar Wang
6e0ac2699e Merge "Fix NPE crash in MainClearConfirm" 2022-12-15 09:27:46 +00:00
TreeHugger Robot
87498a19e6 Merge "Add a new field elapsed_time_millis into Settings' atom" 2022-12-15 09:17:47 +00:00
TreeHugger Robot
e2fa501390 Merge "Check Uri permission for FLAG_GRANT_READ/WRITE_URI_PERMISSION" into tm-qpr-dev am: 8ccf48b0fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20727250

Change-Id: I230322f17eb8335240e655e1d8af24776d82d6ca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 06:32:57 +00:00
Kuan Wang
6c4f83f33d Load app usage events data in the hourly job.
Test: make RunSettingsRoboTests + manual
Bug: 260964679
Change-Id: Iaccaa77bd52fb7356cdcb786c64523f21040b128
2022-12-15 06:32:54 +00:00
Kuan Wang
52ad3ba925 add OWNER for protos directory
Test: NA
Bug: NA
Change-Id: I985a4918d7bac938dc843c8cdce1f139b5449609
2022-12-15 06:31:25 +00:00
TreeHugger Robot
8ccf48b0fc Merge "Check Uri permission for FLAG_GRANT_READ/WRITE_URI_PERMISSION" into tm-qpr-dev 2022-12-15 06:06:22 +00:00
Ankita Vyas
6e171e05f7 AppClone: Do not show work tab in Cloned Apps page
We do not support app cloning on work profile. Hence even though managed
profile is present on the device, do not show work tab in Cloned Apps
page.

Bug: 248204976
Test: make RunSettingsRoboTests -j
Change-Id: Ib99c34b85b2084b48eb2485787666c95040fa0dc
2022-12-15 05:52:40 +00:00
Zhenwei Chen
1eea27ae82 Update string for all defenders
Test: Unit test passed
Bug: 262508668
Change-Id: Ia0126f9761caa43d0746962a9bb77173e9f45ad1
2022-12-15 05:31:18 +00:00
TreeHugger Robot
ca390cd6c2 Merge "Fix b/262378515: NullPointerException in TabPreference.onDetached()" 2022-12-15 05:28:42 +00:00
Arc Wang
c743f44644 Merge "Allow 2-pane deep link to access unexported Activity" into tm-qpr-dev am: e8e2d9c68f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20704230

Change-Id: Ic7b667e5d12c125769feabc0ac13f79eaafab771
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 05:16:14 +00:00
Chaohui Wang
1445d985bb Move AppItem into AppListModel
Follows the api changes in Spa privileged lib.

Bug: 260660819
Test: Unit test
Test: Manually with Settings
Change-Id: Ieec1035070cc532eedcd1511c5b347e04099a9fb
2022-12-15 12:32:54 +08:00
Arc Wang
e8e2d9c68f Merge "Allow 2-pane deep link to access unexported Activity" into tm-qpr-dev 2022-12-15 04:23:13 +00:00
Arc Wang
0f7f913281 Check Uri permission for FLAG_GRANT_READ/WRITE_URI_PERMISSION
To improve security, calling app must be granted Uri permission
if it sets FLAG_GRANT_READ/WRITE_URI_PERMISSION in the Intent of
ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY.

Bug: 250589026
Test: manual
Change-Id: I48f88c662b843212b1066369badff84cf98935a8
Merged-In: I48f88c662b843212b1066369badff84cf98935a8
2022-12-15 03:41:53 +00:00
Arc Wang
95ff075244 Check Uri permission for FLAG_GRANT_READ/WRITE_URI_PERMISSION
To improve security, calling app must be granted Uri permission
if it sets FLAG_GRANT_READ/WRITE_URI_PERMISSION in the Intent of
ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY.

Bug: 250589026
Test: manual
Change-Id: I48f88c662b843212b1066369badff84cf98935a8
Merged-In: I48f88c662b843212b1066369badff84cf98935a8
2022-12-15 03:40:08 +00:00
Bonian Chen
b7c309b075 Merge "[Settings] Try to reduce the time pending on BroadcastReceiver" 2022-12-15 01:16:24 +00:00
Abel Tesfaye
2404e07ad1 Create unique metrics category for DeviceStateAutoRotateDetailsFragment
DISPLAY_AUTO_ROTATE_SETTINGS is being used by two separate fragments.

Test: none
Bug: 260071662
Change-Id: I8f02e1df54451f0f7501edcf31d8060fdcc604e6
2022-12-14 21:15:11 +00:00
Yuri Lin
afe52dfae5 Disable zen rule preferences with invalid activities
While resolveActivity is used to determine whether an Intent can be handled by something, this doesn't catch the case of explicit intents whose activity class doesn't exist. Here we check for it through PackageManager.queryIntentActivities instead for existing zen rules (if they were added when the activity exists, but it no longer does).

For new rules, check the validity of the activity for external rules before adding them to the list.

Bug: 238144390
Test: manual via DND app
Change-Id: Ia920ca792f9c17a5d684baf877c882ce7fadffd6
2022-12-14 14:13:36 -05:00
Arc Wang
d1549f2243 Settings 2-pane deep link vulnerabilities
Settings app must not start an deep link Activity if
1. The deep link Activity is not exported.
or
2. Calling package does not have the permission to
   start the deep link Activity.

Bug: 250589026
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsHomepageActivityTest
Change-Id: I9a3bddfa5d9d1d2e924dd6f3e5e07dca6c11664f
Merged-In: I9a3bddfa5d9d1d2e924dd6f3e5e07dca6c11664f
2022-12-14 11:59:57 +00:00
Arc Wang
0498907322 Allow 2-pane deep link to access unexported Activity
If an Activity is not exported, the Activity still can be
launched by components of the same application, applications
with the same user ID, or privileged system components.

Bug: 261678674
Bug: 250589026
Test: manual visual
      Launcher -> context menu -> Wallpaper & style
Change-Id: I662df6cb287361b135e2c596abe946ddeb03bda4
Merged-In: I662df6cb287361b135e2c596abe946ddeb03bda4
2022-12-14 19:17:40 +08:00
Bonian Chen
3ac629f04e [Settings] Try to reduce the time pending on BroadcastReceiver
This is not a design which could resolve the issue, but try to improve
it through reducing the time blocking on BroadcastReceiver and reducing
the happening of ANR.

Bug: 262209170
Test: local and auto
Change-Id: Idec4da3d1deaffb121a5c7a73aeb84b4b0331374
2022-12-14 10:06:12 +00:00
Zaiyue Xue
a944ee2a02 Fix b/262378515: NullPointerException in TabPreference.onDetached()
Bug: 262378515
Fix: 262378515
Test: presubmit
Change-Id: I9c0629d570538a664c361eae74e8f7818f4210df
2022-12-14 15:33:34 +08:00
SongFerng Wang
b64d2b2f9e Merge "Revert "Remove "Backup Calling" button from Settings UI"" 2022-12-14 05:56:43 +00:00
Arc Wang
86afd10ada Merge "Check Uri permission for FLAG_GRANT_READ/WRITE_URI_PERMISSION" 2022-12-14 05:52:29 +00:00
Arc Wang
aef9355579 Merge "Allow 2-pane deep link to access unexported Activity" 2022-12-14 05:52:15 +00:00
Sunny Shao
d21c97e9a7 Add a new field elapsed_time_millis into Settings' atom
- Add a new field elapsed_time_millis to keep the elapsed time
  since setup wizard finished.

Fixes: 260660970
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
Change-Id: I28d13c4987ae1e4ef12eaff27e26a5121cf8093b
2022-12-14 12:53:54 +08:00