Commit Graph

9625 Commits

Author SHA1 Message Date
Tej Singh
8ebed82ccb Merge "ScheduledJobStateChanged: add stop reason" into pi-dev am: dcccfd9742
am: 7b0b2422ed

Change-Id: Ideaea9c44cbcda65111306b12079e75bbb5ce367
2018-03-22 02:20:22 +00:00
TreeHugger Robot
dcccfd9742 Merge "ScheduledJobStateChanged: add stop reason" into pi-dev 2018-03-22 01:30:52 +00:00
Fyodor Kupolov
1a1092f83d Merge "Added BinderCallsStatsService" into pi-dev am: 163a57d71e
am: c434073d49

Change-Id: I12cdf4815840286fe044b8071d70cca590497a86
2018-03-22 00:32:21 +00:00
Fyodor Kupolov
163a57d71e Merge "Added BinderCallsStatsService" into pi-dev 2018-03-21 23:02:58 +00:00
Beverly
dacfd894c3 Merge "Category message is sufficient for message notif" into pi-dev am: b24d84b222
am: ea28fee05d

Change-Id: I1693bcd51cfd29a7989e1237ad9943df1bbf282d
2018-03-21 19:05:47 +00:00
TreeHugger Robot
b24d84b222 Merge "Category message is sufficient for message notif" into pi-dev 2018-03-21 17:43:40 +00:00
Rubin Xu
7ca6be3f32 Merge "Restore state if password change fails" into pi-dev am: 655877cd84
am: 452eeca413

Change-Id: I4ac9149c5d8508b6652ce2f0db3079a1d671328d
2018-03-21 16:13:52 +00:00
TreeHugger Robot
655877cd84 Merge "Restore state if password change fails" into pi-dev 2018-03-21 15:41:34 +00:00
Beverly
eb455965ef Category message is sufficient for message notif
If a notification is marked with category message, then
it is sufficient enough to be deemed a "message" notification.
However, to be considered an important message, we still
check if the message is from the default messaging app and has
category = message.

Change-Id: I4f2b502634b805919bdf8b82e3bdf475c0992bdd
Fixes:76019310
Test: AttentionManagementVerifierActivity
Test: atest services/tests/uiservicestests/src/com/android/server/notification/NotificationComparatorTest.java
2018-03-21 10:46:33 -04:00
Robert Berry
cececb6d19 Merge "Add RecoverySession importKeyChainSnapshot method" into pi-dev am: 889e78cb28
am: b0850c9a16

Change-Id: Ib6df86c889582368e8129ebf0e5d0d543c520b41
2018-03-21 12:51:12 +00:00
Bo Zhu
06cf154386 Merge "Use the new root cert file under the core/ folder" into pi-dev am: 82235880f6
am: 518b7de5af

Change-Id: If4e987b389c529cce4c0e252e100d7d84b5579cf
2018-03-21 12:44:02 +00:00
Robert Berry
889e78cb28 Merge "Add RecoverySession importKeyChainSnapshot method" into pi-dev 2018-03-21 12:25:37 +00:00
Rubin Xu
682d167580 Restore state if password change fails
Bug: 73299306
Fixes: 73299306
Test: Call LockPatternUtils.clearLock() with wrong password,
      make sure device still unlocks after reboot
Change-Id: I640fc62cbe0c0c57e980455d4f499df02dee0832
2018-03-21 12:05:04 +00:00
Robert Berry
4a5c87def0 Add RecoverySession importKeyChainSnapshot method
This imports the keys directly into the keystore of LockSettingsService,
allowing them to be accessed via the RecoveryController getKey method.
This is better as it does not expose raw key material to any app.

Bug: 74345822
Test: runtest frameworks-services -p \
      com.android.server.locksettings.recoverablekeystore

Change-Id: I4991b0cff1d2fa2e5bd0b53a71c096499e93e98b
2018-03-21 10:24:41 +00:00
Philip P. Moltmann
6951f56be0 Add SoundTriggerDetectionService am: 18e3eb8168
am: 9dd3e7d300

Change-Id: I13fd3f3d896825ddaf7cf5017eb027e5469208fb
2018-03-21 09:16:32 +00:00
Philip P. Moltmann
9dd3e7d300 Add SoundTriggerDetectionService
am: 18e3eb8168

Change-Id: I4bb7ada74c36df4a64956c9c36a1675aad1f6645
2018-03-21 06:00:01 +00:00
Bo Zhu
b31ab6740d Use the new root cert file under the core/ folder
This CL also adds an alias param to the RecoverySession#start method.

Bug: 76033708
Test: runtest frameworks-services -p \
      com.android.server.locksettings.recoverablekeystore

Change-Id: I870f4f89bd6e319e1687a981aa04af0d23f3c922
2018-03-20 22:49:00 -07:00
TreeHugger Robot
6ed6340e3c Merge changes from topic "SoundTriggerJobService-steps" into pi-dev
* changes:
  Throttle number of sound trigger operations / day
  Add SoundTriggerDetectionService
  Expose SoundTriggerManager and SoundTrigger APIs
2018-03-21 03:27:56 +00:00
Philip P. Moltmann
18e3eb8168 Add SoundTriggerDetectionService
The service is meant to replace the PendingIntent based API. Once all
users of the PendingIntent based API switched the PendingIntent based API
will be removed.

To have as little as possible impact on the whole SoundTrigger framework
the RemoteSoundTriggerDetectionService class implements the same
interface as the PendingIntent based class. Hence the exising code has
very little change. Further once the old code can be removed the amount
of changed (and added) code is limited.

The RemoteSoundTriggerDetectionService -> SoundTriggerDetectionService
is a vanilla as possible service implementation. The special behaviors
are:
- The system holds a wakelock while service operations are in progress
and the service is bound as foreground. Hence the service can e.g.
listen to the microphone.
- Service operations have a certain amount of time they are allowed to
run. Once every operation is either finished or the the operation
exceeded the allotted time, the system calls onStopOperation for each
still pending operation. This is a similar model as for the commonly
used JobService.
  Please note that if the time allowed for an operation is 15s and
op1 was run as 0si, and op1 was run at 5s, the service is allowed to run
until 20s. Hence _both_ onStopOperations will happen at 20s. This is
done for ease of implementation but should not give the service more
power than calling onStopOperation exactly 15s after each operation is
triggered.
- If an operation is done before the allotted time is reached, the
service can declare the operation as finished manually by calling
onOperationFinished. This is a call back into the system, hence a
'client' binder is sent to the service. If the operation is finished
by calling this method onStopOperation will not be called.
- As the service instance might be killed and restored between
operations we add a opaque bundle 'params' to each operations. The users
of the API can use this to send data from the start command to the
operations. It can also just be set to null. The params are not meant to
store changing state in between operations. Such state needs to be
persisted using the regular methods (e.g. write it to disk)
- A service can be used for multiple recognition sessions. Each
recognition is uniquelity defined by its sound model UUID. Hence each
operation gets at least tree arguments: Operation ID, sound mode UUID, params
- As a small optimization the params are cached inside of the service
instance.

The time allowed for each operation is in a @SystemAPI global setting,
so the service can make sure it finishes the operations before they are
stopped. It might take some time to deliver the operations via the
binder, hence it is not recommended to try to use every last ms of
allotted time.

Test: atest SoundTriggerDetectionServiceTest (added in separate CL)
      atest android.provider.SettingsBackupTest
Change-Id: I47f813b7a5138a6f24732197813a605d29f85a93
Fixes: 73829108
2018-03-20 13:57:14 -07:00
David Brazdil
bef718ff1b Merge "Revert "More flexible API enforcement policy."" 2018-03-20 20:26:45 +00:00
David Brazdil
1bc41d4c7d Revert "More flexible API enforcement policy."
This reverts commit 8bf10c74d4.

Reason for revert: Breaks run-test 674-hiddenapi

Change-Id: I014b29bf502d98d3e4134c16302008de085f64e2
2018-03-20 20:20:44 +00:00
Eugene Susla
7b24b2bc3e [DO NOT MERGE] Make TCMS multi-user-aware
Bug: 74392619
Fixes: 72481438
Test: presubmit
Change-Id: I1a04fe59216ac94ade8db0c2f56b83ca648db1e7
(cherry picked from commit 835c8b3962)
2018-03-20 19:40:03 +00:00
Eugene Susla
866361b023 Merge "Make TCMS multi-user-aware" 2018-03-20 19:39:31 +00:00
TreeHugger Robot
27c92a6efc Merge "More flexible API enforcement policy." 2018-03-20 18:21:43 +00:00
Tej Singh
33a412b52d ScheduledJobStateChanged: add stop reason
Adds stop reason to scheduled job state changed

Bug: b/71755130
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testScheduledJobState
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.JobSchedulerIncidentTest
Change-Id: Ic29a5e9160ac258140a52d31bc6210300949545d
2018-03-20 11:20:58 -07:00
Julia Reynolds
7d133ba39c Merge "Update system notification channels" into pi-dev am: 374b86a743
am: cf00d0c2ac

Change-Id: I1d5ae92a7ef78f9917c4fe8fc74c2a1328f2814c
2018-03-20 13:41:40 +00:00
TreeHugger Robot
374b86a743 Merge "Update system notification channels" into pi-dev 2018-03-20 13:13:36 +00:00
Mathew Inwood
8bf10c74d4 More flexible API enforcement policy.
This CL adds the basics to set black, dark gray or light gray list
enforcement, rather than just black as before. It's not possible to
actually set the policy per-package yet.

PackageDexOptimizer still uses a single bit, for API checks on/off, rather
than the new enum. It assumes blacklist enforcement internally. This can
be improved in a follow up CL.

Test: m
Test: Boot device

BUG: 73337509
Change-Id: I582bbb3ae63b4ef1c1f2af78930d153df7936075
2018-03-20 13:04:38 +00:00
Tej Singh
b52d6f14aa Merge "Merge "Atoms: Mobile Connection" into pi-dev am: dba47fcd09" into pi-dev-plus-aosp
am: 0a4a9248b5

Change-Id: I6c028678eb91627ae3c36db76e23f5237abf4c28
2018-03-20 01:12:26 +00:00
Tracy Zhou
8002e7f96c Merge "Move default pip position to right above the shelf." into pi-dev am: 017f44be88
am: 6f9ebab4ed

Change-Id: I65e587befec2dcba43b95fe6c6d8775a918fd332
2018-03-20 00:34:39 +00:00
TreeHugger Robot
dba47fcd09 Merge "Atoms: Mobile Connection" into pi-dev 2018-03-19 20:45:55 +00:00
Tracy Zhou
017f44be88 Merge "Move default pip position to right above the shelf." into pi-dev 2018-03-19 20:15:14 +00:00
Mike Ma
a5312bc235 Merge "Resolve STATSD and batterystats race condition" into pi-dev am: 1639c330fc
am: a2a3d4ceb6

Change-Id: I2eb4b3c1406be38021b262d424910a9af6a020af
2018-03-19 19:35:57 +00:00
Eugene Susla
835c8b3962 Make TCMS multi-user-aware
Bug: 74392619
Fixes: 72481438
Test: presubmit
Change-Id: I1a04fe59216ac94ade8db0c2f56b83ca648db1e7
2018-03-19 11:07:05 -07:00
TreeHugger Robot
1639c330fc Merge "Resolve STATSD and batterystats race condition" into pi-dev 2018-03-19 18:00:40 +00:00
Tracy Zhou
43513086d2 Move default pip position to right above the shelf.
This change takes care of the flow from WindowManagerService to
PinnedStackController, all the way to PipTouchHandler. It also
introduces a WindowManager hook that allows Launcher to pass in
shelf visibility and height. A separate change is made to send
signals from Launcher to SysUI. (ag/3724896)

Bug: 73961893
Change-Id: I2ff54e78bc2dc35c806b902464048b051a4d6394
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerPinnedStackTests
2018-03-19 17:41:08 +00:00
Tej Singh
eee317b7b6 Atoms: Mobile Connection
Atom definitions for MobileConnectionStateChanged and
MobileRadioTechnologyChanged

Also cleans up batterystats.

Bug: b/72320589
Test: verified logs appear in adb logcat -b stats
Change-Id: I9feb258cf6dd4a8c8bf1cffc9566b5d0a851a9fa
2018-03-19 09:48:22 -07:00
Julia Reynolds
fd80cff8e8 Update system notification channels
Allow some channels to be blocked, and most to
bypass DND.

Test: make
Change-Id: I135ef6f32a15bb2fc9c859ab087b2dc7477d67e1
Fixes: 75429403
2018-03-19 12:34:08 -04:00
Chad Brubaker
a953a4aacb Merge "Hide notifications when in Lockdown mode" into pi-dev am: 36b0b60e40
am: aee0b80abf

Change-Id: I07f7d05332a894582e52da06d3ba3085144c9ca8
2018-03-17 01:57:08 +00:00
Mike Ma
234d1828ca Resolve STATSD and batterystats race condition
Both STATSD and batterystats need to read uid cpu info. However, uid cpu
stats needs to be cleared from time to time to conserve memory. To
resolve this race condition, only batterystats will remove uid stats,
both from readers and from the kernel, also with a delay, so that STATSD
can access such info before it is removed.

Refactored readers to reuse some common code. Also removed string reader
from KernelUidCpuFreqTimeReader completely since binary reader has been
working fine for a while.

Change-Id: I209bdcec642e1a29a44b566ce98ebbfaaacb4e6a
Fixes: 72172569
Test: BatteryStatsCpuTimesTest
Test: KernelUidCpuActiveTimeReaderTest
Test: KernelUidCpuClusterTimeReaderTest
Test: KernelUidCpuFreqTimeReaderTest
2018-03-16 17:19:15 -07:00
Chad Brubaker
36b0b60e40 Merge "Hide notifications when in Lockdown mode" into pi-dev 2018-03-17 00:16:34 +00:00
Fyodor Kupolov
ca34851ead Added BinderCallsStatsService
It tracks binder calls into the system server and reports
statistics about CPU time spent per call on multiple dimensions,
e.g. uid or call description.

Usage: dumpsys binder_calls_stats
Overhead: ~0.5% per binder call (if enabled)

Test: manual
Bug: 75318418
Change-Id: I13b854f67f8fd1c9f985b8e45f74dcba2e73b9cb
2018-03-16 23:17:03 +00:00
Ryo Hashimoto
71d36aa327 Merge "Change FUSE_MAX_WRITE's value to 128KB" into pi-dev am: ebc30594e0
am: 583d8962a4

Change-Id: I74a85f3c8a4a5d8a427d0aa2c1d4ebabdb7997df
2018-03-16 06:21:01 +00:00
TreeHugger Robot
ebc30594e0 Merge "Change FUSE_MAX_WRITE's value to 128KB" into pi-dev 2018-03-16 03:00:44 +00:00
Chad Brubaker
ea8c5ef2b8 Hide notifications when in Lockdown mode
When the user triggers lockdown the device is put into a secure state,
beyond disabling less secure unlock modalities this should also disable
notifications so that data is not leaked despite the device being
strongly locked.

Fixes: 74564088
Test: Entered lockdown, verified notifications are no longer displayed
on the lockscreen

Change-Id: I4188c36b11a1b0cd496b8032bd246f0413c911c5
2018-03-15 16:37:43 -07:00
Ryo Hashimoto
5c14d498ff Change FUSE_MAX_WRITE's value to 128KB
In the kernel code, there is a constant FUSE_MAX_PAGES_PER_REQ which
limits the size of requests to 128KB.

Bug: 74725300
Test: atest android.os.storage.cts.StorageManagerTest
Change-Id: I6776a409ea68da946bb58e1a933f51c68cb1a99a
2018-03-15 14:20:49 +09:00
Julia Reynolds
fbf851b473 Merge changes Iaf63b4e8,Ie76044d4 into pi-dev am: a60e6f81df
am: e8a6b12f01

Change-Id: I7d48d3e13887897904d7a4a537c8624be10272f2
2018-03-14 22:02:10 +00:00
Julia Reynolds
0b8455d4d8 Change DND upgrade noti text and channel
Test: manual
Bug: 74075050
Change-Id: Iaf63b4e8691ba42ac4d1ddccf8f2368bfc0b74d7
2018-03-14 11:40:12 -04:00
Annie Meng
d3b6e9fe22 Merge "DO NOT MERGE Create a key value settings observer for backup parameters" into pi-dev 2018-03-14 13:40:46 +00:00
Annie Meng
21c1f35c1a Merge "Create a key value settings observer for backup parameters" 2018-03-14 10:38:36 +00:00