Commit Graph

15057 Commits

Author SHA1 Message Date
TreeHugger Robot
4c1d179738 Merge "Revert "Move Scheduling system service into apex manifest."" 2022-02-10 17:40:10 +00:00
Artur Satayev
fd500e7bb1 Revert "Move Scheduling system service into apex manifest."
This reverts commit 1e0219774f.

Reason for revert: we need explicit declaration in SystemServer for non-mainline devices since they use flattened apex

Fix: 215565746
Test: presubmit
Change-Id: Ie0cbe03c21a18a185df54a9cd9b9a2ff1ae6f821
2022-02-10 15:42:19 +00:00
TreeHugger Robot
8acbe89683 Merge "Replaces com.android.server.Dumpable by android.util.Dumpable." 2022-02-07 16:47:23 +00:00
Olivier Gaillard
1051bbbd1f Merge "Add half watchdogs to dropbox and make the watchdog timeout configurable." 2022-02-07 12:05:41 +00:00
Junyu Lai
937076ef12 [MS62.1] Start NetworkStatsService from the module
NetworkStatsService is going to be moved into Connectivity mainlne
module and it will be not visible to SystemServiceResistry after
migration done. Thus:
1. Register service in NetworkStatsServiceInitialalizer, a separate
   initializer is needed because the service needs to be created
   before NetworkPolicyManagerService's initialization.
2. Call SystemReady at PHASE_ACTIVITY_MANAGER_READY phase where
   it needs to be ready before StatsPullAtomService pulls at
   PHASE_THIRD_PARTY_APPS_CAN_START.
3. Register manager in ConnectivityFrameworkInitializerTiramisu
   instead of SystemServiceRegistery.

Test: atest FrameworksNetTests CtsNetTestCases NetworkUsageStatsTest
Bug: 204830222
Change-Id: I95020d816ed613ce3480a0720a5b71dcdc7fab72
2022-02-07 11:45:17 +09:00
Felipe Leme
92d145c886 Replaces com.android.server.Dumpable by android.util.Dumpable.
Test: adb shell dumpsys system_server_dumper
Bug: 149254050

Change-Id: I4e027599ef46b58963c8b0f97d66e510902f05c7
2022-02-03 22:04:23 -08:00
Kathy Chen
05c1633355 Fix a bug where the AmbientContextManager is not registered if the AmbientContextDetectionService is not available. The manager should always be available, and return STATUS_SERVICE_NOT_AVAILABLE in this case.
Test: end-to-end test
Bug: 192476579
Change-Id: Ifce8c8dbb71a7bb6efd65db41686c14681cf0e4a
2022-02-03 19:41:31 +00:00
Artur Satayev
02e0ed6436 Merge "Revert "Revert "Revert "Revert "Introduce initOrder for apex-system-services.""""" 2022-02-03 16:58:23 +00:00
Artur Satayev
8b8331e530 Revert "Revert "Revert "Revert "Introduce initOrder for apex-system-services.""""
This reverts commit 00029af7e0.

Reason for revert: broken test is unrelated and is still red

Change-Id: I1784b76b3c5afc922881334370e0df95e51dc280
2022-02-03 12:48:25 +00:00
Olivier Gaillard
6fe4769529 Add half watchdogs to dropbox and make the watchdog timeout
configurable.

The content of the half watchdog is now more consistent with watchdogs
to make it more actionable (watchdog subject, memory psi, cpu data).

The half watchdog is also published to dropbox in a similar way to the
watchdog. We also use a thread to publish to dropbox to make sure that
we do not block the watchdog handler code.

For the half watchdog, we know wait for 5s to get the cpu data (similar to
the watchdog) which delays the next run. That's only 10% of the default
timeout though so that's not a big difference.

For the configurable watchdog timeout, we delay fetching the value to
be able to start the watchdog as early as possible when system server
starts to detect blocked threads that might happen early. As well, even
if fetching settings is broken, the watchdog will still be running with
the default timeout values.

Test: tested that the half watchdog is added to dropbox

~/master$ adb shell dumpsys dropbox | grep watchdog
2022-01-25 23:22:19 system_server_pre_watchdog (compressed text, 21612 bytes)
2022-01-25 23:22:56 system_server_watchdog (compressed text, 21386 bytes)
2022-01-25 23:29:09 system_server_pre_watchdog (compressed text, 21621 bytes)

The watchdogs and half wathdogs were generated by adding a message with
a long sleep on the ui thread

    Runnable runnable = new Runnable() {
	@Override
	public void run() {
	    SystemClock.sleep(40_000);  // 40s
	}
    };
    Message msg = Message.obtain(UiThread.getHandler(), runnable);
    msg.setAsynchronous(true);
    UiThread.getHandler().sendMessage(msg);

Bug: 209932320
Change-Id: I1bca723d1d7bee98dc7e1aade73a2e4384d6f035
2022-02-03 11:55:05 +00:00
Aaron Huang
1dad7aa006 Split out the ipsec API surface and use framework-connectivity-tiramisu
Bug: 204153604
Test: TH
Change-Id: I6cc8aef6a0ab9ce4bcef2797196b1d1b3687acca
2022-02-03 09:47:41 +09:00
Muhammad Qureshi
aea37f3fb3 Merge "Revert "Revert "Revert "Introduce initOrder for apex-system-services."""" 2022-02-03 00:15:04 +00:00
Muhammad Qureshi
00029af7e0 Revert "Revert "Revert "Introduce initOrder for apex-system-services."""
This reverts commit 5a38385882.

Reason for revert: DroidMonitor: Potential culprit for Bug 217580573 - verified through ABTD:
https://android-build.googleplex.com/builds/abtd/run/L65800000952890870

Change-Id: Ib9fdb4af623c93cd445d1031e57716b1df0f708e
2022-02-02 23:45:56 +00:00
Artur Satayev
6ae27a89a7 Merge "Revert "Revert "Introduce initOrder for apex-system-services.""" 2022-02-02 17:40:05 +00:00
Sharon Su
79d91e3efa Merge changes from topic "susharon-wallpapereffectsgeneration"
* changes:
  Server implementation of WallpaperEffectsService API.
  Data class and interface for wallpaper effects generation api.
2022-02-02 07:42:16 +00:00
Sharon Su
a5afd3736a Server implementation of WallpaperEffectsService API.
Test: cts tests
Bug: 213238425
CTS-Coverage-Bug: 213238425
Change-Id: Id94764483b80a62a9fcaf8b2205b63e5cb66473c
2022-02-01 22:09:36 +00:00
Artur Satayev
5a38385882 Revert "Revert "Introduce initOrder for apex-system-services.""
This reverts commit 1352272eb6.

Reason for revert: rollforward with a fix.

Add waitForBootComplete() after installing test apex and inspecting
logcat.

Bug: 192880996
Test: atest ApexSystemServicesTestCases PackageParserTest ApexManagerTestChange-Id: I7a238b439fc25da4ae1ab379cc66e54565dac293
Change-Id: I0270c24c471d8e7391260b7f731b6c0fb2fa0662
2022-02-01 18:49:27 +00:00
TreeHugger Robot
912e647d3a Merge changes from topic "revert-16528474-remove-iorap-SLJMCTXSQL"
* changes:
  Revert "Remove iorap framework codes"
  Revert "Remove scripts related to iorap"
2022-01-31 21:49:05 +00:00
Jeremy Meyer
b2f031a19f Merge "Add dumping of Resource paths and resource history" 2022-01-31 19:29:42 +00:00
Eric Jeong
2f393cdbce Revert "Remove iorap framework codes"
Revert "Remove iorap daemon codes"

Revert "Remove configs relevant to iorap"

Revert submission 16528474-remove-iorap

Reason for revert: build break
Reverted Changes:
I464c9e9c4:Remove scripts related to iorap
I0b8b1b064:Remove iorap daemon codes
I848f65908:Remove iorap framework codes
I294f37265:Remove configs relevant to iorap

Change-Id: Idbd2f34e952325d9fee00ce3b269293b848cf545
2022-01-31 19:00:37 +00:00
TreeHugger Robot
effdb2dc35 Merge "Remove iorap framework codes" 2022-01-31 16:54:22 +00:00
Jeremy Meyer
353e64eef5 Add dumping of Resource paths and resource history
Sample of results:

history
0
  class=class android.content.res.Resources
  resourcesImpl
    class=class android.content.res.ResourcesImpl
    assets
      class=class android.content.res.AssetManager
      apkAssets=
      0
        class=class android.content.res.ApkAssets
        debugName=<empty> and /system/framework/framework-res.apk
        assetPath=/system/framework/framework-res.apk
      1
        class=class android.content.res.ApkAssets
        debugName=/product/overlay/GoogleConfigOverlay.apk
        assetPath=/product/overlay/GoogleConfigOverlay.apk

Fixes: 206615535
Test: Called from custom app to confirm format and info
Change-Id: I19a9fc60b61fff86e5b41a2d789d6dde8acf51a3
2022-01-28 22:04:12 +00:00
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