Commit Graph

2544 Commits

Author SHA1 Message Date
Yanting Yang
bc12caac88 Merge "Fix the potential DOS issue for the Settings Apps page" into udc-dev 2023-03-30 15:13:16 +00:00
Yanting Yang
56e07c25b3 Fix the potential DOS issue for the Settings Apps page
The usage access permission of Settings app could be turned off by
starting the activity with USAGE_ACCESS_SETTINGS. Once the Settings app
loses the usage access permission, it will crash the Apps page which
depends on the usage to show recent apps. And this symptom will persist
even with device reboot.

To fix this vulnerability, we can add a package check in onCreate() to
avoid someone trying to start USAGE_ACCESS_SETTINGS with the Settings
package from third party apps.

Bug: 264260808
Test: Manually verify solution with the repro steps and also test the
normal visiting behavior.
Change-Id: If7cb0880e706369504e432b1f1104d06b1fcfa26

Change-Id: I70871aed763d14a79e474547c77c20a9677af6ff
2023-03-30 19:52:39 +08:00
Jigar Thakkar
e78b3d3f7e Merge "Fix user starts by using startProfile" into udc-dev 2023-03-29 12:45:50 +00:00
Jigar Thakkar
ee0c837117 Fix user starts by using startProfile
We used ActivityManager.startUserInBackground earlier to start the clone
user. As per the changes done recently (b/267800984),
UserVisibilityMediator now marks all the profiles/users started usign
startUserInBackground as startedInvisible. This results in the apps not
being able to launch on clone profile without a device restart. To fix
this, in this change we move to using ActivityManager.startProfile to
start the clone-user.

Test: Tested on device by creating clone profile through settings app
Bug: 268011720
Change-Id: I4a594cd4d10cfbd7459b04baa45719885decf87e
2023-03-29 10:58:23 +00:00
TreeHugger Robot
94d250162e Merge "Add service link when no providers are present" into udc-dev 2023-03-29 02:26:03 +00:00
TreeHugger Robot
8dc3e7752c Merge "Fix SpaActivity launched twice for App Info" into udc-dev 2023-03-29 01:10:34 +00:00
Becca Hughes
f9f3309fa0 Add service link when no providers are present
Test: ondevice & atest
Bug: 273752971
Merged-In: Ia7080f5c44c2f59a386e00146b898228e5829988
Change-Id: Ia7080f5c44c2f59a386e00146b898228e5829988
2023-03-28 22:51:33 +00:00
TreeHugger Robot
cdfd4ee9b3 Merge "[Regional prefernce] Remove U extension in locale of app list" into udc-dev 2023-03-28 13:33:59 +00:00
tom hsu
8477845381 [Regional prefernce] Remove U extension in locale of app list
Bug: b/270251111
Test: Manual Test
Change-Id: I2b3facfc5f7ec40a48379c79a5f0672cfe5fa7af
2023-03-28 20:01:39 +08:00
Chaohui Wang
88e20ec62e Fix SpaActivity launched twice for App Info
This happens when shouldShowTwoPaneDeepLink() return true, the
InstalledAppDetailsTop onCreate() is called twice.

Only try start spa when the activity is not finishing to fix.

Bug: 236346018
Test: Manually with Settings
Change-Id: I4b09fba0733a6451a2ba6fd90960f9151692a2ad
2023-03-26 22:39:20 +09:00
William Loh
6e5e43829b Merge "Keep same behavior after initiatingPackageName change" into udc-dev 2023-03-23 18:42:04 +00:00
Becca Hughes
cbbab3632c Merge "Add settings intent dialog" into udc-dev 2023-03-23 17:07:56 +00:00
William Loh
5d2420d493 Keep same behavior after initiatingPackageName change
InitiatingPackageName was previously set to null for all shell based
installs but has now been changed to "com.android.shell".

Bug: 265203007
Test: atest AppStoreUtilTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:acab1045f3786f775d0c51ffb50f5ff654fc53d8)
Merged-In: I3b8639c5530782375d0b26c9a65c1662eced5493
Change-Id: I3b8639c5530782375d0b26c9a65c1662eced5493
2023-03-23 00:44:50 +00:00
TreeHugger Robot
9848eb9053 Merge "Show package name if no label" into udc-dev 2023-03-22 22:10:11 +00:00
Becca Hughes
0b5eb7691b Show package name if no label
Test: make
Bug: 273753519
Merged-In: I78b47e8c55382ceef90329547231124db2ca27d9
Change-Id: I78b47e8c55382ceef90329547231124db2ca27d9
2023-03-22 20:23:41 +00:00
Josh Hou
b1f9d26174 Merge "[Panlingual] Can't set per-app languages for apps on work profile page" into udc-dev 2023-03-22 05:14:47 +00:00
Becca Hughes
b5f8ba6945 Add settings intent dialog
Add a dialog that can be launched via
an intent to prompt the user to enable
the provider for credman.

Test: make & atest & manual
Bug: 267816998
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9d74509888b7dd65b287bc68b9445d9e23809cce)
Merged-In: Id88cc7b3bf2829d075fbba87ea5dc0a245b9ae32

Change-Id: Id88cc7b3bf2829d075fbba87ea5dc0a245b9ae32
2023-03-21 22:07:29 +00:00
Josh Hou
38df174bba [Panlingual] Can't set per-app languages for apps on work profile page
Use startActivityAsUser instead of startActivity API to start the AppLocalePickerActivity of different users

Bug: 274378136
Test: 1. Perform AppLocalePickerActivityTest robolectric test
      2. Perform the manual test by switching different users
      3. Perform the manual test by switching different profiles
Change-Id: I4405b3b7e832b71b9ef66fa71d9e42ce12da167c
2023-03-21 10:57:42 +00:00
Chaohui Wang
ac67b77af7 Merge "Fix not displaying "Allow restricted settings"" into udc-dev 2023-03-20 16:03:47 +00:00
Becca Hughes
853c4a8683 Merge "Add subtitle to settings (settings)" into udc-dev 2023-03-20 16:01:08 +00:00
Chaohui Wang
90983daa41 Fix not displaying "Allow restricted settings"
"Allow restricted settings" is missed from SPA, added to SPA to fix this
issue.

Also make the system call in app info more options async to improve
performance.

Fix: 273678047
Test: Unit test
Test: By the following steps,
1. Install an app with accessibility feature from Chrome
2. Go Accessibility page and click on the disabled grey app
3. Go to the app info page, click more options
4. Make sure "Allow restricted settings" is displayed

Change-Id: I4adbe2335a32e6a7c4ebe155715684d768e5d1ef
2023-03-20 19:40:06 +08:00
Becca Hughes
fb4488ea83 Add subtitle to settings (settings)
Allows a credential provider to show a
subtitle/summary underneath the title in
the list of providers.

Test: ondevice & atest
Bug: 253157366
Change-Id: I481da16985027a49ee464623b6db166d941cab55
(cherry picked from commit on googleplex-android-review.googlesource.com host: 6474e01372)
Merged-In: I481da16985027a49ee464623b6db166d941cab55
2023-03-17 17:29:23 +00:00
Kweku Adams
9a087d6c19 Merge "Revert "Remove duplicate strings."" into udc-dev 2023-03-16 20:14:16 +00:00
Lifu Tang
caa1b51ef2 Revert "Remove duplicate strings."
Revert submission 19748582-settings_yesno

Reason for revert: Common strings in English could be translated into different strings in other languages.

Reverted changes: /q/submissionid:19748582-settings_yesno

Bug: 272603842
Test: build and open Settings app
Test: atest SettingsRoboTests
Change-Id: Iaad301c5513478fb95e40987ea3ccb4f923d71fa
2023-03-15 22:39:24 +00:00
Becca Hughes
0e6d91b778 Merge credential manager providers by package name
As part of the spec'd design we should merge providers
by package name this means that if there are multiple
providers they will be all turned on/off together.

Bug: 266772233
Test: make & atest
Change-Id: If7eec7d9a79a97ac3ec4f55b7cbcfaf7748d5750
Merged-In: Id48f27e96cabdd8ab0e8cbafc8eb760b7bbbf928
2023-03-14 20:28:03 +00:00
Yu-Ting Tseng
0f90688ede Merge "Remove CACHED_PROC_STATES which is unused." into tm-qpr-dev am: f7a098295f am: 11ab38f690
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/21779083

Change-Id: Ic12845f37d61bd197c3c7eaeecf742aac572947b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 22:49:49 +00:00
Yu-Ting Tseng
11ab38f690 Merge "Remove CACHED_PROC_STATES which is unused." into tm-qpr-dev am: f7a098295f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/21779083

Change-Id: I995d75f9a0cf98b329f0de672a7677307a434695
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 22:17:51 +00:00
Ankita Vyas
080e4b02c7 Merge "Add config for display Cloned Apps page in Settings." into udc-dev 2023-03-08 02:48:24 +00:00
Becca Hughes
e174f66a71 Move CredentialProviderInfo for test/settings (settings)
This is a precusor CL to adding a subtitle for settings
to use so we need to move CPI where it can be used
by settings, atest and CTS.

Test: ondevice & atest & cts
Bug: 253157366
Change-Id: Ief25f562eb5c2ca4438701de8a8e26941a8370a3
(cherry picked from commit on googleplex-android-review.googlesource.com host: 573e844275)
Merged-In: Ief25f562eb5c2ca4438701de8a8e26941a8370a3
2023-03-07 17:14:09 +00:00
Ankita Vyas
c4ccf52658 Add config for display Cloned Apps page in Settings.
Bug: 266548680
Test: manual
Change-Id: I6a89813dd266591ef001f9fc4ef2fde9427818c0
2023-03-06 06:25:56 +00:00
Yu-Ting Tseng
631105a2af Remove CACHED_PROC_STATES which is unused.
Test: atest ProcessStatsTest
Bug: 271160990
Bug: 260242581
Change-Id: I62ed4eac102cc8f9c9ce7ab1325410cddc834ca1
2023-03-03 14:42:12 -08:00
Ahaan Ugale
9cc184e3cb Merge "Update Autofill OWNERS" am: e35606efd3 am: b238ee99cc am: 96cb0fb4bd
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2459329

Change-Id: Ib174d04d8027e92e649d171cd02bfebc9d7aa94b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-01 13:41:12 +00:00
Ahaan Ugale
96cb0fb4bd Merge "Update Autofill OWNERS" am: e35606efd3 am: b238ee99cc
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2459329

Change-Id: I86a993dbc87ab3f7c59dd02b360be4e864d8cfef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-01 00:01:23 +00:00
Ahaan Ugale
b238ee99cc Merge "Update Autofill OWNERS" am: e35606efd3
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2459329

Change-Id: I3837d1677ee9769f9dd5ff88d6eedbdaf97b94e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-28 23:23:30 +00:00
Ahaan Ugale
4ee69bf644 Update Autofill OWNERS
Change-Id: Ibed8c68111fe6cab9152b4e0bf7d4378e4932806
2023-02-27 21:44:20 +00:00
Zaiyue Xue
6d939b34dc Fix b/265387286: The total percentage of all apps is not 100%
Bug: 265387286
Fix: 265387286
Test: manual
Change-Id: I654f8211a45c818f9a2d4867ac679e72c9ce6eb1
2023-02-24 19:19:28 +08:00
Philip Junker
6e6a7acbd2 Merge "Use separate SETTINGS_TURN_SCREEN_ON_ACCESS id for TurnScreenOnSettings" 2023-02-15 10:25:31 +00:00
Alex Johnston
97658e3a1f Merge "Implement OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS exemption" 2023-02-15 09:37:12 +00:00
Becca Hughes
db0ba1ad3d Enforce device policy in credential manager (settings)
Centralizes the provider list generation logic
in CredentialProviderInfo and enforce device
policy. Adds an test API that can be used by
CTS.

Bug: 261978289
Test: ondevice & cts
Change-Id: Idb7d75dc84e1a34025054075bc78b3c3d06f130f
2023-02-14 18:47:00 +00:00
Becca Hughes
04fe12449e Add back dialog when disabling provider
Adds back a dialog that will ask the
user to confirm their choice when
disabling the last credman provider.

Test: ondevice & make
Bug: 267816757
Change-Id: Icefde62efe7daa9aad2da7ad9d3fd37e40b4376b
2023-02-10 21:19:57 +00:00
Alex Johnston
2747dc6e8c Implement OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS exemption
OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS details:
* An app with this appop will be made exempt from all
  power restrictions, including app standby and doze.
* In addition, the app will be able to start fgs from
  the bg, and the user will not be able to stop fgs
  run by the app.

Changes:
* Implement the OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS

Bug: 246330879
Test: atest PowerAllowlistBackendTest

Manual testing:
- Give OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS appop to TestDPC app
- Verify the app can start fg services from the bg
- Verify fgs started by the app cannot be stopped
- Verify the app cannot be put into background restricted via Settings

Change-Id: If9e76076c59195f1e6e5f3eee3c8e7a0c754d8de
2023-02-10 13:37:38 +00:00
Varun Shah
f7f53973e2 Merge "Update references to the RUN_LONG_JOBS permission." 2023-02-09 21:40:35 +00:00
Philip Junker
79c0adad15 Use separate SETTINGS_TURN_SCREEN_ON_ACCESS id for TurnScreenOnSettings
Bug: 260056103
Test: manual
Change-Id: I34bbf823703efc5bedc7270537fb0eef57cd7369
2023-02-09 17:40:32 +01:00
TreeHugger Robot
cffd452993 Merge "Hide dialog when disabling Credential Manager providers" 2023-02-08 19:58:06 +00:00
Julia Reynolds
48bb894de6 Merge "Add unique id for NLS approval dialog" 2023-02-08 19:02:38 +00:00
Becca Hughes
cd453fb58c Hide dialog when disabling Credential Manager providers
In the CredMan settings page we have a dialog that asks
the user to confirm their action. It has been decided
by UX/product that this should be removed.

Test: make
Bug: 267816757
Change-Id: I61528e5ac5300cd1d7165bf0eadee794b28aa02d
2023-02-08 18:33:51 +00:00
Varun Shah
4109caa533 Update references to the RUN_LONG_JOBS permission.
The permission has been renamed to RUN_USER_INITIATED_JOBS.

Bug: 255038128
Test: build/manual
Change-Id: Ia32a6d564d62b2c0318c7afbd6de0ad9644e52d0
2023-02-08 17:43:13 +00:00
Chengfei Tao
af1a9183fa Merge "Better biometric subtitle with createConfirmDeviceCredentialIntent() API" 2023-02-08 09:11:04 +00:00
Julia Reynolds
92448ba2cc Add unique id for NLS approval dialog
Test: make
Fixes: 260071888
Change-Id: I6606fcd097247d1778e8e7acf7cec47c9c1ccc74
2023-02-07 14:52:39 -05:00
TreeHugger Robot
afb30cdd08 Merge "Make pre-upgrade footer appear more consistently" 2023-02-01 18:30:13 +00:00