Commit Graph

1198 Commits

Author SHA1 Message Date
Danning Chen
20b32edbfe Add the skeleton code for People Service which is a new system service with only internal APIs
Change-Id: I78b1b362735d5da40c49a344ae3063ea0df0759f
Bug: 146522621
Test: Code builds and runs successfully
2020-01-01 13:46:38 -08:00
TreeHugger Robot
3f7ef32b9f Merge "New API for query trust of a fs-verity certificate" 2019-12-23 20:18:40 +00:00
Victor Hsieh
20fe1f6f22 New API for query trust of a fs-verity certificate
The corresponding service is also added.

The API can be used by a store to know whether their certificate is
trusted on the device. As optimization, they only need to download
.fsv_sig signature file if it will be used.

The API can also be used to gradually switch to stronger key. The store
can query with their certificates in priority order and download the best
signature.

Test: Passed new GTS working in progress
Bug: 142573505
Change-Id: Ic788cd04aeaed35ad62113fe9e7535b8fa63b5ee
2019-12-23 09:21:19 -08:00
markchien
ae8aa646dc [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-20 10:31:31 +08:00
Jeffrey Huang
18e52123ce Merge "Create statsmanager service" 2019-12-18 18:20:25 +00:00
TreeHugger Robot
5c47ee6c1a Merge "add IncrementalManagerService to system server" 2019-12-18 04:18:30 +00:00
Jeffrey Huang
8c1ae5aef8 Create statsmanager service
Bug: 146074170
Test: Manual
Change-Id: Ia96f2df24e660fe3293fb2e873e9050a55398cee
2019-12-17 16:54:11 -08:00
Ytai Ben-tsvi
0d52f4202c Merge changes from topic "soundtrigger_refactor"
* changes:
  Migrate SoundTrigger implementation to new service
  Implement the soundtrigger_middlewware service
  Add a permission for preempting sound trigger sessions
  Sound trigger middleware service definition
  Add audio.common types AIDL definition
2019-12-17 22:33:55 +00:00
Songchun Fan
43f18ea45a add IncrementalManagerService to system server
Test: boots
Change-Id: Ib704e986535ca422e82784b985ff7ef1acc68277
2019-12-17 20:58:48 +00:00
Winson Chung
5de9140f92 Merge "Remove a few hard coded references to SystemUI in fw/base/services" 2019-12-17 05:41:48 +00:00
Ytai Ben-Tsvi
93c117c86f Implement the soundtrigger_middlewware service
This service is intended to replace:
frameworks/av/include/soundtrigger/ISoundTriggerHwService.h

This change only adds the replacement service, follow up
changes migrate the clients to use the new service and remove
the old one. The new service is feature-equivalent to the new
one, but offers the following advantages:
- AIDL interface (as opposed to hand-written parceling code).
- Pure Java implementation all the way to the HAL.
- Better documentation.
- Rigorous error handling.
- Unit tests.
- Reduced code complexity (less layers, better separation of
  concerns).
- Permission-based security model (as opposed to some baked-in
  assumptions about process affinity).

Change-Id: I79f4eff105d3e6245990be068b933d4d48c35a0d
Bug: 142070343
2019-12-16 14:15:37 -08:00
Winson Chung
f2b41770d4 Remove a few hard coded references to SystemUI in fw/base/services
Bug: 143775123
Test: atest ScreenshotHelperTest
Test: atest AlarmManagerTest
Change-Id: I2fefe2968e23bc2d06aa52266c2eeeb90f4733ee
2019-12-13 13:59:31 -08:00
Makoto Onuki
b03866ee72 Merge "System APIs for telephony to expose/obtain binder services" 2019-12-13 20:02:36 +00:00
Songchun Fan
6cde9d9ada add DataLoaderManagerService to system server and register to system service
Test: boots
Change-Id: I9cba99327da012b6f6de898ad1c5cc7cf11d1d31
2019-12-13 00:07:17 +00:00
Song Pan
f93a39cb09 Add implementation class to handle integrity check broadcasts.
Change-Id: Ifca76a8fcf8277bfd2f123a6fd9351ae7db45643
Test: add unit test and manually building/flashing on a test device and
installing an app.
2019-12-11 16:50:02 +00:00
Makoto Onuki
6b0a7b86dc System APIs for telephony to expose/obtain binder services
Bug: 142255256
Bug: 112725883
Test: Boot
Change-Id: Ia02384689b6b5ecb19db27d91d03f06ae2543b91
2019-12-09 16:44:45 -08:00
David Sehr
b2910d3b6f Allow tuning of heaptargetutilization
Remove a pair of explicit sets of this value.  This allows ART to tune
this parameter to improve GC responsiveness and memory usage.  Tuning
this parameter is a key area of work for OEM-requested high-memory
device configurations.

Bug: 145823510
Test: boot and run with various configurations of the flag.
Change-Id: I19680ff5fa1ebf9dfd4a3f71533d03510f4da414
2019-12-06 13:58:57 -08:00
David Sehr
1a88539df2 Add hook for JVMTI agent in system server
Add a place to attach a jvmti agent into the system server in debug
builds.  This allows profiling and other investigations for performance
improvements.

Bug: none
Test: attach agent, collect result
Change-Id: I299dffb1774fdce48b9b695a614b7ab60f1307e2
2019-12-05 21:12:06 +00:00
TreeHugger Robot
38710e19d4 Merge "Let the OS crash when failed to initialize "core" services" 2019-12-02 23:22:35 +00:00
TreeHugger Robot
0c43a1afef Merge changes from topic "tethering-migrate"
* changes:
  [Tether10]Remove UserManagerInternal usage in Tethering
  [Tether07] Migrate Tethering into module
  [Tether07] Clean up build rule for libtetheroffloadjni
2019-11-29 17:05:14 +00:00
markchien
0f63ca6e91 [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-29 07:05:21 +00:00
Neil Fuller
3e3b5405b6 Add a new time zone detection service
Add a new time zone detection service. Much of the code is from
frameworks/opt/telephony with some changes for naming, threading and
to modify the interaction with the "Callback" class.

Overall goal:

Implementing the service in the system server means it will be easier to
add new time zone detection logic unrelated to telephony in future.

Bug: 140712361
Test: atest com.android.server.timezonedetector
Test: atest android.app.timezonedetector
Change-Id: I89505fc4fecbd3667b60f8e1479b8f177eaa60ae
2019-11-28 12:58:05 +00:00
Yohei Yukawa
1382da3173 Let the OS crash when failed to initialize "core" services
There are several "core" system services that are still initialized in
SystemServer#startOtherServices() not in
SystemServer#startCoreServices().

The problem is that if RuntimeException happened in one of such
initialization steps, all the subsequent initializations would just
get skipped and causes serious problems at some random place later.

Bug 144597304 was an instance of such issues.  If RuntimeException
happens before WindowManagerService gets initialized, then what people
would see is NPE from the following code, which often confuses people
about who to take a look at the issue.

  } catch (RuntimeException e) {
     Slog.e("System", "******************************************");
     Slog.e("System", "************ Failure starting core service", e);
  }

  // Before things start rolling, be sure we have decided whether
  // we are in safe mode.
  final boolean safeMode = wm.detectSafeMode();

With this CL, RuntimeException will be rethrown instead of trying to
boot up the system with only partially initialized system services,
which would be much easier for those who would need to investigate why
the system is not working as expected, hopefully.

  } catch (Throwable e) {
     Slog.e("System", "******************************************");
     Slog.e("System", "************ Failure starting core service");
     throw e;
  }

Fix: 145238447
Test: presubmit
Test: Manually made sure that the system crashes at the right place
Change-Id: Ie4741758d78373b8a0b23c210f97897ee1ea40cb
2019-11-27 10:08:20 -08:00
Roshan Pius
ac76d48454 Revert "Mainline wifi stack module"
This reverts commit 6f5338dd8f.

Reason for revert: Wifi services no longer plan to be a separate
APK/process for mainline. Will instead become a jar loaded from Apex.

Bug: 144722612
Test: Device boots up & connects to wifi networks.
Change-Id: I293e36973c4bdbd8bf9db2fcd78e61e6c38b39f4
2019-11-25 20:59:31 -08:00
Neil Fuller
882bc94f6f Merge "Remove dead code from SystemServer" am: 05eeef4188 am: 01d1dd28f1
am: 18e458ef00

Change-Id: Ibb828d6acea117032d9dbb1e6669c119768f5cf3
2019-11-25 10:40:53 -08:00
Neil Fuller
18e458ef00 Merge "Remove dead code from SystemServer" am: 05eeef4188
am: 01d1dd28f1

Change-Id: Ifa10a6e2b48f596bfa6854e1a950cec060253c76
2019-11-25 06:28:07 -08:00
Neil Fuller
01d1dd28f1 Merge "Remove dead code from SystemServer"
am: 05eeef4188

Change-Id: I910fb0ac35c8de8fd500b3df0253c65b6b201fb4
2019-11-25 06:12:57 -08:00
Neil Fuller
05eeef4188 Merge "Remove dead code from SystemServer" 2019-11-25 13:53:15 +00:00
Felipe Leme
5c9f648edd Merge "Fixes usage of WallpaperManager to make it optional." into qt-qpr1-dev
am: 659f477f65

Change-Id: I6946b0001c524dff8d11b2889e8b30d6a059218d
2019-11-22 16:16:59 -08:00
Kenny Root
1b506101de Merge "Make RecoverySystemService more testable"
am: 49af39e751

Change-Id: I79d712e2c8739212c4a62e9db6deddf28091fafc
2019-11-22 08:27:49 -08:00
Kenny Root
d508e1e61f Make RecoverySystemService more testable
This allows the RecoverySystemService to be instantiated outside of its
lifecycle events and mocked connections to be injected during the tests.

Test: atest FrameworksServicesTests:RecoverySystemServiceTest
Merged-In: If75632b8dc16c916f3fa90853d6c1863b75d2c64
Change-Id: If75632b8dc16c916f3fa90853d6c1863b75d2c64
2019-11-21 23:54:05 +00:00
Terry Wang
2cf38fe7e9 Merge "Add a new system service for app search project" 2019-11-21 22:43:08 +00:00
Terry Wang
ecc0d1b2c1 Add a new system service for app search project
Bug: 142567528
Test: manual
Change-Id: Iefb426383f94ec89c896065c798b22cfb2977bf3
2019-11-21 14:15:22 -08:00
Kenny Root
96690bc4c9 Make RecoverySystemService more testable
This allows the RecoverySystemService to be instantiated outside of its
lifecycle events and mocked connections to be injected during the tests.

Test: atest FrameworksServicesTests:RecoverySystemServiceTest
Change-Id: If75632b8dc16c916f3fa90853d6c1863b75d2c64
2019-11-21 09:44:08 -08:00
Neil Fuller
4b03c07cc7 Remove dead code from SystemServer
Remove dead code from SystemServer that obstensively protects devices
from negative (< 1970) system clock times, but does not.

In reality, SystemServer calls SystemClock.setCurrentTimeMillis(), which
calls through to the AlarmManager.setTime() binder call. When the code
runs the system server hasn't started any services yet, so this would
always fail.

AlarmManager has similar protections in place that do work: if the
device is earlier than a "build time", then the device's clock is forced
forward. That provides the protection that the code being removed from
SystemServer was trying to achieve.

Test: Added logging to SystemClock to prove AlarmManager is null /
manual debugging

Change-Id: I87dca1062829bc1a10202804fa7ee31e0a6f03a3
2019-11-21 17:30:03 +00:00
Kenny Root
4772763a78 Merge "Move RecoverySystemService into its own package" am: 9164399321 am: 53bb6db434
am: 19953699da

Change-Id: Iaf08110d17515bca7522b04a43a7ef4795552e85
2019-11-20 16:19:38 -08:00
Kenny Root
53bb6db434 Merge "Move RecoverySystemService into its own package"
am: 9164399321

Change-Id: Iaa931ad488b059c981646fc6684c782e47a1edf3
2019-11-20 16:04:50 -08:00
Kenny Root
f96836ed3a Move RecoverySystemService into its own package
This helps reviewing the refactor of the RecoverySystemService in which it
is made a bit more testable.

Test: make && emulator
Change-Id: Ifc5a658fe68ed10ab400f43d1d3967c0acccbd11
2019-11-20 10:53:39 -08:00
Felipe Leme
8d4c825ce3 Fixes usage of WallpaperManager to make it optional.
As the main javadoc states:
"An app can check whether wallpapers are supported for the current user,
by calling {@link #isWallpaperSupported()}, and whether setting of
wallpapers is allowed, by calling {@link #isSetWallpaperAllowed()}."

Test: manual verification on automotive
Test: atest CtsAppTestCases:android.app.cts.WallpaperManagerTest # on automotive

Bug: 138939803
Bug: 132111956

Change-Id: I88946f92ff54e556d289c41c28e22da3a4b8c8b8
Merged-In: I88946f92ff54e556d289c41c28e22da3a4b8c8b8
(cherry picked from commit 34a861add1)
2019-11-19 01:24:52 +00:00
Ilya Matyukhin
e4675b3067 Implemented and integrated AuthService
AuthService in its current form is a thin wrapper around
BiometricService. It initializes BiometricService in onStart();
registers fingerprint, face, and iris authenticators; and forwards all
of the incoming calls to the corresponding methonds in BiometricService.

The next step will be to move non-biometric related functionality from
BiometricService to AuthService, and turn BiometricService into a module
with a stable API.

Bug: 141025588
Test: atest AuthServiceTest
Test: atest BiometricServiceTest
Test: BiometricPrompt works in BiometricPromptDemo
Change-Id: Ia861b7c2d80bfca386c3e0b44ec35b4aca3b0ffc
2019-11-18 22:10:50 +00:00
Sudheer Shanka
f5b36964e0 Add a new system service for blob store management.
This change adds a bare-bones system service, implementation will follow
later.

Bug: 143559646
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Change-Id: Idf21dfcd11dd32a42b62c6ad965d6f5ad7eed1b4
2019-11-07 13:37:14 -08:00
Eugene Susla
d099924c21 Fix typo in SystemServer
Test: presubmit
Change-Id: Ie9c71efc0d2466e5dc751d6e309d646d500278ed
2019-11-04 10:09:29 -08:00
Andrei Onea
8579ddfb23 Merge "Initialize AppCompatCallbacks in system server"
am: 2773409cac

Change-Id: I493671298a3a976e45542f7c192b7f7861ba6be0
2019-11-01 16:02:05 -07:00
TreeHugger Robot
62340690af Merge "Refactor LMS to use SystemService" 2019-10-31 18:37:28 +00:00
Andrei Onea
0611dbc7a6 Initialize AppCompatCallbacks in system server
This ensures that any calls made (intentionally or not) in the system
server using the Compatibility (in-app process) gating APIs will always
return true, and log the gated feature.

Bug: 143591326
Test: m
Merged-In: I96792cf852f4167fc39d5055704f8617efaae25e
Change-Id: I96792cf852f4167fc39d5055704f8617efaae25e
2019-10-31 11:49:50 +00:00
Andrei Onea
f965d151cc Initialize AppCompatCallbacks in system server
This ensures that any calls made (intentionally or not) in the system
server using the Compatibility (in-app process) gating APIs will always
return true, and log the gated feature.

Bug: 143591326
Test: m
Change-Id: I96792cf852f4167fc39d5055704f8617efaae25e
2019-10-31 11:46:58 +00:00
Xin Li
6f48900f50 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: If5056a73ede668b0048ca107b686413695e5b3b6
2019-10-30 14:33:01 -07:00
Soonil Nagarkar
141417ac29 Refactor LMS to use SystemService
Adopt SystemService based initialization for LocationManagerService. No behavioral changes, just
adopts the existing initialization framework for LMS.

Test: manual
Change-Id: Ic03e5e3fdacb1d3d79e7ba739b673a1c6146c673
2019-10-28 19:33:26 +00:00
atrost
ff948d8a2f Add a native aidl API.
Introduce a platform_compat_native service that just calls the
platform_compat service.
The new service is needed as it needs a slightly different (more
limited, no ApplicationInfo in cpp) aidl API, and a class can only
extend one stub.

Test: Call the service from dumpsys.cpp (http://aosp/1142055)
Bug: 138275545
Change-Id: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
Merged-In: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
2019-10-22 18:54:13 +00:00
atrost
874883536a Add a native aidl API.
Introduce a platform_compat_native service that just calls the
platform_compat service.
The new service is needed as it needs a slightly different (more
limited, no ApplicationInfo in cpp) aidl API, and a class can only
extend one stub.

Test: Call the service from dumpsys.cpp (http://aosp/1142055)
Bug: 138275545
Change-Id: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
2019-10-17 11:53:47 +01:00