Commit Graph

1174 Commits

Author SHA1 Message Date
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
Abhijit Adsule
95862c5724 Add feature to disable slices
Bug: 142022263
Change-Id: I090b4c1460fcc4784e9e901847829ee61bfc31ef
2019-10-15 10:11:16 -07:00
Felipe Leme
b68b76931d Refactored SystemServerInitThreadPool.get().submit() into just submit().
Bug: 141571552

Test: manual verification

Change-Id: I1c54e9b66c765956369de2d93063bc4760b79772
2019-10-09 18:03:32 -07:00
Felipe Leme
29f1ae91f5 Minor improvements on SystemServerInitThreadPool:
- Log number of threads on constructor.
- Use explicit, private lock object so callers cannot accidentally cause dead
  locks.
- Add a new method to explicitly start it.
- Let the whole object be GC'ed when done.
- Don't let tasks be submitted after it's been shutdown.

Bug: 141571552

Test: manual verification

Change-Id: Ibff5f014e17366ab2eec9b64da00c9416d98fc54
2019-10-09 10:15:16 -07:00
Mårten Kongstad
77b53b2c56 Remove the FEATURE_FLAG_IDMAP2 flag
Test: atest OverlayDeviceTests OverlayHostTests FrameworksServicesTests:com.android.server.om CtsAppSecurityHostTestCases:OverlayHostTest

Change-Id: Ib68eaf7f721c5d440fe7185777e88e23cb9840a4
2019-10-01 00:08:48 -07:00
Tej Singh
c53ac0ad2b Move statscompanion to statsd-service jar
This moves statscompanion to statsd-service.jar, and out of
services.jar, in preparation to add it to the statsd apex. In later CL's
I will start making the communication to the rest of system server go
accross approved boundaries. I will also make a second service in system
server to put pullers and other things that we do not care about
updating.

Test: builds, boots, statscompanion talks to statsd
Change-Id: Id7c36bfe4c2138edd4a19f3f477ce31c2f1973d3
2019-09-27 17:07:11 -07:00
Roshan Pius
622547b553 NetworkStackClient: Refactor network stack process interaction
Refactor NetworkStackClient class to move the module service binding &
network stack process death monitoring to a separate class. This class
will only instantiated in the SystemServer process.
The new class |SystemServerToNetworkStackConnector| will be used from
the client classes corresponding to each module running on the network
stack process (NetworkStackClient, WifiStackClient, etc)

This has 2 main advantages:
a) Reduces code duplication (Otherwise the various Client classes need
to replicate the service bindding & process death monitoring).
b) Central crash recovery for the network stack process (Otherwise the
various Client classes will trigger multiple recovery for a single
network stack process crash).

Bug: 135679762
Bug: 140006229
Test: Device boots up & connects to wifi networks.
(cherry-picked from 7e6f5f5e08 & applied
aosp/977048)

Change-Id: I673581b0067b9a3f72dd68a3ab622c18183ebd2e
Merged-In: I673581b0067b9a3f72dd68a3ab622c18183ebd2e
2019-08-26 10:43:21 -07:00
Kiyoung Kim
9b9ed234cb Revert "Merge "NetworkStackClient: Refactor network stack process interaction""
This reverts commit 049c9b40ba.

Reason for revert: b/140006229

Change-Id: I4cd4cd6919c0206b6023f744fe889fa0404365d6
2019-08-26 05:25:22 +00:00
Roshan Pius
049c9b40ba Merge "NetworkStackClient: Refactor network stack process interaction"
am: 764a90c200

Change-Id: Ib6cc552495c8b76f71f158b7f46525d1ff89c357
2019-08-25 21:08:56 -07:00
Xin Li
a770df1d2e DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: I94fce9c5c0b35cbb88ee27fa4cd037927964d2cd
2019-08-24 05:22:23 +00:00
Makoto Onuki
52c24b377b Move DeviceIdle to the JS apex
Test: atest cts/tests/tests/batterysaving/src/android/os/cts/deviceidle/DeviceIdleTest.java
Bug: 137763703
Change-Id: I836350c09f45f95afbf90b562ab1ceed75526498
2019-08-23 16:03:30 -07:00
Roshan Pius
f061a709b6 NetworkStackClient: Refactor network stack process interaction
Refactor NetworkStackClient class to move the module service binding &
network stack process death monitoring to a separate class. This class
will only instantiated in the SystemServer process.
The new class |SystemServerToNetworkStackConnector| will be used from
the client classes corresponding to each module running on the network
stack process (NetworkStackClient, WifiStackClient, etc)

This has 2 main advantages:
a) Reduces code duplication (Otherwise the various Client classes need
to replicate the service bindding & process death monitoring).
b) Central crash recovery for the network stack process (Otherwise the
various Client classes will trigger multiple recovery for a single
network stack process crash).

Bug: 135679762
Test: Device boots up & connects to wifi networks.
Change-Id: I673581b0067b9a3f72dd68a3ab622c18183ebd2e
Merged-In: I673581b0067b9a3f72dd68a3ab622c18183ebd2e
(cherry picked from commit 7e6f5f5e08)
(cherry picked from commit b51c428f41)
2019-08-23 19:04:48 +00:00
Roshan Pius
15b5a03ef6 NetworkStackClient: Refactor network stack process interaction
Refactor NetworkStackClient class to move the module service binding &
network stack process death monitoring to a separate class. This class
will only instantiated in the SystemServer process.
The new class |SystemServerToNetworkStackConnector| will be used from
the client classes corresponding to each module running on the network
stack process (NetworkStackClient, WifiStackClient, etc)

This has 2 main advantages:
a) Reduces code duplication (Otherwise the various Client classes need
to replicate the service bindding & process death monitoring).
b) Central crash recovery for the network stack process (Otherwise the
various Client classes will trigger multiple recovery for a single
network stack process crash).

Bug: 135679762
Test: Device boots up & connects to wifi networks.
(cherry-picked from 7e6f5f5e08 & applied
aosp/977048)

Change-Id: I673581b0067b9a3f72dd68a3ab622c18183ebd2e
Merged-In: I673581b0067b9a3f72dd68a3ab622c18183ebd2e
2019-08-23 10:40:07 -07:00
Anna Trostanetski
911c6ffd6a Merge "Start platform compat service eariler." into stage-aosp-master am: 4535b04b33 am: f3fe588229
am: 0755524354

Change-Id: Ic4c4d904df1484844fbaea740674ace0be1d0491
2019-08-20 02:53:39 -07:00
Anna Trostanetski
f3fe588229 Merge "Start platform compat service eariler." into stage-aosp-master
am: 4535b04b33

Change-Id: Ie41d2286e869bf84362919a183f4bad348dfc945
2019-08-20 02:25:13 -07:00
atrost
499d4bff66 Start platform compat service eariler.
It's needed by ActivityManager and PackageManager.
Also use a constant in Context for the name.

Test: flashed device with ag/9025572 and ag/9204795 and the platfrom
compat was accessible.
Bug: 137769727

Change-Id: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6
Merged-In: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6
2019-08-19 16:10:47 +00:00
atrost
8266ae32ba Start platform compat service eariler.
It's needed by ActivityManager and PackageManager.
Also use a constant in Context for the name.

Test: flashed device with ag/9025572 and ag/9204795 and the platfrom
compat was accessible.
Bug: 137769727
Change-Id: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6
Merged-In: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6
2019-08-19 16:10:31 +00:00
atrost
de54a8ac4c Start platform compat service eariler.
It's needed by ActivityManager and PackageManager.
Also use a constant in Context for the name.

Test: flashed device with ag/9025572 and ag/9204795 and the platfrom
compat was accessible.

Change-Id: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6
2019-08-19 12:26:24 +01:00
TreeHugger Robot
29569b5114 Merge "Revert "Revert "Don't start intelligence services that are not provided by the OEM.""" 2019-08-15 07:36:07 +00:00
Felipe Leme
83e8f2464f Revert "Revert "Don't start intelligence services that are not provided by the OEM.""
This reverts commit b897b173c1.

Reason for revert: real fix on Iea89b3d379792327657e01869c9494975e7b0306

Bug: 139416391
Bug: 135218095
Change-Id: Ib8f97ca460ccea90d2b674e83cbda2a62be2538e
Test: none
2019-08-14 16:57:56 +00:00
Wale Ogunwale
b897b173c1 Revert "Don't start intelligence services that are not provided by the OEM."
This reverts commit c6fff2524b.

Reason for revert: causing WM pre-submit tests to fail on go/wm-tests

Change-Id: I7a6db671f17fb056f29d5e02f58a7da88afda7ed
2019-08-14 13:04:40 +00:00
Felipe Leme
b27cd42b1a Merge "Don't start intelligence services that are not provided by the OEM." into qt-qpr1-dev
am: 4e8070890a

Change-Id: Iba93086430c52c23828d0899b1440b1724e14d81
2019-08-13 15:50:33 -07:00
Roshan Pius
6f5338dd8f Mainline wifi stack module
a) Moved wifi service to a separate APK
b) Use the IWifiStackConnector to load the wifi stack from
SystemServer (similar to network stack).
c) Create a new WifiStackClient interface for system server to interact
with the wifi stack (under new services/wifi folder). Note: This not planned
to be updated via wifi-sdk Apex.
d) Add priv-app permissions for the new wifi stack APK.

Bug: 113174748
Test: Device boots up & connects to wifi networks, hotspot toggle, etc.
Test: Will send for regression tests
Change-Id: I54b3a11ed30668bad5a387370484b2bb0eabca5f
Merged-In: I54b3a11ed30668bad5a387370484b2bb0eabca5f
2019-08-12 07:22:56 -07:00
Roshan Pius
7e6f5f5e08 NetworkStackClient: Refactor network stack process interaction
Refactor NetworkStackClient class to move the module service binding &
network stack process death monitoring to a separate class. This class
will only instantiated in the SystemServer process.
The new class |SystemServerToNetworkStackConnector| will be used from
the client classes corresponding to each module running on the network
stack process (NetworkStackClient, WifiStackClient, etc)

This has 2 main advantages:
a) Reduces code duplication (Otherwise the various Client classes need
to replicate the service bindding & process death monitoring).
b) Central crash recovery for the network stack process (Otherwise the
various Client classes will trigger multiple recovery for a single
network stack process crash).

Bug: 135679762
Test: Device boots up & connects to wifi networks.
Change-Id: I673581b0067b9a3f72dd68a3ab622c18183ebd2e
Merged-In: I673581b0067b9a3f72dd68a3ab622c18183ebd2e
2019-08-12 07:22:56 -07:00
Felipe Leme
496638bb04 Don't start intelligence services that are not provided by the OEM.
Bug: 135218095

Test: adb shell service check content_suggestions
Test: adb shell service check app_prediction
Test: atest CtsContentSuggestionsTestCases CtsAppPredictionServiceTestCases # on Automotive

Merged-In: I07f9873a7ad0c6dd1c1a0d6a0e5e05681bfc67fc
Change-Id: I07f9873a7ad0c6dd1c1a0d6a0e5e05681bfc67fc
2019-08-09 09:09:01 -07:00