Commit Graph

14366 Commits

Author SHA1 Message Date
Wale Ogunwale
355ea855f6 Merge "Unify Activities and Windows under one lock (38/n)" 2018-11-08 14:48:43 +00:00
Wei Wang
bad7c20606 Add thermal service into system_server
This system service will listen to ThermalHAL for throttling events and
take actions accordingly, e.g. shutdown device and/or sending
notification to registered listeners to IThermalSerivce.

Bug: 79443945
Bug: 118510237
Bug: 111086696
Bug: 116541003
Test: Boot and test callback on ThermalHAL 1.1
Test: Boot and test callback on ThermalHAL 2.0
Test: Kill ThermalHAL process
Test: Change device threshold to trigger shutdown
Change-Id: I1f4066c9f1cf9ab46c1738a0a4435802512e4339
2018-11-07 13:38:57 -08:00
Wale Ogunwale
1f5e53d4a6 Unify Activities and Windows under one lock (38/n)
Final step before we actually start unifing the hierarchy is to have
activity and window manager under one lock. This CL makes it so.
Note, that there are probably areas where this change might lead to dealock
however we can fix those areas as we discover them.

Test: Existing tests pass
Bug: 80414790
Change-Id: Ie4b71d4ceb986256482031a99065b8d2ef60ebe8
2018-11-07 07:09:35 -08:00
Felipe Leme
e348dc3486 Initial implementation of the IntelligenceService pipeline.
It's still full of TODOs, but at leats it now provides an end-to-end
workflow from the activity creation / destruction to the service implementation.

Test: mmm -j packages/experimental/FillService && \
      adb install -r ${OUT}/data/app/FillService/FillService.apk && \
      adb shell settings put secure intel_service foo.bar.fill/.AiaiService
Bug: 111276913

Change-Id: Id5daf7b8b51e97c74d9b6ec00f953ddb02b48e46
2018-11-06 10:01:02 -08:00
Kevin Chyn
8d45688b6d Merge "Add placeholders for IrisManager/Service" 2018-11-06 06:29:22 +00:00
Kevin Chyn
51676d293a Add placeholders for IrisManager/Service
With the system services in place, we can add SELinux policies

Bug: 116530289

Test: Builds
Change-Id: I0fd0dfbbbf258eb4a0ef9019247baaf323578959
2018-11-05 18:57:15 -08:00
Wale Ogunwale
595070969d Moved Activity management out of ActivityManager to WindowManager (37/n)
What could go wrong ;)

Note that ATMS and all other activity management files are still under
the AMS lock. We will be changing them soon to use the WMS lock, but
till then it is important to take care not to use the WMS lock for
activities stuff and AMS lock for window stuff.

Test: Existing tests pass
Bug: 80414790
Change-Id: I69f5a6e40ad892557a425e1f34be987507102136
2018-11-03 23:23:06 -07:00
Kenny Root
f74bfdee01 Add empty AdbService to SystemServer
Create skeleton service to migrate functions from UsbService in later
change.

Bug: 63820489
Test: make
Change-Id: I07672fe87cfae188fe77c173fc49119e182c6b05
2018-10-31 16:11:01 +09:00
Andreas Gampe
3c27f0b88d Merge "Frameworks: Add VMRuntime.hasBootImageSpaces check" am: 9135811848 am: b9da5284fc
am: 7bd2e0ce26

Change-Id: I1925a99d5f8128caded1c2f11956e3df7d4a9e08
2018-10-11 09:15:06 -07:00
Andreas Gampe
7bd2e0ce26 Merge "Frameworks: Add VMRuntime.hasBootImageSpaces check" am: 9135811848
am: b9da5284fc

Change-Id: Ib02426fb94ab9fc4b448ebb5f4d928ec2cb7afbf
2018-10-11 08:59:08 -07:00
Rick Yiu
04618d5456 Merge "Do not start VrManagerService if VR is not supported" into pi-dev
am: 2667c1dfa2

Change-Id: I76eb570e1c08ee57d931221169b503033e466d49
2018-10-10 21:23:50 -07:00
Andreas Gampe
e697a4fc64 Frameworks: Add VMRuntime.hasBootImageSpaces check
Log a wtf in the system server when the runtime does not
use a boot image.

Test: m
Test: system boots
Change-Id: I087c269dd1e95eeeab5db4250133f9c61e9399c7
2018-10-09 11:24:24 -07:00
Philip P. Moltmann
20dd431f20 Do not allow to revert setForceSafeLabel
Test: Built
Bug: 116798569
Change-Id: I3f26d4466c84d3decb1c4962fb45e900ba35f68e
2018-10-08 16:56:49 -07:00
Makoto Onuki
df7e481b20 Add API surface for "keep SMS app running".
Bug: 109809543
Test: build & boot
Change-Id: Ie9ebf1f34052394a92c3f260413c18596709d3a3
2018-09-26 11:51:06 -07:00
Rick Yiu
336be26281 Do not start VrManagerService if VR is not supported
When VR mode is not supported by removing the feature of
android.hardware.vr.high_performance, do not start VrManagerService.
Otherwise, there will be undesired behavior, such as calling into
PowerHal/VrHal for VR hints.

Test: no undesired behavior observed
Bug: 116427118
Change-Id: I3e3c1f02c2fad958d8659d7957d005d25d823c3e
Merged-In: I3e3c1f02c2fad958d8659d7957d005d25d823c3e
2018-09-24 12:57:42 +08:00
Kevin Chyn
352adfec61 2/n: Rename BiometricPromptService to BiometricService
This is in preparation for BiometricManager. Each Manager should have its
own Service.

Bug: 112570477

Test: BiometricPromptDemo works
Change-Id: Ibbbd499a0fd5a2050b329ee038776c6c9f49cdb2
2018-09-20 23:51:40 -07:00
TreeHugger Robot
229a0718ff Merge "Move TextServicesManagerService to com.android.server.textservices" 2018-09-15 00:53:35 +00:00
TreeHugger Robot
723438885d Merge "Revert "Revert "Do not start VrManagerService if VR is not supported""" 2018-09-14 20:00:22 +00:00
Steve Paik
117fcb06fc Add disableNetworkTime config property
This was removed as part of this bug because the config wasn't used:

    Bug 64052650
    Change-Id I5c8ed3f0e78c2ed0d2e733939a82e1ab8940de22

This is now needed by Android Automotive since the network module may
live off board in a vehicle.

Bug: 110800197
Test: make & flash
Change-Id: I3715602e7fb22503d6867b61c22bdcb963174059
2018-09-13 17:20:33 +00:00
Yohei Yukawa
eb1e8049c1 Move TextServicesManagerService to com.android.server.textservices
This CL moves TextServicesManagerService (TSMS)
  from com.android.server
    to com.android.server.textservices
so that we can mechanically factor out inner classes from IMMS to
separate package private classes.

This is purely a mechanical refactoring of an implementation detail.
There should be no observable behavior difference.

Fix: 115516399
Test: manually verified with AOSP spellchecker
Change-Id: Iaaf627e48e3f040795f58e03b1292a991afb82b4
2018-09-12 14:02:00 -07:00
Rick Yiu
b287592578 Revert "Revert "Do not start VrManagerService if VR is not supported""
This reverts commit f5d99fa7d9.

Bug: 112064298
Change-Id: Ib2b595f8f98a577af205d5169af28a185ef00f03
2018-09-12 11:07:25 +00:00
Yohei Yukawa
603f4d00c6 Move InputMethodManagerService to com.android.server.inputmethod
This CL moves InputMethodManagerService (IMMS)
  from com.android.server
    to com.android.server.inputmethod
so that we can mechanically factor out inner classes from IMMS to
separate package private classes.

This is purely a mechanical refactoring of an implementation detail.
There should be no observable behavior difference.

Fix: 114660660
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest FrameworksCoreTests:com.android.internal.inputmethod
Change-Id: I023d8f2863601ee54f304988117d8ea750770f70
2018-09-11 15:04:58 -07:00
Adrian Roos
f5d99fa7d9 Revert "Do not start VrManagerService if VR is not supported"
This reverts commit af1eda2654.
Bug: 112064298
Change-Id: Ie7912c055e8e27250b0404e337813c0ee670b1de
2018-09-10 16:09:59 +00:00
Rick Yiu
af1eda2654 Do not start VrManagerService if VR is not supported
When VR mode is not supported by removing the feature of
android.hardware.vr.high_performance, do not start VrManagerService.
Otherwise, there will be undesired behavior, such as calling into
PowerHal/VrHal for VR hints.

Test: no undesired behavior observed
Bug: 112064298
Change-Id: I3e3c1f02c2fad958d8659d7957d005d25d823c3e
2018-09-08 19:21:31 +08:00
TreeHugger Robot
dfdc67d9cf Merge "Injecting system calls into alarm manager" 2018-09-07 02:19:37 +00:00
Suprabh Shukla
6226c2ff3c Injecting system calls into alarm manager
Injecting and mocking dependencies to make the service unit testable.
Shuffled around initialization to make that possible.

Also added the first batch of unit tests. The idea is to have extensive
coverage of minute pieces of alarm manager logic, which should help us
catch any regressions caused by future changes to the code.

Test: atest com.android.server.AlarmManagerServiceTest
atest CtsAlarmManagerTestCases

Bug: 111454659
Change-Id: Ifa1c09646f688cf5c41abe17d98dbc19978eac70
2018-09-06 16:20:30 -07:00
Marcin Oczeretko
c80c81a516 Extract CachedDeviceState from BinderCallsStats
Add a service that tracks the device state properties which are
interesting to System Server telemetry services. Allows the services to
share this code and have consistent state information.

Test: Unit tests and manually tested
Change-Id: Ia5c78c45a55414a0c5c46202db2a37283b50a703
2018-09-06 10:54:55 +01:00
Marcin Oczeretko
d8cc8593c0 Collect telemetry data for System Server Loopers.
Adds LooperStats and LooperStatsService which set a static
Looper.Observer to record the count of dispatched messages and
cpu/latency information. The aggregated stats are collected by
Westworld as pulled atoms.

The collection is disabled by default and requires a manual call to
enable:

adb shell cmd looper_stats enable

Test: Unit tests and tested manually that the collected data seems
reasonable.

Change-Id: I7162fbca4e324f62887f95df3405205cbe4416ca
2018-09-03 16:06:06 +01:00
TreeHugger Robot
49fa609ba0 Merge changes from topic "biometric-prompt-service"
* changes:
  Add BiometricPromptService
  Remove common biometric directory
2018-08-31 01:21:07 +00:00
Kevin Chyn
a24e9fd9ac Add BiometricPromptService
The change introduces the following:
  - BiometricPrompt communicatates with BiometricPromptService (new)
    system service. The service does the decision making for which
    biometric modality to use.
  - As a result, a lot of logic is moved from <Biometric>Manager
    to BiometricPrompt. FingerprintManager now does not care about
    BiometricPrompt logic anymore (reverts several P changes).

Face, and all future <Biometric>Service interfaces must be protected by
the signature-only MANAGE_BIOMETRIC permission. Settings, SystemUI, and
BiometricPromptService are their only clients.

Bug: 72825012

Test: BiometricPromptDemo works
Test: Keyguard works
Test: Settings works

Change-Id: I2b7d6eff81bc07950202c50e592d733032523bf0
2018-08-30 14:49:32 -07:00
Yohei Yukawa
e24ed79edb Hide IInputMethodManager.{add,remove}Client() from apps
Since IInputMethodManager.{add,remove}Client() are just callbacks from
WindowManagerService to InputMethodManagerService, we can simply move
those two methods to InputMethodManagerInternal instead of having them
in IInputMethodManager.aidl, which ends up exposing those methods to
any random user process.

This enables us to clean up WindowManagerService because it is no
longer responsible for obtaining IInputMethodManager and passing it to
each Session instance.

This also allows us to get rid of several RemoteException handlers
from Session class, because now the complier knows that those
callbacks will never throw RemoteException.

Fix: 112670859
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: prebuilts/checkstyle/checkstyle.py -f frameworks/base/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java
Change-Id: I453200fd5847e9a78876affb6a1caec221525e1d
2018-08-28 19:10:32 -07:00
Jorim Jaggi
acfabaa32b Merge "BootAnimation: Fix boot animation with hidden cutout" into pi-dev am: e387ce18d8
am: 2c68abc9fc

Change-Id: I1a0db9f30f7270d49136fa3984dc8d9633ead690
2018-08-22 16:38:27 -07:00
Jorim Jaggi
2c68abc9fc Merge "BootAnimation: Fix boot animation with hidden cutout" into pi-dev
am: e387ce18d8

Change-Id: I55c32ef69c4bb565376946ce65101f37ef0cce8a
2018-08-22 16:20:32 -07:00
Adrian Roos
9ee5dff83c BootAnimation: Fix boot animation with hidden cutout
We do this by storing the masking inset in a persistent property.
The boot animation then animates itself to where it would be if that
masking inset were applied, then changes the viewport.

For this to work, we also need to make sure the DisplayManagerService
has the right overlay right at the start.

Bug: 112876936
Test: Hide cutout, then reboot. Verify boot animation is smooth.
Change-Id: I3e988b2340b2e0d2be3939bdc6878704c234ccc8
2018-08-22 21:37:39 +01:00
Makoto Onuki
2132e0814c Merge "Default to FULL synchronous mode for sqlite DBs in system server" into pi-dev
am: 30fdcbad94

Change-Id: I0f4b5f91cf0a877bc518b555abb8380487c68d31
2018-08-17 16:48:09 -07:00
Makoto Onuki
962f78649f Default to FULL synchronous mode for sqlite DBs in system server
Test: change pin and immediately crash the kernel with
adb shell 'su root sh -c "echo c >/proc/sysrq-trigger"' and boot
Bug: 112175067

Change-Id: Ia5f43f3118e2297fbea43c805ef2f4577bf8a9bf
(cherry picked from commit 50e00c8dc4)

Merged-in: Ia5f43f3118e2297fbea43c805ef2f4577bf8a9bf
2018-08-17 16:35:46 -07:00
Makoto Onuki
3729e9ce4e Default to FULL synchronous mode for sqlite DBs in system server
Test: change pin and immediately crash the kernel with
adb shell 'su root sh -c "echo c >/proc/sysrq-trigger"' and boot
Bug: 112175067

Change-Id: Ia5f43f3118e2297fbea43c805ef2f4577bf8a9bf
(cherry picked from commit 50e00c8dc4)
2018-08-17 21:09:03 +00:00
Makoto Onuki
50e00c8dc4 Default to FULL synchronous mode for sqlite DBs in system server
Test: change pin and immediately crash the kernel with
adb shell 'su root sh -c "echo c >/proc/sysrq-trigger"' and boot
Bug: 112175067

Change-Id: Ia5f43f3118e2297fbea43c805ef2f4577bf8a9bf
2018-08-09 11:00:54 -07:00
TreeHugger Robot
f618905a6e Merge "Fix WM input limitations on secondary displays (1/N)" 2018-07-26 12:06:28 +00:00
Wale Ogunwale
590c716f8c Merge "Moved URI grants code out of ActivityManagerService to its own service (13/n)" 2018-07-26 03:56:08 +00:00
Arthur Hung
95b38a906f Fix WM input limitations on secondary displays (1/N)
- One DisplayContent include one InputMonitor.
- For customized inputconsumers, they can be handled by DisplayContent.
- Extract InputManagerCallback to communicated InputManagerService.
- All windows need pass displayId to InputWindowHandle.

Bug: 111363643
Test: atest WindowManagerSmokeTest
Test: atest DisplayContentTests
Change-Id: Iaaca7d135a11c55a78bcf1f81918599b3d160106
2018-07-25 17:47:51 +08:00
Michael Kwan
7f70fc7bef Watch type devices currently do not support instant apps, prevent
related services from launching.

Bug: 111598607
Test: manual test
Change-Id: I5cc6909ecb287ece5b964ea6c7c685dbe767c895
2018-07-24 17:15:05 +00:00
Wale Ogunwale
6d50dcc8af Moved URI grants code out of ActivityManagerService to its own service (13/n)
Allows for other services like window manager to call uri grants without
holding AM service lock.

Bug: 80414790
Test: Existing tests pass.
Change-Id: Ie5b4ddb19a2cedff09332dbeb56bcd9292fd18ac
2018-07-23 16:37:46 -07:00
Rhed Jao
8a39cef7f8 Update AccessibilityManagerService to use SystemService
Bug: 70221242
Test: atest CtsAccessibilityServiceTestCases
Change-Id: Icdf0772d0be93168a954fdd746cada4d5d507eb4
2018-07-18 13:42:35 +08:00
Olivier Gaillard
1d7f615eec Add experiment flag to control binder call stats.
For instance, to enabled detailed tracking locally.
adb shell settings put global binder_calls_stats detailed_tracking=true

Also adds the ability to turn off data collection completely and
changing the sampling interval. Uploading data through westworld can
re-use the same flag once implemented.

Test: Unit tested

Change-Id: I808c9902b8124ab643d9b197703d537da040ae3e
2018-07-04 13:36:46 +01:00
Neil Fuller
ca48eb7fa9 resolve merge conflicts of bc38909bf3 to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ib06f2869e5aa1788c8d5fc281a8565420e93d8f7
2018-06-27 11:40:06 +01:00
Neil Fuller
e01a7adf5a resolve merge conflicts of 55c0a66825 to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ie524607cabc6688911eee7e4f61c50fd406c71f4
2018-06-26 11:55:46 +01:00
Neil Fuller
0e44c66e08 Prepare for migration to the time detector service
Paves the way for moving more behavior to the time detector
service from the NetworkTimeUpdateService.

The NewNetworkTimeUpdateService is effectively identical to
the OldNetworkTimeUpdateService in this initial commit.

Bug: 78217059
Test: build / boot
Merged-In: Ica9fa9b61c849e034d76c0faae5693b60a4a197f
Change-Id: Ica9fa9b61c849e034d76c0faae5693b60a4a197f
2018-06-26 10:14:17 +01:00
Neil Fuller
b3d6abbe6f Prepare for migration to the time detector service
Paves the way for moving more behavior to the time detector
service from the NetworkTimeUpdateService.

The NewNetworkTimeUpdateService is effectively identical to
the OldNetworkTimeUpdateService in this initial commit.

Bug: 78217059
Test: build / boot
Merged-In: Ica9fa9b61c849e034d76c0faae5693b60a4a197f
Change-Id: Ica9fa9b61c849e034d76c0faae5693b60a4a197f
2018-06-26 09:46:32 +01:00
Neil Fuller
4d9f7a8bc3 Merge "Minimum viable TimeZoneDetectorService" 2018-06-25 18:47:39 +00:00