Commit Graph

178 Commits

Author SHA1 Message Date
Chaohui Wang
14f7f6c818 Merge "Hide Show System on SPA version App languages" into udc-dev am: 122ba16792 am: 3f05e59982
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23486250

Change-Id: I0837bd1fd686f4d77c148a2405fe5ae8a644ac99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 18:04:47 +00:00
Chaohui Wang
9ab4ef224e Hide Show System on SPA version App languages
To align with non-SPA version.

Fix: 285264906
Test: Visual check on App languages
Change-Id: I7f8b0aec0e33fcb46939075458a8b0a710fac640
2023-06-01 09:20:42 +00:00
Chaohui Wang
2a9188e67e Merge "Fix crash of PictureInPicture" into udc-dev am: 5b042e2feb am: 2c4c75ebc6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23408018

Change-Id: Ida03b8db306928177905957266b147166e43c55b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 07:27:17 +00:00
Chaohui Wang
ce56dcc30b Fix crash of PictureInPicture
This follows change I3115cf1b99a305efef192a0dcf3e809eb7903d0a

PackageManager.getPackageInfoAsUser() will throw exceptions when the
package is too large which is a known issue to PackageManager but very
low priority given resourcing constraints. As per the PackageManager
team suggestion, catch the exception on the app side to alleviate the
impact to the PictureInPicture & App info page.

Fix: 283076353
Fix: 283354211
Test: Unit test
Change-Id: Iad2bf9fbfca6ee7f604fec1c4afa1b9382f6ec7e
2023-05-24 19:41:20 +08:00
Chaohui Wang
b39729c7aa Merge "FRP bypass defense in the Settings App for SPA" into udc-dev am: 7c042f374b am: 48c93451a8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22948156

Change-Id: I07bddd6922e9aea9270eeb9d769ee6b63f46dafd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-05 09:18:56 +00:00
Chaohui Wang
7c042f374b Merge "FRP bypass defense in the Settings App for SPA" into udc-dev 2023-05-05 07:57:39 +00:00
Chaohui Wang
e790765a05 Merge "Log app special permission change for SPA" into udc-dev am: 804214c160 am: 534f046035
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22990957

Change-Id: Ic93c794cabf05b997b980fc00111d67ac2f035cc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-05 04:19:30 +00:00
Chaohui Wang
c16a088a73 Log app special permission change for SPA
Align with current logging and no package name.

Bug: 280575002
Test: Manually with App Op Permission pages
Change-Id: Ia0dde06769b1e08f8cec7cb1d87a8ca1baa80068
2023-05-04 16:36:02 +08:00
Chaohui Wang
09614cea58 Merge "Use correct App info screen's trash can icon" into udc-dev am: d66335ae1c am: 6c872cd4c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22981558

Change-Id: I9b05492184b30f4f926007fb39c86b31d5ee2b54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-03 08:08:38 +00:00
Chaohui Wang
2aca9d40f8 Use correct App info screen's trash can icon
Fix: 280120259
Test: Visual
Change-Id: I954c344c3f5fdd256de7519f1534c982c084a521
2023-05-03 11:59:43 +08:00
Chaohui Wang
80462c370b FRP bypass defense in the Settings App for SPA
Over the last few years, there have been a number of
Factory Reset Protection bypass bugs in the SUW flow.
It's unlikely to defense all points from individual apps.

Therefore, we decide to block some critical pages when
user doesn't complete the SUW flow.

Fix: 280154358
Test: Unit test
Change-Id: I06e73386711d5ad13c89d033cf0fe3164781c0ef
2023-05-03 10:53:27 +08:00
George
2da88dcfb5 Fork the NfcTagAppsSettings page to SPA am: 750cd809fe am: 81fe8bb38e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22939919

Change-Id: Icb95d7948769e699079d8cc138f7c26f5304e602
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 14:45:12 +00:00
George
750cd809fe Fork the NfcTagAppsSettings page to SPA
The page is located at "Apps > Special app access > Nfc launch"

Bug: 267404181
Test: make RunSettingsRoboTests ROBOTEST_FILTER=NfcTagAppsPreferenceControllerTest
Change-Id: I9fb4a68634f0b6f20d5f87601c1175ced33daad5
2023-05-02 10:15:53 +00:00
Kweku Adams
a8498b14f9 Merge "Use string notifications_disabled instead of off" into udc-dev am: 83c04b32d1 am: bdf3cb8df9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22938598

Change-Id: I1cbd994f1906de6e5e6eea57bb7adb89f0a925f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-01 16:57:21 +00:00
Chaohui Wang
ca615997ea Use string notifications_disabled instead of off
notifications_disabled was changed to off in
Change: I5f84d09f223efd478461ded93aeac82bf7b128d8

And reverted from off to notifications_disabled in
Change: Iaad301c5513478fb95e40987ea3ccb4f923d71fa

This usage is branched from AppNotificationPreferenceController.java,
and missed in revert.

Bug: 272603842
Test: Visual
Test: Unit test
Change-Id: I5b8466134c1342e10de7a2ead8c52931e0c19377
2023-04-29 15:42:09 +08:00
Julia Tuttle
a4877c4410 Merge "Fix a couple compiler warnings in Settings" into udc-dev am: 7b3df1c080 am: e35f0679e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22897913

Change-Id: I119564fb748f9fc4f8b0bf533a3fe988bdfb7165
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-28 19:19:15 +00:00
Julia Tuttle
75f566bce9 Fix a couple compiler warnings in Settings
Bug: 277938609
Test: builds
Change-Id: Ib5e236220dfcfddec60c9277d06ffbde9645bb73
2023-04-28 18:19:30 +00:00
Treehugger Robot
c2c783ef17 Merge "Update the proper App battery usage string on App info page" into udc-dev am: bc67d885ec am: d5f6278e49
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22753622

Change-Id: I6d3e0541db7d4c04d5c72f5606a20b7e956ad2b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-20 20:53:29 +00:00
Treehugger Robot
bc67d885ec Merge "Update the proper App battery usage string on App info page" into udc-dev 2023-04-20 10:50:46 +00:00
Pavel Grafov
542b0fd031 Merge "Fix uninstall button can't click problem" into udc-dev am: b8d639c8fe am: ccda5d60ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22645501

Change-Id: I9859fa1d5dc8ee2880a4a4363c1819dfe48ec4bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-19 14:28:49 +00:00
Pavel Grafov
b8d639c8fe Merge "Fix uninstall button can't click problem" into udc-dev 2023-04-19 12:50:27 +00:00
Yanting Yang
3be454f967 Update the proper App battery usage string on App info page
Bug: 278045681
Test: visual
Change-Id: I4da671615f11554e2cd64f3a801252df5c0ba6f4
2023-04-19 17:00:46 +08:00
ot904699
f1f4097f20 Fix uninstall button can't click problem
Install CtsVerifier.apk and CtsEmptyDeviceAdmin.apk. When CtsEmptyDeviceAdmin is active device administrator, “Uninstall” button can’t click, we can’t uninstall the apk.

Compared with Android T, the ability to uninstall Active admin's apk is disabled by default on Android U. Make this cts test pass after modifying the setup code

Bug: 277545241
Test: manually
1. Enter the CtsVerifier apk
2. Click “Device Admin Uninstall Test”
3. Click “ENABLE ADMIN”,  then click “Activate this device admin app”
4. Click “LAUNCH SETTINGS”
(cherry picked from https://partner-android-review.googlesource.com/q/commit:67ecb5aef52d18332402d88a418aa4b87d047b87)
Merged-In: I200cfe56a3529e9c6ee5eebf4b2606237608a4b2
Change-Id: I200cfe56a3529e9c6ee5eebf4b2606237608a4b2
2023-04-19 03:21:53 +00:00
Chaohui Wang
59fd95e696 Merge "Migrate latest changes in "Alarms and Reminders"" into udc-dev am: a42119c6a8 am: a6bb9038c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22635695

Change-Id: Ife9a26287e2fcf0e86d9a007cad3e0e8425f4a82
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-15 17:29:32 +00:00
Chaohui Wang
f6caf24369 Migrate latest changes in "Alarms and Reminders"
To the new spa version.

Fix: 278113001
Test: Follows the instruction in bug
Test: Unit test
Change-Id: Iff38f01cd34c7b56ff23f4a17cb6ec1b78fba1ee
2023-04-14 13:46:24 +08:00
Treehugger Robot
f2e19ca33f Merge "Add a feature flag for SPA metrics" 2023-04-13 06:11:15 +00:00
Treehugger Robot
b6f09d0f91 Merge "Fix App languages for work profile" into udc-dev am: 568ba14b9b am: 5a88b6f2ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22530839

Change-Id: I3c412e417aab68353affa987f73c579deea523c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 02:18:21 +00:00
Sunny Shao
049184fdec Add a feature flag for SPA metrics
- Add a new SETTINGS_ENABLE_SPA_METRICS flag.

Bug: 277540990
Bug: 253979024
Test: atest SpaActivityTest SpaLogDataTest MetricsDataModelTest
Change-Id: Iba7a44715cf6ba78c3b84d559faf71a0be33d8d3
2023-04-13 02:02:34 +00:00
Sunny Shao
b0885a155a Add a feature flag for SPA metrics
- Add a new SETTINGS_ENABLE_SPA_METRICS flag.

Fixes: 277540990
Bug: 253979024
Test: atest SpaActivityTest SpaLogDataTest MetricsDataModelTest
Change-Id: I6da801691fd34fd133ec25d3a45ed6124bec51a1
Merged-In: Iba7a44715cf6ba78c3b84d559faf71a0be33d8d3
2023-04-12 21:38:40 +08:00
Treehugger Robot
568ba14b9b Merge "Fix App languages for work profile" into udc-dev 2023-04-12 09:35:32 +00:00
Chaohui Wang
4388e217d8 Merge "Display App installed in other user in All Apps" into udc-dev am: 4c1e924442 am: 03e8ebc4dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22546422

Change-Id: Ifa44a57f688fcbac11a4c77942a74d1cabc395ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 06:04:32 +00:00
Chaohui Wang
4c1e924442 Merge "Display App installed in other user in All Apps" into udc-dev 2023-04-11 04:02:39 +00:00
Treehugger Robot
825450f1b8 Merge "Ignore ActivityNotFoundException from app launch" into udc-dev am: 35f9d486a5 am: 227b55d8c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22347563

Change-Id: I442e08f1badd0ff0570df968a683c0b2228bb177
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-10 08:04:09 +00:00
Treehugger Robot
35f9d486a5 Merge "Ignore ActivityNotFoundException from app launch" into udc-dev 2023-04-10 06:48:17 +00:00
Chaohui Wang
9661f163c3 Fix App languages for work profile
Use the correct work profile context to fix.

Fix: 277536202
Test: Manually with App languages when work profile is installed
Change-Id: Ibc3bb47127228c8dc6ebf073cd7881727321d5c8
2023-04-10 13:32:24 +08:00
Chaohui Wang
c688f93ed9 Display App installed in other user in All Apps
Only for admin user.

Also clean up unused getInstallationStatus().

Fix: 277299765
Test: Manually with All Apps when multiple users is on
Test: Unit test
Change-Id: I4de681c101a605e3517dcd8765bf7a95d1b76417
2023-04-10 03:06:01 +08:00
TreeHugger Robot
4c0a765528 Merge "Fix App battery usage crash" into udc-dev am: d25bd214ae am: 7232cf4cc5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22414534

Change-Id: Id32990d545c33ec89cf604d56ec2d7d732993f15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-04 05:30:36 +00:00
Chaohui Wang
ecd8ffb08b Fix App battery usage crash
userContext.getApplicationContext() returns null, which cause crash.

Use context instead to fix.

userContext was used to support multiple profiles, since the app's user
id is also passed to getAppBatteryUsageData(), userContext is not need.

Fix: 269545838
Fix: 275957358
Test: Manually check the battery usage is still correct if an app is
      installed on two profiles
Change-Id: I41a80e4c6edc338affb6eec0cf12da3c438cd7fd
2023-04-04 00:15:29 +09:00
Chaohui Wang
f8adb7dca7 Ignore ActivityNotFoundException from app launch
Only happens after package changes like uninstall, and before page auto
refresh or close, so ignore this exception is safe.

Fix: 276023155
Test: Click the open button ASAP after uninstall an app from App Info
Change-Id: I62314fda0947dee5e05263d1079ff422688527c3
2023-03-30 21:41:30 +09:00
TreeHugger Robot
73f8cb55b1 Merge "Correct the disable button text" into udc-dev am: 107690cb55 am: f04f7fcf52
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22307475

Change-Id: I6a2078c1eb99692b75b73e0f757c8a6491e217a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-29 02:13:08 +00:00
Chaohui Wang
ac9735457d Correct the disable button text
This is a type before, use the correct string resource.

Also remove the title to align with before SPA migration.

Fix: 275344620
Test: Manually with Settings
Change-Id: Id80cd1e3e7092cb645cb6ccb563e8fd11c5a40e5
2023-03-28 23:12:47 +09:00
Josh Hou
5139a9b98c Merge "[Panlingual] Can't set per-app languages for apps on work profile page" into udc-dev am: b1f9d26174 am: f8a3717611
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22173332

Change-Id: I39e37e5f705ef0934aa740e3f1bef1ba12fcd58b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 07:28:46 +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
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
5fc73ac4b0 Merge "Fix not displaying "Allow restricted settings"" into udc-dev am: ac67b77af7 am: 989a724787
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22135265

Change-Id: Ifca2b640e3963bbc365ad10e5be14db954f891ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 23:27:53 +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
Chaohui Wang
8b31ed172e Merge "Move LogEvent action to Settings" into udc-dev am: ba39aa506b am: 4b86d5df4a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22067164

Change-Id: I40bbed089befb8e3abaa080aa792fb06770727c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-16 06:55:41 +00:00
Chaohui Wang
4b964aa552 Move LogEvent action to Settings
Spa cannot refer SettingsEnums, move the action to Settings.

Bug: 269821172
Test: Make Settings
Change-Id: I033f4d046736b109de679e139caac75b3e4071b1
2023-03-14 16:46:47 +08:00
Ankita Vyas
18fc54b53e Merge "Display toast for clone app creation and completion in App Info page." into udc-dev am: f9c62f2275 am: 9dc72b2f94
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/21809544

Change-Id: I34a93564916fac6f74e2097cbe5dea508ac3a235
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 06:16:52 +00:00
Ankita Vyas
f9c62f2275 Merge "Display toast for clone app creation and completion in App Info page." into udc-dev 2023-03-09 05:10:55 +00:00