Commit Graph

13116 Commits

Author SHA1 Message Date
Selim Cinek
eabdcf3bef Merge "Updated the styling for notifications" into pi-dev
am: 51856fde2b

Change-Id: I8d7b12955763d4d286119e976901fb55cb7a023e
2018-03-23 03:01:17 +00:00
Suprabh Shukla
31b5990893 Merge "APIs to suspend packages with SUSPEND_APPS permission" into pi-dev
am: 6affc07065

Change-Id: Icd9ccea90cac3b367b74915f76d39d7f5f740687
2018-03-23 00:09:48 +00:00
TreeHugger Robot
51856fde2b Merge "Updated the styling for notifications" into pi-dev 2018-03-23 00:02:35 +00:00
TreeHugger Robot
6affc07065 Merge "APIs to suspend packages with SUSPEND_APPS permission" into pi-dev 2018-03-22 22:15:31 +00:00
Nathan Harold
e9ae13cabe Merge "Add AppOp for IpSec Tunnels" into pi-dev
am: 8a047a0c52

Change-Id: I159d49219d2f75e1f5aeece4196638a8823fc029
2018-03-22 21:35:36 +00:00
Nathan Harold
8a047a0c52 Merge "Add AppOp for IpSec Tunnels" into pi-dev 2018-03-22 21:14:36 +00:00
Suprabh Shukla
021b57ab8d APIs to suspend packages with SUSPEND_APPS permission
Changed the existing hidden api setPackagesSuspendedAsUser to a system
api setPackagesSuspended that can be called by apps with either
MANAGE_USERS or SUSPEND_APPS permission. Additionally, the suspending
app can now specify optional extra information meant to be used by the
suspended apps and the launcher to deal with this state.

The following other APIs are added:
 - isPackageSuspended(): Apps can query whether they are in a suspended
 state
 - @SystemApi getPackageSuspendedAppExtras(String): Apps with permission
 SUSPEND_APPS can get the appExtras passed to PM when suspending the
 app.
 - @SystemApi setPackageSuspendedAppExtras(String, PersistableBundle):
 Apps with permission SUSPEND_APPS can update app extras for a
 suspended package.
 - getPackageSuspendedAppExtras(): Apps can call to get the appExtras
 passed in to PM when they were suspended.

Test: Can be run via:
atest com.android.server.pm.PackageManagerSettingsTests
atest com.android.server.pm.PackageUserStateTest
atest com.android.server.pm.SuspendPackagesTest

Bug: 74336673
Change-Id: I3b9ed2c8478b34ee2e8986f5f5fddb2839d102e3
2018-03-22 12:59:57 -07:00
Julia Reynolds
571c29428f Merge "Fix index error" into pi-dev
am: ae2f368907

Change-Id: I818ce7bfe0fc6cb5f0bbe25ede1ac443ab7ef052
2018-03-22 11:54:05 +00:00
Julia Reynolds
ae2f368907 Merge "Fix index error" into pi-dev 2018-03-22 11:39:28 +00:00
Tej Singh
7b0b2422ed Merge "ScheduledJobStateChanged: add stop reason" into pi-dev
am: dcccfd9742

Change-Id: Ie6d83624f3d607c5bd3d24aea0bcd28829a2f11a
2018-03-22 01:43:52 +00:00
TreeHugger Robot
dcccfd9742 Merge "ScheduledJobStateChanged: add stop reason" into pi-dev 2018-03-22 01:30:52 +00:00
Selim Cinek
c7f5a827d6 Updated the styling for notifications
The new notifications now have different font weights
and colors to make the shade more readable.

Fixes: 69168591
Test: runtest systemui
Change-Id: I0b635724fa122d292841e56efa84aa57fa364300
2018-03-21 17:03:38 -07:00
Nathan Harold
1bb42067f0 Add AppOp for IpSec Tunnels
Add a new AppOp to allow bound system services
such as TelephonyDataServices and potentially
VPN providers to access the IPsec tunnel
management APIs. Since this is not directly
user-facing, and not all System apps should have
this privilege, the access is only granted via
an AppOp or to the system itself.

Bug: 66955045
Test: compilation (still WIP)
Change-Id: I0b0528c75c622d8538baeec019c3672cbed5d899
2018-03-21 15:23:39 -07:00
Yi Jin
4876868997 Merge "Remove am/wm.proto which is redundant. The naming convention is defined in core/proto/README.md" into pi-dev
am: 32ca41d028

Change-Id: I73b1ed0210f01ad6bf81089fef408765f34426a1
2018-03-21 21:49:17 +00:00
TreeHugger Robot
32ca41d028 Merge "Remove am/wm.proto which is redundant. The naming convention is defined in core/proto/README.md" into pi-dev 2018-03-21 21:24:19 +00:00
Lenka Trochtova
bc9f74c83e Merge "Return a boolean from the mandatory backup transport setter." into pi-dev
am: 2f81559d29

Change-Id: Ibb77d5f16312f03504e7ced961b92e48f37342bc
2018-03-21 20:13:51 +00:00
Julia Reynolds
5a366fbd81 Fix index error
Change-Id: I93cf18b35060a09a3b8f4be8e0b9b4682d390b25
Fixes: 76101440
Test: runtest systemui-notification
2018-03-21 15:57:40 -04:00
TreeHugger Robot
2f81559d29 Merge "Return a boolean from the mandatory backup transport setter." into pi-dev 2018-03-21 19:34:52 +00:00
Jason Monk
e98e31ce3f Merge "Some Slices API refinement" into pi-dev
am: 1543171d3e

Change-Id: Ib921eac77b9154800aa784ec3d3f4846f788a9a7
2018-03-21 17:45:59 +00:00
TreeHugger Robot
1543171d3e Merge "Some Slices API refinement" into pi-dev 2018-03-21 17:06:40 +00:00
Jason Monk
7ea088bb22 Merge "UsageEvents for slices pinning" into pi-dev
am: 17d3b47e20

Change-Id: I559072719451cd2cff5b49f7d89c3ee92b995ac1
2018-03-21 16:37:57 +00:00
Lenka Trochtova
56681f761e Return a boolean from the mandatory backup transport setter.
Bug: 73813043
Bug: 64012357
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testGetAndSetMandatoryBackupTransport
Test: cts-tradefed run cts -m CtsBackupHostTestCase --test android.cts.backup.BackupDeviceOwnerHostSideTest

Change-Id: I7f47a41070b767a6be8b986be485b4ad782690cf
2018-03-21 15:48:41 +01:00
Jason Monk
1918ef7569 UsageEvents for slices pinning
Test: atest frameworks/base/services/tests/servicestests
Bug: 73455786
Change-Id: I6a37f5525c29d3f47aa37e262c8834840309ba44
2018-03-21 10:03:29 -04:00
Philip P. Moltmann
9dd3e7d300 Add SoundTriggerDetectionService
am: 18e3eb8168

Change-Id: I4bb7ada74c36df4a64956c9c36a1675aad1f6645
2018-03-21 06:00:01 +00:00
Selim Cinek
2004f06753 Merge changes from topic "heads_up_redesign" into pi-dev
am: db0e4f1d73

Change-Id: I95507d927831053efcb16ac9821f18a175d90bc4
2018-03-21 04:34:20 +00:00
Amith Yamasani
01dbdeea77 Merge "API Review: Documentation improvement for standby buckets" into pi-dev
am: 35a4f4c4a6

Change-Id: I8e98ec5fe80689c78b5e5db17e58c7b08b244606
2018-03-21 04:01:08 +00: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
Andrii Kulian
fb49ec71ce Merge "Use transaction for local activity relaunch" into pi-dev
am: 60b877fa8c

Change-Id: I54a375a4220d2d12a5948141c396cee57fc5a55e
2018-03-21 02:18:58 +00:00
Andrii Kulian
8ef2b626c8 Merge "Don't set override display info for ActivityView" into pi-dev
am: 982973934d

Change-Id: Icee9f177557338f2392434701bb80e4300287661
2018-03-21 01:09:29 +00:00
Selim Cinek
db0e4f1d73 Merge changes from topic "heads_up_redesign" into pi-dev
* changes:
  Added new appear and disappear animations for heads up
  Polished the heads up experience
  Removed the heads up scrim and replaced it with more elevation
  Insetting heads up notifications
  Ensured that the heads-up notifications are always rounded
2018-03-21 00:53:50 +00:00
Yi Jin
6c6e9cab42 Remove am/wm.proto which is redundant. The naming convention is defined
in core/proto/README.md

Bug: 72474563
Test: make sure the Android build
Change-Id: I2a90cbb6bb0b0c62fe4a0b81cb5bb3ea36381871
2018-03-20 17:39:32 -07:00
Julia Reynolds
e75d735d01 Merge "Log visual interruptions to usagestats." into pi-dev
am: 1c7c2bdd0b

Change-Id: I3a6497fbdddc5f728c5702f1a60e479d99fd7277
2018-03-21 00:08:39 +00:00
TreeHugger Robot
35a4f4c4a6 Merge "API Review: Documentation improvement for standby buckets" into pi-dev 2018-03-21 00:08:28 +00:00
Michael Wachenschwanz
543275c541 Merge "Make SYSTEM_INTERACTION a SystemApi" into pi-dev
am: 06ce5f6803

Change-Id: Ieef7dc8027f0c81b8dfafa08b3d626adf3cfe75f
2018-03-21 00:03:53 +00:00
Andrii Kulian
e5c818e202 Merge "Don't throw exception for duplicate stop" into pi-dev
am: 002e0ef06e

Change-Id: I70a17eb1b923871536721aa77442a85d18b49c74
2018-03-20 23:03:57 +00:00
Andrii Kulian
60b877fa8c Merge "Use transaction for local activity relaunch" into pi-dev 2018-03-20 22:42:21 +00:00
Selim Cinek
aa9db1f34f Insetting heads up notifications
Heads up notifications are now corretly respecting insets.
instead of overlapping with any possible notches, we're
insetting heads up notifications and splitting the main
content from the header.

Fixes: 72748440
Test: runtest systemui
Change-Id: Ie53ea31fef4e468239c4346f9d1f192bcb26e11d
2018-03-20 15:36:17 -07:00
Andrii Kulian
982973934d Merge "Don't set override display info for ActivityView" into pi-dev 2018-03-20 22:01:27 +00:00
TreeHugger Robot
1c7c2bdd0b Merge "Log visual interruptions to usagestats." into pi-dev 2018-03-20 21:34:01 +00:00
TreeHugger Robot
06ce5f6803 Merge "Make SYSTEM_INTERACTION a SystemApi" into pi-dev 2018-03-20 21:31:58 +00:00
Andrii Kulian
002e0ef06e Merge "Don't throw exception for duplicate stop" into pi-dev 2018-03-20 21:11:09 +00:00
Andrii Kulian
77d7360597 Use transaction for local activity relaunch
To know that onPostCreate callback should be executed we should use
TransactionExecutor for the entire transaction. It will fill
PendingActions object during the launch and the callback will be
triggered after onStart.
This CL changes local activity relaunch to use Lifecycler
infrastructure.

Bug: 72029061
Bug: 64610483
Fixes: 73747058
Test: ActivityLifecycleTests
Change-Id: I7d3fa6339fa6fe2634d0d1635f76e4d6ba03beb2
2018-03-20 14:08:40 -07: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
Jason Monk
106387f0b2 Some Slices API refinement
Removing overloads, fixing documentation, adding stringdefs, etc.

Test: update-api
Change-Id: Iae902092a29d44c3f4735ad2c3392bb35988684a
Fixes: 73124159
Bug: 73123366
Fixes: 73123451
Fixes: 73123651
Fixes: 73124123
2018-03-20 16:55:47 -04:00
Andrii Kulian
f0379de259 Don't set override display info for ActivityView
ActivityView content should never be letter- or pillar-boxed
and it doesn't have overscan areas, so we can skip setting
display override info for a virtual display that backs it.

Bug: 72220802
Test: Manually resize with ActivityView demo app
Change-Id: I211449eaea50ec5d3214d63e7eb93a1d2ed2c0fd
2018-03-20 19:43:34 +00:00
Julia Reynolds
7217dc9f76 Log visual interruptions to usagestats.
Test: runtest systemui-notification, cts
Bug: 74318867
Change-Id: I6233240c2a7940225cadde0258b5d7ba88b86aaf
2018-03-20 15:14:16 -04:00
Amith Yamasani
853e53f6e8 API Review: Documentation improvement for standby buckets
Specify how to compare with bucket constants since new
bucket constants could be introduced later.

Fixes: 73790511
Test: builds

Change-Id: Ib99ec5fe208bc612869df8bfc69a26ee6be31fa5
2018-03-20 12:00:28 -07:00
Chris Wren
d1d1980455 Merge "support framework logging for slices" into pi-dev
am: 6446ed4a0f

Change-Id: Ie848304de218b16ce740b0dfd5701e120c322e36
2018-03-20 18:48:06 +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
Chris Wren
6446ed4a0f Merge "support framework logging for slices" into pi-dev 2018-03-20 17:33:40 +00:00