Commit Graph

15133 Commits

Author SHA1 Message Date
Martin Stjernholm
9789a45e19 Remove the internal DexLoadReporter for system server's own dex loads.
System server can only be compiled and signed by odrefresh in early
boot, so it is no use capturing dex load events for it.

Test: Build & boot
Bug: 254043366
Change-Id: If27569b784aeb882d3a20bd21a30137e6530e663
2022-11-22 13:14:49 +00:00
TreeHugger Robot
5a7f703be3 Merge changes from topic "art-module-service-manager"
* changes:
  Revert "Expose ServiceManager.waitForService as system API."
  Register ArtModuleServiceManager on system server initialization.
2022-11-21 20:31:46 +00:00
Devin Moore
9d601f128a Merge "Register new AIDL SensorManager" am: 0b703be0c5 am: 4ab7a43f65 am: efe53075fd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2292559

Change-Id: I71299fd6cbb290e3a34134bd8b3fa9d45db0d8da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 20:11:36 +00:00
Devin Moore
efe53075fd Merge "Register new AIDL SensorManager" am: 0b703be0c5 am: 4ab7a43f65
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2292559

Change-Id: Iaef62a9773b693aa509d9b2afc9e0c27bf28ac95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 20:04:23 +00:00
Devin Moore
4ab7a43f65 Merge "Register new AIDL SensorManager" am: 0b703be0c5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2292559

Change-Id: I1d1734cd16e7ecf0206bb90912b22db7c6d678e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 19:41:23 +00:00
Jiakai Zhang
30f8af2503 Register ArtModuleServiceManager on system server initialization.
Bug: 233915142
Test: adb shell pm art get-optimization-status com.google.android.youtube
Change-Id: I4e410e6ca47f70959e9c56f05d51d30d66735d8d
2022-11-18 18:12:48 +00:00
Josh Yang
33f5206cae Fix Wear OS boot issue.
Start status bar manager service but not register global actions
provider on watches.

Bug: 257861786
Test: device can boot
Test: atest StatusBarManagerServiceTest
Change-Id: Ib9a13f159084f8970628a5eb89ca9aa88b2d050e
2022-11-16 18:36:55 +00:00
Oli Lan
327a277684 Merge "Add isMainUser system API." 2022-11-15 18:05:57 +00:00
Oli Lan
f8a6722afc Add isMainUser system API.
This adds an API to determine if the context user is the designated
main user on the device. This user may have access to features which
are limited to a single user on the device.

In Android U, this will be the first user to go through setup.

On regular devices, this will be the system user, but on devices in
No Primary User / Headless System User Mode, it will be a different
user.

The isPrimaryUser System API is confusing because it actually always
returns the system user, even in headless mode. That API is deprecated
in this change.

On devices that are upgrading, if they are non-headless, the system user
will be the main user. If they are headless, the full user with the
earliest creation date will be given the flag.

Bug: 256624031
Test: atest UserManagerTest
Change-Id: Ib36f3b372f9bf33cbb097c4af63eb43515ac835b
2022-11-15 10:47:38 +00:00
Eric Biggers
43148289e3 Merge "Allow migration to SP to be rolled back by filesystem checkpoint" 2022-11-14 22:16:49 +00:00
Devin Moore
5b187ec931 Register new AIDL SensorManager
For now we can register both HIDL and AIDL sensorservice, and the vendor
can choose which one to use.

Test: atest VtsHalSensorManagerTargetTest
Bug: 205764765

Change-Id: I26ee176baea59f86281ae3a46ea580443064b5ef
2022-11-11 19:16:31 +00:00
Eric Biggers
ff116c879e Allow migration to SP to be rolled back by filesystem checkpoint
On upgrade from Android 13 or earlier, LockSettingsService is creating a
synthetic password (SP) for all users that didn't have one before, and
re-encrypting the user's CE key with the SP.  Currently this happens at
PHASE_BOOT_COMPLETED, since Weaver is not yet guaranteed to be available
at the previous phase, PHASE_THIRD_PARTY_APPS_CAN_START.

An issue with using PHASE_BOOT_COMPLETED is that during an upgrade,
PHASE_BOOT_COMPLETED happens after the userdata filesystem checkpoint
has already been committed.  Therefore, if a problem occurs with the
migration to SP, the changes won't be rolled back and the device will be
left in a broken state, recoverable only via a factory reset.

Important migrations like this should happen before the checkpoint is
committed.  Therefore, replace the use of PHASE_BOOT_COMPLETED with a
direct call into LockSettingsService in an appropriate place, similar to
the existing LockSettingsService.systemReady() call.

I also considered creating a PHASE_THIRD_PARTY_APPS_STARTED boot phase.
However, any new boot phase would become part of the services API
(services/api/current.txt), which is more than I'd like to do here.

Test: Made an intentionally broken build with
      LockSettingsService.onThirdPartyAppsStarted() changed to throw a
      RuntimeException at the end, crashing system_server.  Tested an
      OTA from tm-qpr2-release to that build, on a device that didn't
      have a lockscreen credential set on user 0 (so that user 0 was
      migrated to SP-based credentials just before the crash).  The OTA
      failed as expected and successfully rolled back to the original
      build, with user 0's data still accessible (this was not possible
      before this change).
Bug: 232452368
Change-Id: I77d30f9be57de7b7c4818680732331549ecb73c8
2022-11-09 05:48:18 +00:00
Antonio Kantek
bc0bb0da46 Add config for device specific IMMS
Bug: 245798405
Test: m
Change-Id: I337e2804871ce66553306696d6819b21e3307081
2022-11-08 20:00:43 +00:00
Yeabkal Wubshit
f19567bfaa Remove init for Wear Lefty Service
The service has been removed, so the init logic in the SystemServer
should also been removed.

Bug: 200706260
Tested: build passes
Change-Id: I3955571b66e7748f54b8136318a8d141c2dbcd15
(cherry picked from commit 7a5641422fe84106fced84daba3a0ee34f0d6aab)
(cherry picked from commit af07c8b703ae63666481fe89cc0b3f5c11c98741)
2022-11-03 22:56:20 +00:00
Wenhao Wang
7843bbb2f0 Init BackgroundInstallControlService
The BackgroundInstallControlService monitors background installed apps.
It can provide the list of those apps to the service clients via binder.
See the following desgin doc and PRD for more details.
go/bg-install-control
go/BIC-prd

Bug: 244216300
Test: manual test (verify the binder service is published)
Change-Id: Ic45770061c1291ef3e650337514fca99e0c683b8
2022-10-27 03:24:08 +00:00
Fabian Kozynski
c5976b7166 Merge "Proto dump from SystemUI." into tm-qpr-dev am: f50de68685 am: af3547caa4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19789974

Change-Id: I188db1d4b3bb3d179ba0ed029ec1f026f997c505
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 20:12:25 +00:00
Fabian Kozynski
af3547caa4 Merge "Proto dump from SystemUI." into tm-qpr-dev am: f50de68685
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19789974

Change-Id: Id649cad109553285502acd5160799dd86b831d0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 19:36:58 +00:00
Fabian Kozynski
afa802a889 Proto dump from SystemUI.
Needs to be called by doing `adb shell dumpsys statusbar --proto`
because using `dumpsys activity service` adds text to the dump.

Will also be dumped as part of the BR

Test: atest SystemUITests
Test: Used in CTS
Test: manual dump and BR
Fixes 237786667

Change-Id: I74abf65a76c059ea9bb5a14728192b6b683b7fc7
2022-10-20 14:25:24 -04:00
Winson Chiu
9efbc1352b Move SystemConfig to services.jar
Migrates getDefaultVrComponents used by SettingsProvider and
adds a flag for hidden API enforcement to ApplicationInfo.

This removes any dependency on SystemConfig from core/ and
so it can be moved into services/core and exposed as a
mainline API.

This was done instead of exposing all of the methods through
SystemConfigManager, as that is designed for use across
processes, and it's more efficient to expose SystemConfig
directly for modules running in the server process.

Although VrManager is a nullable service, so getDefaultVrComponents
had to live there to simplify the logic and maintain the existing
behavior.

Bug: 236389629

Change-Id: I4c2b14e1d34aaf439ceb1a3f9c8207e5d39fa6c2
2022-10-13 15:54:15 +00:00
Reema Bajwa
89b8a12b94 Register credential manager system service
Test: Local testing. Successfully able to call publishBinderServie and register service with system server
Bug:250713478

Change-Id: I5aec8b67ad81a38992d59c01efedfd55832d570e
2022-10-03 23:47:59 +00:00
Yeabkal Wubshit
8b7bf7ce4e Merge "Update Wear Service Class Names" 2022-09-30 16:39:53 +00:00
Anna Zhuravleva
8b0ce1fbac Merge "Add HealthConnect system service scaffold." 2022-09-30 15:05:30 +00:00
Neil Fuller
eea8043ace Merge "Extract time zone storage logic from AlarmManager" 2022-09-30 09:33:29 +00:00
Anna Zhuravleva
5bdd56de55 Add HealthConnect system service scaffold.
Setup scaffold for the Health Connect system service.
This service will provide system APIs to read and write
health data.

Bug: 249321392
CTS-Coverage-Bug: 248508112
Test: atest android.healthconnect.cts
Change-Id: I503c24a039c37d09895fc4f73a1de1a13eeb72b0
2022-09-29 16:03:25 +00:00
Neil Fuller
6bfc89fe62 Extract time zone storage logic from AlarmManager
Extract time zone storage logic from AlarmManagerService and add storage
for new time zone metadata.

This simplifies the AlarmManagerService, which would otherwise have to
expose the time zone metadata (or more knowledge of the storage would be
duplicated elsewhere).

The new metadata describes the confidence Android has in the current
time zone setting. It is intended to support upcoming APIs for SetUp
Wizard, which should ask the user to confirm the time zone.  Currently
the SUW tries to infer this by watching for time zone changes, but this
is error prone and prevents the time zone detector from defaulting the
time zone using low-confidence (but still better than the hardcoded
"GMT") time zones today.

This change also includes small refactorings to how AlarmManagerService
tries to keep the kernel's time zone offset in sync with Android's time
zone setting. Code comments have also been added to try to clarify
behavior.

The system property defaulting behavior previously in SystemServer is
moved to SystemTimeZone too so that all the logic associated with the
system property is now in one place.

Bug: 236612872
Test: manual testing + inspection / treehugger
Test: atest services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java services/tests/mockingservicestests/src/com/android/server/alarm/AlarmManagerServiceTest.java
Change-Id: I493d31043f22d32f12793e0c35110233c850ed85
2022-09-29 14:22:11 +01:00
Yeabkal Wubshit
778863456b Update Wear Service Class Names
See related for the refactoring that caused this CL

Bug: 243827192
Test: booted with a Wear devices without an issue
Change-Id: I17fd058033fa49c89dcbab5b826d3be3650b3a06
2022-09-29 00:16:48 +00:00
Joanne Chung
62d698f8e8 [DO NOT MERGE] Revert "Revert "[DO NOT MERGE] Remove selection toolbar code from build time"" am: 8be1773964
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19992748

Change-Id: I93dcd232eb6205c8c6361406b4ccd0863a0dea46
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 09:38:07 +00:00
Joanne Chung
990b2f2682 Merge "[DO NOT MERGE] Revert "Revert "[DO NOT MERGE] Remove selection toolbar code from build time""" into tm-qpr-dev 2022-09-23 09:05:50 +00:00
Hui Wu
8ad644d560 Merge "Remove impl of cloudsearch api" into tm-qpr-dev am: aa0ffaee0d am: 9af4e0bd3d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20019599

Change-Id: I39d3d6c07594b2e99d773a0feb46127dfa19e55d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 07:42:46 +00:00
Hui Wu
9af4e0bd3d Merge "Remove impl of cloudsearch api" into tm-qpr-dev am: aa0ffaee0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20019599

Change-Id: I8475cd36abd09908238d7e996dcc9f5dbf14b784
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 22:50:42 +00:00
Hui Wu
1a25dca0bc Remove impl of cloudsearch api
Bug: 246376638
Test: Manually Tested
Change-Id: I1740d5e1a0fb25a0fedea0a92e8a901684e35635
2022-09-22 15:08:56 -07:00
Joanne Chung
8be1773964 [DO NOT MERGE] Revert "Revert "[DO NOT MERGE] Remove selection toolbar code from build time""
This reverts commit 888e79f7a0.

Reason for revert: The feature is planned in QPR2. This should be removed before QPR1 deadline.

Change-Id: I8af811935171d7ff51d9ba2a9ea60437695d7966
2022-09-20 02:23:28 +00:00
Olivier Gaillard
800547e511 Move the logic to update the system server timeouts to the end of the startup process.
That change will help using smaller system server timeouts.

Bug: 209932320
Change-Id: I5f7ccfb75b410385def362031be60d87f00014cd
2022-09-09 08:49:40 +00:00
Jiakai Zhang
3abb09c7a5 Pass context to ArtManagerLocal.
ART Services needs the context for:

1. Getting PowerManager and AppHibernationManager
2. Getting resource strings such as R.string.config_systemUi

Bug: 236954191
Test: adb shell pm art optimize-package -m speed-profile -f \
  com.google.android.youtube
Change-Id: I80ffebdcf6f19e8ef0384f1df5877a79a7bf7384
2022-08-31 12:40:21 +01:00
Joanne Chung
c4d1b9e6d6 Revert "[DO NOT MERGE] Remove selection toolbar code from build time" am: 888e79f7a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19204106

Change-Id: I2eed4842d349cb38bd488793cd4bfdf672d4c3cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 09:19:11 +00:00
Joanne Chung
888e79f7a0 Revert "[DO NOT MERGE] Remove selection toolbar code from build time"
This reverts commit ade911b9c7.

Reason for revert: The feature is planned to run a study in QPR1
with the aim of launching in QPR-2. The code will be removed from
build time before QPR1 finalized.

Change-Id: Ida04260a1196121bb4084b527216aae1e4e6ec54
2022-08-08 11:02:44 +00:00
Xin Li
14543d1ec7 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: I5705ac7586cb73b7bc2bd60bb792d0a0a951ed74
Change-Id: I59a4fd917c95c8c9e258cd743cee2d950a46d9cd
2022-06-28 21:24:28 +00:00
Almaz Mingaleev
cc4630cdbf Merge "Remove TZUvA feature." am: 10c7acc51d am: 050cc50319
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/953617

Change-Id: I50d4b907cc0d88451b771ff414978dfeaa2e4913
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-24 19:31:24 +00:00
TreeHugger Robot
73e564fe80 Merge "Change Bluetooth apex mountpoint" into tm-dev am: 7a1c701712 am: a506d19b0f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19038084

Change-Id: I8fb452c5d9aef764141685fef00de87cb26246b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 10:50:54 +00:00
William Escande
7b012e937e Change Bluetooth apex mountpoint
Apex name has been changed to com.android.btservices
Changing mount point accordingly
Bug: 235892590
Test: Flash / boot bt / look logs & pair a device

Change-Id: I8cff5f6449ee19466b3df571a40e062964a9e46c
2022-06-22 13:19:14 -07:00
Neil Fuller
5d23852150 Remove TZUvA feature.
The feature was superseded by tzdata mainline module(s).

Bug: 148144561
Test: m
Test: see system/timezone
Change-Id: I5f67e34e9beb608d3cf3c4c072b268805865f6dd
Merged-In: I5f67e34e9beb608d3cf3c4c072b268805865f6dd
2022-06-13 11:44:35 +00:00
Neil Fuller
b9e72bab40 Remove TZUvA feature.
The feature was superseded by tzdata mainline module(s).

Bug: 148144561
Test: m
Test: see system/timezone
Change-Id: I5f67e34e9beb608d3cf3c4c072b268805865f6dd
2022-06-06 12:12:03 +01:00
Neil Fuller
9bbe9f695a Change package of NetworkTimeUpdateService
NetworkTimeUpdateService handles NTP time detection. timedetection (now)
has its own package. Change the package / update references before
proposed refactoring.

Bug: 222295093
Test: treehugger only
Change-Id: Ib5e5738325797dd4cda6c413bcfac8645b95bf59
2022-05-20 18:19:40 +01:00
Jing Ji
91209a5842 Merge "Include watchdog timeout configuration in dumpsys output" into tm-dev am: 85d5a6eb1d am: 854c3ebb5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18310155

Change-Id: Ib67d0fec4147bcb18ac3fceec11a598d56cedf26
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 23:31:03 +00:00
Jing Ji
0d9ea1b08d Include watchdog timeout configuration in dumpsys output
Bug: 209932320
Test: dumpsys
Change-Id: I682c6749b0a5c7c25e1ca9109ce187e28d70697f
2022-05-11 11:15:27 -07:00
Eric Biggers
7f747ed810 SystemServer: remove FDE workaround from runtime restart detection
Since Full Disk Encryption (FDE) is no longer supported, SystemServer no
longer needs to take FDE into consideration when deciding whether a
runtime restart has occurred.

Bug: 208476087
Change-Id: I5150f488f05a2d4ab3e5fcc2b92ec376a569e7e2
2022-05-10 04:22:17 +00:00
Joanne Chung
ade911b9c7 [DO NOT MERGE] Remove selection toolbar code from build time
The feature punts to QPR so disable or remove code from the build
time.

Bug: 222185402
Test: build pass and can boot to home
Test: make sure the toolbar using local implementation

Change-Id: Idad82c3c46ddce0731a26f4599de01eecb0e52c3
2022-05-05 18:09:42 +08:00
Jeff Sharkey
41b469e9d4 Merge changes from topic "PMS_remove_onlyCore"
* changes:
  Telephony: deprecate RESULT_SMS_RECEIVED_WHILE_ENCRYPTED
  BootReceiver: stop using IPackageManager::isOnlyCoreApps()
  StorageManagerService: stop using IPackageManager::isOnlyCoreApps()
  SystemUI: stop using IPackageManager::isOnlyCoreApps()
  SettingsProvider: stop using IPackageManager::isOnlyCoreApps()
  PackageManager: remove INSTALL_PARSE_FAILED_ONLY_COREAPP_ALLOWED
  PackageManagerService: remove unused support for onlyCore mode
2022-04-22 16:43:23 +00:00
TreeHugger Robot
5f7ebe5a86 Merge "DisplayManagerService: remove unused support for onlyCore mode" 2022-04-21 04:12:36 +00:00
Hans Boehm
6cb22623a8 Merge "Don't preload into nonexistent zygote" am: c3a27297c4 am: 3aab9125d9 am: 80b4f59eec am: 87503f91cf am: 908445b37d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2067474

Change-Id: I68a8fe8a6646e69a4dde907c63e3bc9d46e66ac8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 21:19:19 +00:00