Commit Graph

1249 Commits

Author SHA1 Message Date
Kevin Chyn
7d07c89235 Clean up biometric system server
1) BiometricService / AuthService always need to be started, since on
   Android 11 and later, the public credential auth API comes through this
   path.

2) Consolidate getAuthenticatorId() and expose via AuthService. This is
   used only by the platform during key generation. Instead of asking
   each individual service, AuthService will return a list of IDs for
   sensors which are enrolled and meet the required strength.

Test: atest com.android.server.biometrics
Test: fingerprint device, CtsVerifier biometric section
Test: face unlock device, CtsVerifier biometric section
Test: remove biometrics from device, CtsVerifier biometric section

Bug: 148419762
Bug: 149795050

Change-Id: I2c5385b1cd4f343fabb0010e1fe6fb1ea8283391
2020-02-20 11:12:51 -08:00
Amy Zhang
e891f575a4 Merge "Moving TRM under a separate package Change the TunerResourceManagerListener to ResourcesReclaimListener" 2020-02-18 18:38:38 +00:00
Amy
92726fb752 Moving TRM under a separate package
Change the TunerResourceManagerListener to ResourcesReclaimListener

Test: make framework-media-tv-trm-sources
Bug:
Change-Id: Id49bfead1b08b4d01adb1a3ae9f354da6d1a75b1
2020-02-13 14:20:06 -08:00
Arthur Ishiguro
49e96a8ab7 Fixes Context Hub feature naming and documentation
- Adds "_" in variable name for consistency with feature string
- Adds documentation on what the feature is used for

Bug: 149475852
Test: None
Change-Id: I6eca279df8409de1155cd7014647a705d0d31d6f
2020-02-13 08:08:55 -08:00
Amy
06a551ee7b Add a TunerResourceManagerService as an Android System Serivce.
This service is used to interact with TunerHAL interface and the Tuner
framework to manage the Tuner resources currently used on the device.
Tuner framework claims resource from this service. The service will
handle the requests from multiple applications based on their priority.

Sepolicy changes are in https://android-review.googlesource.com/c/platform/system/sepolicy/+/1161873
Test: cuttlefish
Bug:
Change-Id: Ifedc4e6f120e711aadffdf715d8720e0b64fbe16
2020-02-11 19:39:44 -08:00
Stan Iliev
c90438175f Refactor GraphicsStatsService for updateability
Move GraphicsStatsService to android.graphics package.
Move GraphicsStatsService JNI from libservices.core to
libandroid_runtime.
Declare GraphicsStatsService ctor as the only @SystemApi.
Remove MemoryFile usage from GraphicsStatsService, but use
SharedMemory and other SDK APIs instead. This is done to
avoid using unstable API MemoryFile.getFileDescriptor.
Propose new SharedMemory.getFdDup API for next release, which
is hidden for now.
Refactor statsd puller to avoid proto serialization by moving
data directly into AStatsEventList.
"libprotoutil" is added as a static dependancy to libhwui, which
should be fine because its implementation does not link anything.

Bug: 146353313
Test: Ran "adb shell cmd stats pull-source 10068"
Test: Passed unit tests and GraphicsStatsValidationTest CTS
Change-Id: If16c5addbd519cba33e03bd84ac312595032e0e1
2020-02-07 12:27:07 -05:00
Muhammad Qureshi
e2b2432bc6 Use FrameworkStatsLog instead of StatsLog
As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by
*StatsLog.java
that is autogenerated for each module.
This CL replaces some usages of StatsLog with
FrameworkStatsLog.

Bug: 145952197
Test: m
Change-Id: Iaa2db34a7be4c3215f62cc36661ba8ac81656baa
2020-02-03 09:17:40 -08:00
Sudheer Shanka
d5c6c4a09e Merge "Invoke BlobStoreManagerService.onStart() asynchronously." 2020-02-01 20:41:55 +00:00
Sudheer Shanka
95bd541103 Invoke BlobStoreManagerService.onStart() asynchronously.
Bug: 148299993
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Test: tradefed.sh run google/template/local --template:map \
      test google/continuous/boot-successive  \
      --no-first-boot --successive-boot --boot-count 10
Test: tradefed.sh run google/template/local --template:map \
      test google/continuous/boot-successive \
      --no-first-boot --successive-boot --boot-count 2 --granular-boot-info
Change-Id: I99e3ca1c28a47e6a855c6d61295e9ddb4b4ac29c
2020-01-31 15:22:16 -08:00
Automerger Merge Worker
22a33080d1 Merge "Enable fdtrack in system_server." am: 62d4abfd06 am: 7a3ca3763b am: a27fabe484
Change-Id: I2e560d3a21eb77b970e5589462caf3d989b32d01
2020-01-31 16:57:39 +00:00
Automerger Merge Worker
7a3ca3763b Merge "Enable fdtrack in system_server." am: 62d4abfd06
Change-Id: I7792d474064696ce24dfca47823c73aab79c59f3
2020-01-31 16:42:57 +00:00
Andrii Kulian
e11e951f66 Merge changes from topic "add_bundle_to_window_context"
* changes:
  Exempt-From-Owner-Approval: Fix usages of WindowManager.getDefaultDisplay() in f/b
  Add bundle options to Context#createWindowContext API
2020-01-31 01:16:34 +00:00
Andrii Kulian
e57f2dc246 Exempt-From-Owner-Approval: Fix usages of WindowManager.getDefaultDisplay() in f/b
Replace the existing usages of now-deprecated API
WindowManager.getDefaultDisplay() with WindowMetrics or
Context.getDisplay() in frameworks/base.

Bug: 128338354
Test: Build, auto test
Change-Id: I02d38a022c5e0e6e9d699f03d35b65d6c8126da9
2020-01-31 01:15:21 +00:00
Winson Chung
75f5bf33b0 Merge changes from topic "winscope-sysui"
* changes:
  Add initial SysUI trace support
  Update trace buffer to support SysUI & Launcher
2020-01-29 05:04:48 +00:00
Josh Gao
679f3e4242 Enable fdtrack in system_server.
Spawn a thread that monitors the current fd count, and enables fdtrack
to hunt down leaks when it gets too high.

Bug: http://b/140703823
Test: setprop persist.sys.debug.fdtrack_enable_threshold; stop; start; logcat -c; killall -39 system_server; logcat -d | grep fdtrack
Change-Id: If5831f57d47e6958112abced181f07e18e6a7261
2020-01-28 18:10:55 -08:00
Winson Chung
b53b30cd26 Update trace buffer to support SysUI & Launcher
- Move TraceBuffer to sysui-accessible package, and make it generic
  to support both lite and nano proto callers
- Expose shell command to start/stop sysui tracing

Bug: 144854916
Test: atest TraceBufferTest

Change-Id: Id117024d943f148a91631fd9fcae1fd70fca8ab5
2020-01-27 10:04:58 -08:00
Arthur Ishiguro
c88b3ce7c4 Guard Context Hub Service on Context Hub feature
Also adds annotation to require the feature.

Bug: 147677675
Test: Compile and flash, verify Context Hub Service is not found if the
feature flag is not defined
Change-Id: Ia718c76ec4308274dc66cfe975e762997e3539ca
2020-01-23 14:26:03 -08:00
Sravan Kumar Reddy Kallu
ecc28832ba Merge "Revert "SystemServer: Dynamically load wifi-service"" 2020-01-22 01:32:15 +00:00
Sravan Kumar Reddy Kallu
fba0b26d0f Revert "SystemServer: Dynamically load wifi-service"
Revert "product: Remove wifi-service off SystemServerClassPath"

Revert submission 10103769-load_wifi_service_dynamically

Exempt-From-Owner-Approval: see go/perf-revert-first

Reason for revert: <Regression reported in b/148099857>

Reverted Changes:
I7b658cbfa: SystemServer: Dynamically load wifi-service
I93f2467d0: product: Remove wifi-service off SystemServerClass...

Change-Id: Icc0b680c2c6c472157b7bc9ee7bc7d97a54263c1
2020-01-21 22:31:00 +00:00
Automerger Merge Worker
7a5ca46a94 Merge "Remove an interface before more invasive changes" am: e4a64b4e6b am: 2260679ecd am: 8087607fbc
Change-Id: Ib8d4de706116b2b86e9fb22b8c3466ff22aac9e5
2020-01-21 19:13:40 +00:00
Neil Fuller
2260679ecd Merge "Remove an interface before more invasive changes"
am: e4a64b4e6b

Change-Id: I46f302b0ab055d2c7f826502df09ce8a759db9bf
2020-01-21 10:25:12 -08:00
Hall Liu
6392e2548d Merge "Add system service for accessing SystemConfig" 2020-01-20 21:34:28 +00:00
TreeHugger Robot
fd667a716d Merge "SystemServer: Dynamically load wifi-service" 2020-01-17 16:38:09 +00:00
Tej Singh
250e7aad89 Fix crash when pulling certain atoms
IonMemoryUtil and ProcFsMemoryUtil were package-private classes loaded
in the system server class loader and had the same package as
StatsCompanionService, which is loaded in a separate class loader for
statsd. This caused a crash when statsd tried to access either. This cl
moves IonMemoryUtil and ProcFsMemoryUtil along with StatsPullAtomService
to a separate package so that no classes are shared in the same package.

Bug: 147792532
Test: pulled all relevant atoms and make sure they worked
Test: adb shell cmd stats pull-source 10064
Test: adb shell cmd stats pull-source 10061
Test: adb shell cmd stats pull-source 10042
Test: adb shell cmd stats pull-source 10056
Change-Id: I5107aa47045321e84549a7f2d55d0ee27f0d080e
2020-01-16 15:16:54 -08:00
Roshan Pius
790637e2a4 SystemServer: Dynamically load wifi-service
Bug: 147799672
Test: Device boots up & connects to wifi networks
Test: atest android.net.wifi.cts.WifiManagerTest
Change-Id: I7b658cbfa91e2214bfef50510c648848813f62cc
2020-01-16 14:35:45 -08:00
Gavin Corkery
fd2f68734c Merge "Integrate Rescue Party boot loop logic to Package Watchdog" 2020-01-16 11:12:55 +00:00
Gavin Corkery
aa57ef3e46 Integrate Rescue Party boot loop logic to Package Watchdog
Make Package Watchdog the component that receives calls
about boot events, and decides on whether or not to
perform mitigation action for a perceived boot loop.
The logic for selecting an observer to handle boot loops
is similar to how package failure is handled. The threshold
logic is the same as it was in Rescue Party (5 system server
boots in 10 minutes). Rescue Party maintains its own rescue
levels internally, which map to user impact levels.

Add optional onBootLoop() and executeBootLoopMitigation() methods
to PackageHealthObserver.

Add tests to handle the new cases handled by Package Watchdog.

Test: atest RescuePartyTest
Test: atest PackageWatchdogTest
Bug: 136135457
Change-Id: Ic435e60318e369509975c19a9888741e047803de
2020-01-15 19:20:57 +00:00
Keun young Park
744f97fe20 SystemServer: Migrate Boottime related metrics to StatsLog
Bug: 132691841
Test: check boot related stats are pushed after boot up
      $ adb shell cmd stats print-stats

Change-Id: I675f12b997ae821c75b5aaf456e7c84a2f7fed67
2020-01-15 10:19:19 -08:00
TreeHugger Robot
eacd21542d Merge "Dynamically load statsd-service" 2020-01-15 08:32:54 +00:00
Neil Fuller
290e90f672 Remove an interface before more invasive changes
Remove NetworkTimeUpdateService interface, replace it with its only
implementation.

Test: build only
Change-Id: Idf607957b7abe9a27f4fec2ebe3c0ee9e74f1694
2020-01-14 18:13:41 +00:00
Tej Singh
b2d6884ecf Dynamically load statsd-service
Previously, service-statsd.jar was on the SYSTEM_SERVER_CLASSPATH. This
CL loads StatsCompanion from SystemServer.java dynamically so that the
jar does not have to be on the classpath.

Bug: 146064616
Test: boots
Change-Id: Ia0e98ed0b6e35da01b38ead2fcf45d440eae31c3
2020-01-10 11:27:21 -08:00
Gavin Corkery
69395659e3 Integrate Rescue Party with Package Watchdog
Integrate Rescue Party as an observer for Package
Watchdog, for managing package failures. Rescue Party
will be a persistent observer, meaning it may receive
failure calls for packages it has not explicitly asked
to observe.

Remove app failure calls and thresholding logic from
Rescue Party. Remove obsolete Rescue Party tests
and add persistent observer tests to
PackageWatchdogTest.

Test: atest PackageWatchdogTest
Test: atest RescuePartyTest
Test: atest StagedRollbackTest
Bug: 136135457
Change-Id: I55ec0de48acd5434255811feba758d38c9304478
2020-01-08 22:17:00 +00:00
Hall Liu
b38ad5f563 Add system service for accessing SystemConfig
Add SystemConfigService and associated AIDLs and permissions for
accessing SystemConfig. The service returns values obtained from a
static instance of com.android.server.SystemConfig.

Bug: 143112379
Test: atest SystemConfigTest
Change-Id: I1a863ae9f53db21d698376008e5b1da83309b141
2020-01-07 15:17:40 -08:00
Danning Chen
e569d7b0c2 Merge "Add the skeleton code for People Service which is a new system service with only internal APIs" 2020-01-07 22:10:19 +00:00
Tej Singh
953ad86c21 Create StatsPullAtomService
This creates an empty systeme service for the java pullers that are
curreently in StatsCompanionService to live. StatsPullAtomService will
not live in the statsd apex.

Test: builds, boots
Bug: 141697961
Change-Id: Ifc8ed9903d414ada665875a44254e602decf6495
2020-01-03 12:51:38 -08:00
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
Automerger Merge Worker
08074c62b0 Merge "[Tether13] Move TetheringManager into framework" am: 2410d67357 am: 25cc1f47c5
Change-Id: I9ec25eb984e3b534ddcc9313836a319b21526998
2019-12-20 14:00:29 +00: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
markchien
6d06f6d51a [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
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-19 20:53:06 +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