Commit Graph

1317 Commits

Author SHA1 Message Date
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
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
Calin Juravle
46bddf8e36 Setup dex load reporter for system server
System server may load code at runtime from outside its original
classpath. In order to ensure this code is optimized (verified) we need to
report it to PackageManager which can optimize it during idle-maintenance
windows.

This CL sets up the reporting infrastructure for system server.

Test: atest DexManagerTest
Bug: 148774920
Change-Id: Ibd2ee38857b97bde426ee0a01c60543f1acb8671
2020-04-06 12:43:13 -07:00
Makoto Onuki
36bfe3e01c Merge "Add WTF when a system server wrapper can't be found" into rvc-dev am: bea34c409f
Change-Id: I046320bca3c7faa63fb296ceb36f3c0e5559e765
2020-04-02 20:51:09 +00:00
Makoto Onuki
a455e5e281 Add WTF when a system server wrapper can't be found
2nd try -- enable it only within the system server.

This is to detect someone trying to access system services too
early during a boot.

Bug: 149406139
Test: Boot with "adb logcat | grep -w SystemServiceRegistry" and make sure no wtf is logged
Change-Id: I64c6776cedaeb534d98621db2955d585e6846b8d
2020-04-01 17:27:58 -07:00
Benedict Wong
ef5732b053 Merge "Automatically set IPsec tunnel interface as up" into rvc-dev 2020-03-31 16:51:58 +00:00
Hall Liu
2d4f0566d3 Merge changes from topic "phonestatelistener-limit-rvc-dev" into rvc-dev am: 952697b886
Change-Id: I0f8dd0d1f7383e94b394cead42113c848b5b8ad4
2020-03-28 06:50:32 +00:00
Hall Liu
952697b886 Merge changes from topic "phonestatelistener-limit-rvc-dev" into rvc-dev
* changes:
  Add gating, logging for PhoneStateListener's limit
  Institute limit on PhoneStateListener
2020-03-28 06:48:56 +00:00
Hall Liu
ed6d6e69a8 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
2020-03-27 19:21:51 -07:00
JW Wang
a1d8d2dc1e Don't reference RollbackManagerService directly (2/n) am: de4cf91872
Change-Id: Ib4e36f4302ac9ea557283a28328fc04d1ac6d051
2020-03-27 01:40:49 +00:00
JW Wang
de4cf91872 Don't reference RollbackManagerService directly (2/n)
This is an effort to modularize RollbackManager.

As we move RollbackManagerService to apex/, SystemServer can't reference
RollbackManagerService directly. Let's use the class name to start the
service.

(Cherry-picked from 41a5d353cc)

Bug: 150347230
Test: m
Merged-In: Ied68ad031f84ea4a416ad779e9ddf4cc912bd7b9
Change-Id: Ied68ad031f84ea4a416ad779e9ddf4cc912bd7b9
2020-03-27 01:36:58 +00:00
Benedict Wong
d78ad3d41a Automatically set IPsec tunnel interface as up
This change makes IPsec tunnel interfaces automatically get brought up
once they are created. Originally this was considered to be an
additional safety check, as they would not be start routing traffic
until explicitly brought up. However, in the intervening time, the
NetworkManagementController now requires the NETWORK_STACK permission to
set an interface as up. Additionally, that call is a hidden API, and
thus not usable for use cases such as IWLAN.

Bug: 149348618
Test: FrameworksNetTests, CtsNetTestCases passing.
Change-Id: I55b63a748463a388e1e2991d2d5d6b3023545e60
Merged-In: I55b63a748463a388e1e2991d2d5d6b3023545e60
(cherry picked from commit 7c5704d177)
2020-03-25 06:14:13 +00:00
Benedict Wong
9110937f1a Merge "Automatically set IPsec tunnel interface as up" am: 7df882e039 am: 8c9064e86e
Change-Id: I01d10d2e1c0fcc52b88901609fae068d6d5268f7
2020-03-25 05:01:20 +00:00
Benedict Wong
7df882e039 Merge "Automatically set IPsec tunnel interface as up" 2020-03-25 04:18:50 +00:00