Commit Graph

1329 Commits

Author SHA1 Message Date
Collin Fijalkovich
4512e77b7c Merge "Introduce TracingServiceProxy System Services" 2021-02-08 17:24:06 +00:00
Josh Gao
9a8b4358d3 Extract tombstone tracking to a separate service.
In preparation for making tombstones available to apps, extract the
tombstone tracking code from BootReceiver to its own service.

Bug: http://b/159164105
Test: manual
Change-Id: I789f41f12a8be312b6e966226646c4ec4becc1aa
2021-02-03 14:08:12 -08:00
Chalard Jean
1595b1aa38 Merge "Start VcnManagementService after ConnectivityService" 2021-02-01 04:38:08 +00:00
Benedict Wong
919d9cc1a6 Start VcnManagementService after ConnectivityService
This change alters the start-up order of the VCN and Connectivity
services.

Bug: 174636568
Test: atest FrameworksVcnTests
Test: atest FrameworksNetTests
Change-Id: I1af29d52b94e77781eb2bf2082fcbe43648ee800
Merged-In: I1af29d52b94e77781eb2bf2082fcbe43648ee800
2021-01-28 08:15:09 +00:00
Collin Fijalkovich
a5ceac1196 Introduce TracingServiceProxy System Services
Introduces a new SystemService to act as intermediary between the
Perfetto trace daemon and Traceur.

Bug: 175591887
Test: adb shell service call 1 i32 0/1

Change-Id: Idea7761a8479827f0cfa561e56ba2beac3072939
2021-01-27 13:40:58 -08:00
Josh Gao
b79bd2867f Merge "Thread.sleep takes milliseconds, not seconds." 2021-01-26 23:36:05 +00:00
Treehugger Robot
d7bac025fb Merge "Add app hibernation service stubs" 2021-01-26 22:23:13 +00:00
Josh Gao
e8575f53f8 Thread.sleep takes milliseconds, not seconds.
Test: treehugger
Change-Id: I822937ecd7778f0b9cf2fd22d281ace195f7cb56
2021-01-25 18:30:34 -08:00
Josh Gao
9f7a73fc21 Merge changes I0f1d59ae,I2f63bffb
* changes:
  fdtrack: GC before checking fd count.
  Move system_server fdtrack implementation to Java.
2021-01-14 01:22:22 +00:00
Kevin Han
63576ff7d3 Add app hibernation service stubs
Add app hibernation system service and manager class and start it when
app hibernation flag is enabled.

The actual API is currently stubbed and will be implemented in further
CLs.

Bug: 175829330
Test: adb shell device_config put app_hibernation
app_hibernation_enabled true
adb reboot
adb shell services list

Change-Id: Ide2758d3eaabae7d3df6356d4b6435c5137c554d
2021-01-13 16:43:11 -08:00
Lorenzo Colitti
682686bdff Stop using IIpConnectivityMetrics in ConnectivityService.
Currently, ConnectivityService calls the IpConnectivityMetrics
service class directly to log default network events. This is
incompatible with ConnectivityService being in a mainline module.
Replace direct access to IIpConnectivityMetrics with public
methods in IpConnectivityLog, which is @SystemApi class.

The new methods are not yet @SystemApi, but they can be made so
if desired. Alternatively, these metrics could be deleted.

Also remove the IpConectivityMetrics service from the
service-connectivity JAR, and go back to starting it from
SystemServer.java, which is what was happening a few hours ago
before aosp/1542626 was merged.

Test: builds, boots
Test: atest FrameworksNetTests
Test: "dumpsys connmetrics" shows events, including default network events
Change-Id: I9d6147d93590363a2f8f83f39f05c03d001b4851
2021-01-12 23:19:49 +09:00
Remi NGUYEN VAN
2f0fafeb11 Merge "Revert^2 "Move service-connectivity to the tethering APEX"" 2021-01-12 01:35:30 +00:00
Josh Gao
192102c35b fdtrack: GC before checking fd count.
Test: treehugger
Change-Id: I0f1d59ae4240a24f8b8e4b015c1923acb1140bce
2021-01-11 13:56:10 -08:00
Josh Gao
3ede7b4930 Move system_server fdtrack implementation to Java.
Test: manual
Change-Id: I2f63bffba55d6fc82d128c7e7546a193e0f62a73
2021-01-11 13:56:10 -08:00
Remi NGUYEN VAN
86a4035283 Revert^2 "Move service-connectivity to the tethering APEX"
As part of modularization of ConnectivityService and expansion of the
Tethering module scope, move service-connectivity.jar into the tethering
APEX, and load it from there.

This rolls forward the change. The original topic was reverted because
of a bad merged-in clause; this is fixed and re-verified in this topic.

Bug: 171540887
Test: m, device boots and connectivity

Change-Id: I293b09c0dc04c6ccafa30cd0f1a63efe32283604
2021-01-08 01:23:36 +00:00
Treehugger Robot
1ef739b3fa Merge changes from topic "revert-1532910-connectivity_jar_in_apex-LKXFLQGLIU"
* changes:
  Revert "Set setCurrentProxyScriptUrl as public"
  Revert "Move service-connectivity to the tethering APEX"
2021-01-07 15:25:03 +00:00
Andrei-Valentin Onea
29ed176b46 Merge changes from topic "preinstall-overrides"
* changes:
  Add force_non_debuggable_final_build_for_compat
  Allow overriding compat config prior to install time.
2021-01-07 14:04:12 +00:00
Pete Bentley
3e157018f7 Revert "Move service-connectivity to the tethering APEX"
Revert submission 1532910-connectivity_jar_in_apex

Reason for revert: Breaks boot tests: b/176969905
Reverted Changes:
Ie41a5b569:Set setCurrentProxyScriptUrl as public
Id7b6a4664:Move service-connectivity to the tethering APEX
Ia7cb83834:Add service-connectivity to tethering APEX

Change-Id: I1c369dd8a6527513f8fc1a5cacde59d78d104c7e
2021-01-07 13:51:18 +00:00
Remi NGUYEN VAN
dbbf7a3b4e Move service-connectivity to the tethering APEX
As part of modularization of ConnectivityService and expansion of the
Tethering module scope, move service-connectivity.jar into the tethering
APEX, and load it from there.

Bug: 171540887
Test: m, device boots and connectivity
Change-Id: Id7b6a4664ae73224b9ab219c94f56d603a62ee5a
2021-01-07 11:52:42 +09:00
Andrei Onea
224f8c01d7 Allow overriding compat config prior to install time.
If the user tries to apply an override for a package that is not yet
installed, the override is put into a 'deferred' bucket, to be validated
upon installation.
Overrides are rechecked every time an app is installed, updated or
deleted.
If a deferred override is valid at install or update time, it gets
promoted to a regular override.
If a deferred override cannot be applied upon app installation or
update, it remains deferred.
If an app is deleted, all its overrides become deferred.
When any of the reset commands are called for a given package, that
removes both regular and deferred overrides.

Bug: 158696818
Test: atest CompatConfigTest
Test: atest OverrideValidatorImplTest
Change-Id: I50eab62214d1325ec6185ddcfe9e8f425e11c98b
2020-12-30 14:37:12 +00:00
Xin Li
d31ee38811 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I78222391b83a4add8e964340ec08bb8a1306e1c6
Change-Id: I28bbf40820674675ccf765c912aa8140d3f74ab2
2020-12-02 00:38:58 -08:00
Yi Kong
0c51fb20dd profcollectd: Only start the forwarding service if enabled through device config
Test: boot profcollect build
Bug: 79161490
Change-Id: I8058594fd78327bbd0983c7f39391dc82e18e2a3
2020-11-03 08:51:07 +08:00
Benedict Wong
e2dacc7411 Add shell VcnManagementService
This patch adds a shell of the VcnManagementService and VcnManager

Bug: 163431877
Test: Compiles, Boots
Change-Id: I1f3d8ab9c9bff7d419ea6d3edaae3b6b41b1d775
2020-10-27 20:09:06 -07:00
Aaron Huang
944025aef2 Create service-connectivity.jar
Create a new target service-connectivity to split
ConnectivityService from services.core.

Add ConnectivityServiceInitializer for initializing
ConnectivityService and add systemReady() in
ConnectivityManager so that SystemServer can call systemReady()
through ConnectivityManager which won't change current behavior.

Bug: 158268939
Test: make target-java, make host-java
      atest FrameworksNetIntegrationTests
      atest FrameworksNetTests
      make, device can boot,
      atest CtsStrictJavaPackagesTestCases
      wifi and mobile data work.
Change-Id: I99401772ba9c1c34adca20040da3c7c72d86ddd9
Merged-In: Ie732bfaf381404af0bb599ca2f421a96e7aa4257
2020-10-16 22:46:14 +08:00
Yi Kong
ab6c5c191b Introduce ProfcollectForwardingService am: a0bd2a99ee am: fbeb0d8002 am: 4914fdc68c am: 4e400a6f4e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1425268

Change-Id: Ic5961ad3b5c4aceaad32bca1ed86342fb00223f9
2020-09-11 05:02:45 +00:00
Yi Kong
a0bd2a99ee Introduce ProfcollectForwardingService
Bug: 79161490
Test: boot and observe logcat
Change-Id: I0413c52f08b930b1e42971acc7f50e2e2da52f99
Merged-In: I0413c52f08b930b1e42971acc7f50e2e2da52f99
2020-09-11 05:57:02 +08:00
Roshan Pius
e9bae9c27c Merge "Revert "Revert "SystemServer: Dynamically load wifi-service"" into rvc-qpr-dev am: b2c8cb2a53
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12282648

Change-Id: I4f0c4543aa511bc33d0c639488a03504aa265877
2020-08-04 00:45:39 +00:00
Roshan Pius
2c17b6690f Revert "Revert "SystemServer: Dynamically load wifi-service"
Revert submission 10144846-revert-10103769-load_wifi_service_dynamically-XZNQJHXURR

Reason for revert: Changes in build system to store uncompressed and aligned DEX files for java libs in APEXes.

Reverted Changes:
Icc0b680c2: Revert "SystemServer: Dynamically load wifi-servic...
I83a2f93e3: Revert "product: Remove wifi-service off SystemSer...


Bug: 148099857
Bug: 162371380
Bug: 162746981
Test: Compiles
Change-Id: I6c3f36873cae476dc76fd353d20fb6bd2c177f0b
2020-08-03 17:27:26 +00:00
Nicolas Geoffray
dd85ce6a50 Merge "Remove old code that isn't relevant anymore." am: 22e3e74e4b am: 0642fc19f3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1354663

Change-Id: Ic39e4a46f50fd3ab18dba5c859ec39c9458191a0
2020-07-07 09:03:34 +00:00
Nicolas Geoffray
af6d3a6cb5 Remove old code that isn't relevant anymore.
In order to reduce the CorePlatformAPI surface.

Test: m
Bug: 154796679
Change-Id: I428fe21d764bf6897942d7e67d85297d826d3716
2020-07-02 17:24:21 +01:00
vichang
26ed852eaf Merge "Use new package name for ZoneInfo and libcore.timezone" am: af6f8e2301 am: 64937407f2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1346485

Change-Id: I5ded5092e4c7706f58417a5c97f3207524b44a95
2020-06-30 17:23:46 +00:00
Victor Chang
2ea241f6ee Use new package name for ZoneInfo and libcore.timezone
Bug: 141747409
Test: None
Merged-In: Id99a345ec024179295063c3644f72c062cb50554
Change-Id: Id99a345ec024179295063c3644f72c062cb50554
2020-06-30 13:53:47 +01:00
Neil Fuller
29867f046d Merge "Be more defensive around invalid tzids" am: f60c302dad am: 96c57398b4
Change-Id: If8695ee257155eaedc901aa797f1939eab0c721e
2020-05-26 10:54:50 +00:00
Neil Fuller
26fe60a188 Be more defensive around invalid tzids
Add checks during boot in case the persist.sys.timezone property is set
to a bad ID.

This can happen in the rare case of a mainline rollback: i.e. if a device has
been set to a new ID and then the update is rolled back. Using GMT as a
fallback probably works without this change (it does in java.util.TimeZone),
but relies on all code, including native code that uses
persist.sys.timezone directly, knowing to interpret a bad ID as "GMT".
This commit makes that choice more explicit and defensive.

This change also removes the possibility of IOException, which is never
thrown, from some ZoneInfoDb methods.

Bug: 155738410
Test: boot with a valid id, verify persist.sys.timezone is unchanged
Test: boot with an invalid id set,  verify persist.sys.timezone is "GMT"
Merged-In: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Change-Id: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Exempt-From-Owner-Approval: Approved / landed internally
2020-05-26 10:19:53 +00:00
TreeHugger Robot
5ab2f9aa78 Merge "Fixed when SystemServerInitThreadPool.shutdown() is called." into rvc-dev am: 3ce5a9b85b
Change-Id: I0b4b9ad545f2cebd9edd4adf3259ac34371bb79d
2020-05-11 22:09:07 +00:00
felipeal
fc5304075e Fixed when SystemServerInitThreadPool.shutdown() is called.
The class' Javadoc says it's shut down after P HASE_BOOT_COMPLETED, whic was
not the case.

Test: manual verification / boot
Fixes: 156257347

Change-Id: I3c8b24c6855c7c83cdf1eacc637b8e064a121fe3
2020-05-11 10:36:59 -07:00
Amy Zhang
0309df1780 Merge "Start TunerResourceManager when FEATURE_TUNER is supported" into rvc-dev am: 71f11a7ec5
Change-Id: I70a1ddac77f1be879809c4a7b79be4c6e8b13b9f
2020-05-07 17:50:52 +00:00
Amy Zhang
6b4b728d8c Start TunerResourceManager when FEATURE_TUNER is supported
Test: make services
Bug: 147380513
Change-Id: I56201db818018b019dfa7d442e3905fba30806d7
2020-05-06 11:58:59 -07:00
Yurii Zubrytskyi
0e87d5ebc1 Merge changes I8942a2db,Ibcef3f40,I6e765563 into rvc-dev am: 930f1d10bc
Change-Id: I7ba1058a91b3e2140e05b69d749cc65d62511251
2020-04-22 18:42:20 +00:00
Yurii Zubrytskyi
683f2b1acc [incfs] Notify IncrementalService about system startup later
It needs system to be ready to bind to services, which is much
later in the boot process

Bug: 151241369
Test: boot up Android, make sure no error messages from
  IncrementalService trying to bind a DataLoader when the OS
  can't bind services yet
Change-Id: Ibcef3f405965ee07c5b8adbb41f068be734bde9e
2020-04-22 00:39:44 -07:00
Jing Ji
872d122967 Merge "Set a default wtf handler for system_server at initialization" into rvc-dev am: 35c6b8f0ab
Change-Id: Iec5d3f8aed88e1b32f96ea6998854fde32c21179
2020-04-20 06:10:58 +00:00
Jing Ji
6674e0d654 Set a default wtf handler for system_server at initialization
In case the ActivityManagerService hasn't started yet.

Bug: 153704326
Bug: 153598920
Test: Manual - induce wtf logs in early-booted services
Change-Id: I2b444cf70d9126963084ab15f9cd17fe5b464529
2020-04-17 12:48:08 -07:00
Soonil Nagarkar
ff4680f1e0 DO NOT MERGE Move LMS to ease merge conflicts am: 1716a62ac1
Change-Id: I57c81f3755dc5966800277b9c8e94104ae3ae58e
2020-04-14 22:14:01 +00:00
Soonil Nagarkar
1716a62ac1 DO NOT MERGE Move LMS to ease merge conflicts
Cherrypick change from master moving LMS, so that merge conflicts will
be easier to resolve.

Bug: 153568386
Test: presubmits
Change-Id: I8eba22622cc5f4d11c1a928b6cf3883cbf96caba
2020-04-14 12:04:12 -07:00
Hall Liu
0a5365b9c0 Add gating, logging for PhoneStateListener's limit
Add gating via PlatformCompat and DeviceConfig and logging via
PlatformCompat to the limit instituted on per-process listeners

Fixes: 152074216
Test: atest CtsTelephonyHostCases
Change-Id: I4d6681d90705b68c3349f4124e434a29b50fd3a2
Merged-In: I4d6681d90705b68c3349f4124e434a29b50fd3a2
2020-04-07 17:13:19 -07:00
Calin Juravle
9867e0b6c3 Merge changes from topic "server-reporting" into rvc-dev am: 11bdb5dfb4
Change-Id: I3fda3465d0be8f235c9e8a2391f68bc441724c13
2020-04-07 18:46:32 +00:00
Calin Juravle
11bdb5dfb4 Merge changes from topic "server-reporting" into rvc-dev
* changes:
  Report SystemServer classpath to PackageManager
  Setup dex load reporter for system server
2020-04-07 18:42:29 +00:00
TreeHugger Robot
037c545335 Merge "Make system_server profilable on user." into rvc-dev am: 4b500ced32
Change-Id: I57df67e59b6ed1187e0bb0893f6020d9f62f489f
2020-04-07 09:55:41 +00:00
Florian Mayer
876e06aa97 Make system_server profilable on user.
Test: m with matching SELinux change. profile sys_srv.

This is a cherry-pick of be583be3ed.

Bug: 151140716
Change-Id: I545b758421ea7527d75b5d2756a6b11ae475e7de
Merged-In: I545b758421ea7527d75b5d2756a6b11ae475e7de
2020-04-07 08:46:11 +00:00
Calin Juravle
d75a077d85 Report SystemServer classpath to PackageManager
This will enable us to optimize system server classpath during
idle-maintenance windows.

Test: m
Bug: 148774920
Change-Id: Ibd7641cd10944bb5d7740486d259a412f882cd1f
2020-04-06 12:43:15 -07:00