Commit Graph

15034 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
d0cd7a5f73 Revert "Start NearbyService when system server starts."
This reverts commit 0fc06be8ca.

Reason for revert: The original change is fine, but is not be
necessary anymore once the service is started from the
Connectivity initializer. This is to be submitted together with
changes achieving that.

Bug: 189355156
Bug: 214495869
Test: check service started from new path
Change-Id: I26e1a89522f7a8ce72e7576a1f2f697845eef617
2022-01-28 11:24:34 +09:00
Evan Severson
e5c3230597 Merge "Refactor SensorPrivacyService to separate state from service" 2022-01-27 22:10:37 +00:00
Billy Lau
cfa26cb21e Merge "Add BinaryTransparencyService as new SystemService." 2022-01-27 15:36:49 +00:00
Evan Severson
0cefec2d4f Refactor SensorPrivacyService to separate state from service
This refactoring will let us have alternative implementations for the
state of microphone/camera. It also seperates the storage of the other
feature that is known as the "Sensor mute" so that the reuse of this
service doesn't get too convoluted.

Also extract the persitable state from the state implementation so that
alternative implementations can resuse the persistence code.

Some smaller changes:
* Start the sensor use dailog as user 0 always since system UI requires
user 0
* Use SystemClock.elapsedRealTime() instead of network time since it's
guaranteed to my monotonic. This will also change that intervals used in
telemetry aren't going to measure time the device is powered off.

Ignore-AOSP-First: New OWNERS file
Test: atest CtsSensorPrivacyTestCases SensorPrivacyServiceMockingTest
Bug: 200649586
Change-Id: I4c23c2509d7d1bdf49360fc9bbadb79ccd451dcc
2022-01-26 20:06:41 -08:00
Shashwat Razdan
f898abc490 Adding System Server implementation of Cloud Search API
Bug: 210528288
Test: RBE Built redfin-eng and tested on a physical device
Change-Id: Idac2e83819f9aeee292a5d53f3304d47cfc88af5
2022-01-26 15:19:01 -08:00
Billy Lau
d1fb08be0a Add BinaryTransparencyService as new SystemService.
Bug: 197684182

Created a new system service that aggregates information about:
1) signed partitions on device
2) APEXs installed on device
3) Modules installed on device

Introduces new adb shell commands as below:
adb shell cmd transparency get image_info [-a]
adb shell cmd transparency get apex_info [-v]
adb shell cmd transparency get module_info [-v]

Test: Built and tested locally on a bramble - the device boots.
Issuing adb shell commands as above provides correct outputs.

Change-Id: I2cae1bd794456688779c70c65b3f5ec8bcd7c6b3
2022-01-24 15:58:05 -08:00
Wenhao Wang
8707290b4b Merge "Add logcat service to track logd access" 2022-01-24 23:01:38 +00:00
Kathy Chen
50460ddd32 Merge "AmbientContext (aka Ambient PCC) Framework API, with a client API for apps to subscribe for AmbientContextEvents, and a provider API for AiAi to implement and provide the detected events." 2022-01-23 01:54:29 +00:00
Kathy Xiaoming Chen
5d568eda62 AmbientContext (aka Ambient PCC) Framework API, with a client API for apps to subscribe for AmbientContextEvents, and a provider API for AiAi to implement and provide the detected events.
Client apps need the ACCESS_AMBIENT_CONTEXT_EVENT permission to use the service. The permission protection level is internal|role.

API overview: http://go/ambient-framework-api
PRD: http://go/ambient-attribution-prd
Design doc: http://go/ambient-service-api

Test: CTS test
Bug: 192476579
Change-Id: I9daede83af34f215c278cb0530238faba1be5c70
Ignore-AOSP-First: to prevent new feature leak.
2022-01-22 22:07:22 +00:00
Junyu Lai
85eacf4d8b Merge "[MS66] Initialize TrafficStats with context" am: a411d32226 am: 71aca9af8f am: db3f98710b am: 0fd819f75f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956077

Change-Id: I5c1588157302b236ffa03329cde4f63277026bbf
2022-01-22 01:15:07 +00:00
Junyu Lai
0fd819f75f Merge "[MS66] Initialize TrafficStats with context" am: a411d32226 am: 71aca9af8f am: db3f98710b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956077

Change-Id: Ide5f7ac8fb4ebafbe797e9d8d13662844d1b4bfd
2022-01-22 00:48:35 +00:00
Shubang Lu
bcf19024d3 Merge "TIAF: rename IApp -> InteractiveApp." 2022-01-21 18:04:09 +00:00
Junyu Lai
de9cf3392d [MS66] Initialize TrafficStats with context
TrafficStats has static methods created in API level 8 that need
access to NetworkStatsManager but doesn't take a context.
Previously this was achieved by using ServiceManager, but
with TrafficStats moving to the connectivity module, this
is no longer possible.

Instead, make sure TrafficStats has an appropriate context by
the time any client code can call the relevant methods.
• In app code, this achieved by passing the application
  context from ActivityThread#handleBindApplication, before any
  app code can run.
• In the system server, this is achieved by passing the context
  right after creating service.

Test: atest TrafficStatsTest CtsWebkitTestCases
Bug: 204830222

Change-Id: I251bb8a4431ad12ff61929879ef1363cf06b9244
2022-01-22 01:01:49 +08:00
TreeHugger Robot
c84373611f Merge "Start NearbyService when system server starts." 2022-01-21 05:32:07 +00:00
Nikita Ioffe
23c2c9ec8b Merge "Add service-supplementalprocess to combined_apis" 2022-01-20 21:12:43 +00:00
shubang
a0ac8f6713 TIAF: rename IApp -> InteractiveApp.
based on advice from API Council
And unhide TvInteractiveAppView and TvInteractiveAppInfo

Bug: 213836031
Bug: 205738783
Test: atest android.media.tv.interactive.cts.TvInteractiveAppViewTest

Change-Id: I6b97f89dd29efed1b4248faae366fbf1a56b0614
2022-01-20 18:34:58 +00:00
Wei Wang
0fc06be8ca Start NearbyService when system server starts.
Bug: 189355156
Bug: 214495869
Test: manual
Change-Id: I41ecaf814efce374e8448f9cab3fce45c18862f0
2022-01-20 03:49:41 +00:00
Wenhao Wang
256519a529 Add logcat service to track logd access
The LogcatManagerService monitors all privileged (in AID_LOG group)
access to logd. Only Root and System Server can read the logd data
without tracking. Whenever the logd recieve privileged read data request,
the request is forwarded to the LogcatManagerService.

The LogcatManagerService can approve or decline the request via
binder RPC on logd service. The binder call is enforced by sepolicy.
That means only LogcatManagerService can use the logd binder service.
And only logd can use the logcat binder service.

The next step will add user consent requirement for the logd access.

Bug: 197901557
Test: Reboot the device, then run "adb logcat" multiple times
both during the booting and after the booting. The control flow goes
correctly as we expected.
Ignore-AOSP-First: pending fix for logcat privacy issue

Change-Id: I5e225b65357e7bfacd5c6c9cb4fab5f309803193
2022-01-19 16:49:49 -08:00
paulhu
4f563a4ed5 Split out the nsd API surface and use framework-connectivity-tiramisu
- Split out nsd APIs and hidden APIs to Connectivity module.
- Keep the all files in f/b/packages/Connectivity-T and add
  framework-connectivity-tiramisu library on p/m/Connectivity.
  Then make framework to use this module library.
- Remove NsdService from SystemServer which will register from
  ConnectivityServiceInitializer

Bug: 206893064
Test: m online-sdk-dev-docs
Test: atest FrameworksNetTests CtsNetTestCases
CTS-Coverage-Bug: 207804007
Merged-In: I72c7de124b9cc53f2263bd452ecd5f39e88e485b
Change-Id: I72c7de124b9cc53f2263bd452ecd5f39e88e485b
2022-01-19 19:03:17 +08:00
paulhu
c100db56a2 Split out the nsd API surface and use framework-connectivity-tiramisu
- Split out nsd APIs and hidden APIs to Connectivity module.
- Keep the all files in f/b/packages/Connectivity-T and add
  framework-connectivity-tiramisu library on p/m/Connectivity.
  Then make framework to use this module library.
- Remove NsdService from SystemServer which will register from
  ConnectivityServiceInitializer

Bug: 206893064
Test: m online-sdk-dev-docs
Test: atest FrameworksNetTests CtsNetTestCases
CTS-Coverage-Bug: 207804007
Merged-In: I72c7de124b9cc53f2263bd452ecd5f39e88e485b
Change-Id: I72c7de124b9cc53f2263bd452ecd5f39e88e485b
2022-01-19 18:47:45 +08:00
Nikita Ioffe
e48d201053 Add service-supplementalprocess to combined_apis
Test: m
Bug: 212577961
Change-Id: Id05c53612ec5a6fe9abeaed441da5c8b164844ce
2022-01-18 19:47:51 +00:00
Lucas Silva
b292ef1910 Clean up CommunalManagerService
This system service is no longer needed, as there is no longer a shared
lockscreen.

Test: locally on device
Bug: 206054365
Ignore-AOSP-First: cleanup
Change-Id: Ib2db06c377cf632da77dc41c629debfe658bfc48
2022-01-18 17:04:02 +00:00
Pedro Loureiro
b4e39e5e91 Merge "Revert "Introduce initOrder for apex-system-services."" 2022-01-18 15:08:27 +00:00
Pedro Loureiro
1352272eb6 Revert "Introduce initOrder for apex-system-services."
This reverts commit 8308d9e981.

Reason for revert: breaking presubmit b/214602009

Change-Id: I55b9635419a621caa0b7603dd45aa915c3457882
2022-01-18 13:52:17 +00:00
Artur Satayev
767406fbcf Merge "Move Scheduling system service into apex manifest." 2022-01-18 12:31:35 +00:00
Michael Wright
7358115c8d Merge "Clean-up some warnings in PowerManagerService." 2022-01-14 17:08:02 +00:00
satayev
1e0219774f Move Scheduling system service into apex manifest.
This allows to have continuous testing in prod. There are no
dependencies on this service, so it can be moved to the late init stage.

Bug: 192880996
Test: presubmit
Change-Id: I3ce24143b1d2af96cb2411a40838f2f796eb24f4
2022-01-14 16:12:09 +00:00
Artur Satayev
8b326737de Merge "Introduce initOrder for apex-system-services." 2022-01-14 13:15:44 +00:00
Michael Wright
e351c35be8 Clean-up some warnings in PowerManagerService.
Bug: 214018230
Test: atest FrameworksServicesTests:PowerManagerServiceTest
Change-Id: Ib60a1c69ad3a4154f90f598c987ce657d1198551
2022-01-14 12:39:52 +00:00
satayev
8308d9e981 Introduce initOrder for apex-system-services.
This allows to have a relative order between apex system services if
needed due to dependencies.

Bug: 192880996
Test: atest ApexSystemServicesTestCases PackageParserTest ApexManagerTest
Change-Id: Ib9700be48390f8a78135c76e79ad2bc4cb6e8577
2022-01-13 14:06:13 +00:00
Frank Li
4217ed289c Merge "[DU01]Remove INetworkManagementService from NetworkStatsService" am: eb22eb4e42 am: baffbb01cd am: ea4cbbdda6 am: a3441d160c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1928459

Change-Id: I3e578a735ce6cde81137b03da278470647039d7d
2022-01-13 06:40:36 +00:00
Frank Li
a3441d160c Merge "[DU01]Remove INetworkManagementService from NetworkStatsService" am: eb22eb4e42 am: baffbb01cd am: ea4cbbdda6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1928459

Change-Id: I6000e971dc1c2a186a7812ce1684e220d57dca5e
2022-01-13 06:25:34 +00:00
Yeabkal Wubshit
a29b761869 Init HealthService
Bug: 186868020
Test: service started successfully
Change-Id: I4f152db83ba39e3ff39d4a4706fcfa7c2ab9d89c
(cherry picked from commit 5f95bba46592adef642742dff2a22687d4cd2c88)
2022-01-12 02:20:55 +00:00
Josh Yang
a14bbf57aa Merge "SystemServer: add Telephony guards" 2022-01-11 21:28:09 +00:00
satayev
722533f283 Ignore requests to start an already started system service.
For apex-system-services, we allow them to be explicitly started in
SystemService if there is a dependency on them from the rest of the
framework during dessert development. We also need to preserve their
manifest declaration for any previously launched dessert releases.

To avoid starting the same service multiple times, keep track of which
services have been started in SystemServiceManager and ignore
duplicates.

See go/updatable-system-services#bookmark=id.dnv20ia7siqd for more
details.

Bug: 192880996
Test: presubmit
Change-Id: I0a9e48eac9fd5739e2c35818fa483a8e479c13a1
2022-01-10 16:02:44 +00:00
lifr
cf023845cd [DU01]Remove INetworkManagementService from NetworkStatsService
NetworkStatsService is using INetworkManagementService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.

Bug: 209738761
Test: atest NetworkStatsServiceTest
Change-Id: I5740f6d8a54e9a06c6dbb93203cb4c954383c3c8
2022-01-08 01:27:35 +08:00
satayev
3350e9f76f Disallow starting new system services after apex services are started.
Apex services must be the last category of services to start. No other
service must be starting after this point. This is to prevent
unnecessary stability issues when these apexes are updated outside of
OTA; and to avoid breaking dependencies from system into apexes.

Bug: 192880996
Test: presubmit
Change-Id: I42a5a1745c7fc0784fa2fef554c3d6439fd4c7fb
2022-01-07 17:23:41 +00:00
Paul Hu
4090f0daba Merge "Split out the nsd API surface and use framework-connectivity-tiramisu" 2021-12-24 03:06:53 +00:00
satayev
4079b71cbf Start apex-system-services in SystemServer.
See go/updatable-system-services for more details.

Bug: 192880996
Test: presubmit
Change-Id: I00745c2e7b34ec8ed5df12914bfa40ff3187c33b
2021-12-16 16:55:21 +00:00
Joanne Chung
41c4a0ac71 Initial layout of selection toolbar.
The initial selection toolbar related architecture. Render service
part and the implementation will be revised in the follow up changes.

Bug: 190030331
Bug: 205822301
Test: manual. Can boot to home and get manager successfully.
Ignore-AOSP-First: new file for T

Change-Id: Iab5d5f2e5e48e6258a63fb0c479194c958ea61e8
2021-12-16 11:35:23 +08:00
paulhu
f45fe96a54 Split out the nsd API surface and use framework-connectivity-tiramisu
- Split out nsd APIs and hidden APIs to Connectivity module.
- Keep the all files in f/b/packages/Connectivity-T and add
  framework-connectivity-tiramisu library on p/m/Connectivity.
  Then make framework to use this module library.
- Remove NsdService from SystemServer which will register from
  ConnectivityServiceInitializer

Bug: 206893064
Test: m online-sdk-dev-docs
Test: atest FrameworksNetTests CtsNetTestCases
CTS-Coverage-Bug: 207804007
Change-Id: I72c7de124b9cc53f2263bd452ecd5f39e88e485b
2021-12-15 02:10:38 +00:00
Dave McCloskey
2a548a596a Create the system service for AVF & hook the manager to it.
Bug: 201696614
Change-Id: I4a7a830ba809ed59a030a87c4f479199685d8a42
Test: atest AttestationVerificationTest
2021-11-29 14:55:24 -08:00
Elliot Sisteron
56c1563b3a Adding SafetyCenter system service and permission.
This implements a basic version of go/angel-in-mainline-api, only
for the bits that are unlikely to change (i.e. introduce the ability
for safety sources to provide data to the safety center).

SELinux Policy changes in aosp/1897505 and aosp/1899011

Test: ag/16284943
Ignore-AOSP-First: Yes
Bug: 203098016
Bug: 203400898
Bug: 205111656
Change-Id: I5d139782decf5226f0c4a8dcaed7c5691a86fed4
2021-11-23 21:47:25 +00:00
Alan Stokes
164fd1839b Merge "Add Isolated Compilation service" am: e53d334d7f am: 1fa4b81f7f am: dee9164c6f am: 94303f51cd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1892635

Change-Id: I91ebddfb4fd435f78d8d429f8b49468bd24c5ccb
2021-11-22 12:17:55 +00:00
Alan Stokes
94303f51cd Merge "Add Isolated Compilation service" am: e53d334d7f am: 1fa4b81f7f am: dee9164c6f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1892635

Change-Id: Ida1a1bf276139accde99522e408b5d19ae884d30
2021-11-22 12:04:12 +00:00
Alan Stokes
1fa4b81f7f Merge "Add Isolated Compilation service" am: e53d334d7f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1892635

Change-Id: I8172f13d2bd6a1dde33c26400989126bd69a5285
2021-11-22 11:35:57 +00:00
Alan Stokes
e53d334d7f Merge "Add Isolated Compilation service" 2021-11-22 11:17:38 +00:00
Treehugger Robot
4f10090196 Merge "Create StatsBootstrapAtomService" am: e9f913aee8 am: c2566e6582 am: c74d9d6911 am: c9c355889c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1885469

Change-Id: I30eeb8206bca1d8d298977a80bcd35c554e98fe5
2021-11-19 00:40:21 +00:00
Treehugger Robot
c9c355889c Merge "Create StatsBootstrapAtomService" am: e9f913aee8 am: c2566e6582 am: c74d9d6911
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1885469

Change-Id: Ia2fa8a3d576b41a0b55cbdd6dc29a3d3126e9cfa
2021-11-19 00:22:11 +00:00
Treehugger Robot
c2566e6582 Merge "Create StatsBootstrapAtomService" am: e9f913aee8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1885469

Change-Id: I9fe270fa5bffb2edd912ba59fbc6c002497e76b4
2021-11-18 23:48:16 +00:00