Commit Graph

1343 Commits

Author SHA1 Message Date
Kalesh Singh
6157f7be74 Merge "Add memtrackproxy system server service" 2021-04-07 15:29:46 +00:00
Kalesh Singh
61bd727724 Add memtrackproxy system server service
Serve memtrackproxy service from system server.

This service enforces access control on requests for memory usage stats
to the memtrack HAL based on the call context's PID and UID.

Bug: 177664629
Test: memtrackproxy_test
Change-Id: I10829ffcf4e5b2813d4c622268b0b59da6f171b6
Merged-In: I10829ffcf4e5b2813d4c622268b0b59da6f171b6
2021-04-07 02:28:10 +00:00
Chris Wailes
061b25ec6f Register ART Service with the System Server
This CL causes the System Server to create and load the ART Local
Manager.

Test: Build and flash
Bug: 177273468
Merged-In: I9734160f1cd4fd9fc363b3af50e27ec8973be557
Change-Id: I9734160f1cd4fd9fc363b3af50e27ec8973be557
2021-03-30 12:46:08 -07:00
Howard Chen
811ad79636 Merge changes from topic "cow_pdb"
* changes:
  Support copy-on-write persistent data block when running a DSU
  Support PersistentDataBlockService in DSU
2021-03-17 02:07:03 +00:00
Treehugger Robot
62d82e0b33 Merge "Use ro.boot.qemu to check if the device is an emulator" 2021-03-16 16:31:57 +00:00
Aaron Huang
5d31a15d84 Make PacProxyService be a system service
PacProxyInstaller class is running a thread all the time and is
listening to intent ACTION_PAC_REFRESH so it would be better to
make it be a system service with a manager class PacProxyManager
which is obtained with getSystemService(PacProxyManager.class).
Besides, rename PacProxyInstaller to PacProxyService will
be easier to know it's the service for PacProxyManager.

ConnectivityService is going to be a mainline module and it
needs constructor of PacProxyService to be SystemApi.
However, in current design, it needs to pass a handler and
an int arguments to the constructor which would be difficult
to maintain if just expose the constructor directly.

So, define a listener for the event that the current PAC
proxy has been installed so that the handler and the int
arguments can be removed from the constructor.

Bug: 177035719
Test: FrameworksNetTests
Change-Id: I2abff75ec59a17628ef006aad348c53fadbed076
2021-03-15 14:40:58 +08:00
Roman Kiryanov
d6a9f42566 Use ro.boot.qemu to check if the device is an emulator
`ro.kernel.qemu` is deprecated.

Bug: 182291166
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Id42d79af90b1fe7e182a96c53c84248e81a7c259
2021-03-10 23:41:31 -08:00
Howard Chen
649c198cf3 Support PersistentDataBlockService in DSU
Currently the PersistentDataBlockService does not start when
running a Dynamic System Update. This CL adds a sandbox-mode
PersistentDataBlockService when running a DSU for the test_harness
environment.

Bug: 175852148
Bug: 175078763
Test: gsi_tool install & \
  finish the vts_kernel_net_tests w/o suspension
Test: gts-tradefed run gts -m GtsOemLockServiceTestCases -t com.google.android.oemlock.gts.OemLockServiceTest
Test: cts-tradefed run cts -m CtsPermission2TestCases -t android.permission2.cts.PrivappPermissionsTest
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Test: atest com.android.server.devicepolicy.FactoryResetProtectionPolicyTest
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testFactoryResetProtectionPolicy
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testFactoryResetProtectionPolicy
Test: atest LockSettingsStorageTests
Test: atest frameworks/base/core/tests/coretests/src/com/android/internal/widget/LockPatternUtilsTest.java
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/LockSettingsStorageTests.java
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/SyntheticPasswordTests.java

Change-Id: I0547d757cf023443d9a00bec962db3f2aad3ff04
2021-03-10 13:00:39 +08:00
junyulai
a76fc32242 [FUI25] Migrate NetworkPolicyManagerService to use ConnectivityManager
Test: atest NetworkPolicyManagerServiceTest
Bug: 174123988
Change-Id: I6512d3f704f35f2cc3555dcc40b46c7294d3b455
2021-03-06 08:38:13 +08:00
Kevin Han
201737c781 Merge "Support dynamic feature flag config" 2021-02-23 01:36:29 +00:00
Lucas Lin
654b0fff63 Merge changes I852e3a53,I86755647,I0ed8b0c6
* changes:
  Remove unused INetworkManagementService from IpSecService
  Use NetdUtils instead of NetworkManagementService in Vpn
  Use NetdUtils instead of NetworkManagementService in IpSecService
2021-02-22 06:49:39 +00:00
Kevin Han
0da6e9039a Support dynamic feature flag config
For CTS testing purposes, have the DeviceConfig feature flag control
whether app hibernation behavior is stubbed rather than whether the
service itself is started. This allows us to change the feature flag in
tests without restarting system_server

Bug: 175830282
Test: atest AppHibernationServiceTest
Change-Id: Id9ea16345cac84a069ff53939cef1564a585c466
2021-02-16 15:14:44 -08:00
Lorenzo Colitti
f83d22b77d Add a skeleton VpnManagerService, and start it on boot.
This adds a lot of unused code but this should make it easier to
review subsequent CLs.

Bug: 173331190
Test: builds, boots, "dumpsys vpnmanager" succeeds
Change-Id: Ied379654a0c3ab6242d3125661fe30f322395059
2021-02-12 01:07:29 +09:00
Collin Fijalkovich
4512e77b7c Merge "Introduce TracingServiceProxy System Services" 2021-02-08 17:24:06 +00:00
lucaslin
2b9ba7a1f6 Remove unused INetworkManagementService from IpSecService
IpSecService is no longer using any methods of
INetworkManagementService, so remove it from IpSecService
and related files.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I852e3a534e0ffd26b4b22420754f3ec8a6f153ad
2021-02-08 08:05:00 +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