Commit Graph

77534 Commits

Author SHA1 Message Date
Chenjie Yu
8fd80d8178 bugfix: adjust StatsLogEventWrapper length to make sure we don't
lose data

Test: manual test
Change-Id: I7bf014e7e2007e0e065aa7ca99522d9effcf1a68
2017-12-15 14:46:29 -08:00
Antoan Angelov
ce0fe9b674 Merge "Add profile owner transfer functionality." 2017-12-14 15:09:05 +00:00
Peter Visontay
5607d0b72b Merge "Log an App Op when an accessibility service is registered." 2017-12-14 15:07:58 +00:00
TreeHugger Robot
ccb2aa8b26 Merge "Add WebView Tracing API." 2017-12-14 15:07:24 +00:00
Jorim Jaggi
349f7886fb Merge changes from topic "lock_free_win"
* changes:
  Fix minor issues with new window animations.
  Fix possible race conditions when cancelling animations
  Lock free animations (2/2)
2017-12-14 13:36:27 +00:00
arangelov
08841efcdf Add profile owner transfer functionality.
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.TransferProfileOwnerTest
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Bug: 69542817

Change-Id: I824fcb334e0ca3157fb67920f7583b309a14bf85
2017-12-14 11:46:47 +00:00
TreeHugger Robot
895d73105b Merge "Add more IntDef prefixes for auto-documenting." 2017-12-14 07:17:52 +00:00
Joe Onorato
c9f1a9e3dd Merge "Fix how we build the statsd protos." 2017-12-14 05:33:33 +00:00
TreeHugger Robot
4b1557d3a0 Merge "Give SliceManagerService a concept of pinned slices." 2017-12-14 04:09:55 +00:00
Jeff Sharkey
ce8db99114 Add more IntDef prefixes for auto-documenting.
Test: builds, boots
Bug: 70177949
Exempt-From-Owner-Approval: annotation-only changes
Change-Id: I76dde6054e06f52240bd4b1a0f196dcb74623608
2017-12-13 20:05:36 -07:00
Jorim Jaggi
a5e105728f Lock free animations (2/2)
Second CL that migrates WSA to use SurfaceAnimator

We start our synchronized app transition journey by showing that
the concept works by using WindowState animations as proof of
concept.

The main class in this CL are SurfaceAnimator and
SurfaceAnimatorRunner. When we start an animation on a Window, we
create a new bufferless surface, called "The Leash", in the
hierarchy and attach the surface of WindowState onto it, while
attaching the leash onto the old surface parent which is still
responsible for z-layering.

Then, we pass off the Leash into SurfaceAnimationRunner, which then
changes the surface properties of Leash in every animation frame,
without holding the WM lock. While it's doing that we can still
update the z-layering of the window, or even relayout the window
of needed - the important surfaces for this are still under WM's
control.

In case the animation is finished the window surface gets
reparented to its original parent, and the leash is abandoned.
Note that the reparenting is done in the same transaction as
processing the animation finish, such that we don't end up with
a flicker in case of a disappearing animation, where the window
surface gets destroyed.

In case the animation needs to be cancelled, WM can revoke control
of the leash by reparenting the window surface. Even if the
cancellation signal is heavily delayed, WM immediately regains
control over the surface by reparenting it within a transaction.

We also introduce the concept of animating a WindowContainer. We
clean up isAnimating:
- isLocalAnimating: is the container itself animating
- isAnimating: is the container or one of its parents animating
- isSelfOrChildAnimating: is local animating or any child
animating.

SurfaceAnimationRunner also needs it's own thread so it's not getting
bogged down by any WM lock contention by processing regular
animation frames. We call that thread android.anim.lf (lockfree).

Now, imagine that SurfaceAnimationAnimator would sit behind an IPC in
another process and instead of animating WindowState, we'd animate
AppWindowToken. Then, synchronized app transitions would be done.

Test: go/wm-smoke
Test: SurfaceAnimatorTest
Test: SurfaceAnimationRunnerTest
Test: WindowContainerTests
Bug: 64674361

Change-Id: Idf59daa90361af57fce1128d19a0c0dbf5971d18
2017-12-13 18:42:43 -08:00
Joe Onorato
62c220b20b Fix how we build the statsd protos.
This lets us include frameworks protos, and use the constants
and messages from them.

Change-Id: I609d6e524f780e6a5beea543a68561bede47813e
Test: make
2017-12-13 18:26:45 -08:00
Jason Monk
3706cf9e28 Merge "Add AppComponentFactory API" 2017-12-14 02:21:12 +00:00
Mohammed Khider
1f82396299 Merge "Duty Cycling and Low Power Mode GNSS feature implementations" 2017-12-14 01:16:50 +00:00
TreeHugger Robot
88a149f2f7 Merge changes Iff6557fc,Ie1686e82,I88972653,Iab60b4df,Ie25460e7
* changes:
  Handles failure for transaction queue full
  Reorganize use of error code enums
  Removes setters from NanoAppInstanceInfo
  Renames nanoapp instance IDs to handles in ContextHubService
  Creates a NanoAppStateManager at ContextHubService
2017-12-14 01:00:15 +00:00
TreeHugger Robot
b6c92f00d2 Merge "Refactor PackageParser.collectCerts() to hide signature scheme." 2017-12-14 00:04:18 +00:00
Hugo Benichi
3220790917 Merge "Extend connectivity OWNERS" 2017-12-13 23:36:51 +00:00
Yohei Yukawa
f0bd6d95b5 Merge "SoftInput flag requires focused View to show IME" 2017-12-13 23:36:41 +00:00
Jeff Sharkey
2619e8f011 Merge "Start accepting Executors instead of Handlers." 2017-12-13 22:48:03 +00:00
TreeHugger Robot
d3c1de1aef Merge "Add OWNERS for dreams" 2017-12-13 22:09:55 +00:00
gomo
48f1a64765 Duty Cycling and Low Power Mode GNSS feature implementations
Implementaion of 2 GNSS Android-P features:
- The Duty Cycling API to enable high accuracy applications development
- The Low Power Mode GNSS API to save power when indoor

Bug: 64009176
Test: Existing unit tests still pass.
Change-Id: I3ba3b86a635a54927c694fdd66a038757e843937
2017-12-13 13:38:31 -08:00
TreeHugger Robot
9513cbfa28 Merge "Fix deadlock when fetching active voice interaction service component." 2017-12-13 21:38:14 +00:00
TreeHugger Robot
2cea154e52 Merge "Make DevicePolicyManager.isAffiliatedUser public" 2017-12-13 21:12:32 +00:00
Jeff Sharkey
8439ac08b1 Start accepting Executors instead of Handlers.
After discussion in API council, our new best-practices are to have
developers provide an Executor to dispatch callbacks/listeners on,
instead of the previous guidance of using a Handler.

Define Context.getMainExecutor() to easily obtain an Executor
associated with the main thread of application.  This allows new
APIs to require a @NonNull Executor.  Also define a new
@CallbackExecutor auto-doc annotation that explains background and
points developers at new Context method above.

Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.cts.ContextTest#testMainLooper
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.cts.ContextTest#testMainExecutor
Bug: 70348426
Change-Id: I536892bcd80fcfba1bb1ddf67648c08a26d7ddd2
2017-12-13 13:59:04 -07:00
Jason Monk
a80bfb5d55 Add AppComponentFactory API
API to allow some classloader control over instantiation of
items from application's manifest. Unlike the first attempt
this does not encourage developers to extend Application, it simply
provides a small surface to allow control over the creation of objects
like Activities, Services, Receivers, and Providers.

Test: manual
Bug: 70623879
Change-Id: Idcab7c60f54ce3f4575ac29dcdcae321cf458bf3
2017-12-13 15:36:26 -05:00
Dan Cashman
e92f8428dd Refactor PackageParser.collectCerts() to hide signature scheme.
PackageParser shoudln't really need to know the gory details of APK
verification, it should just get back the blobs it needs to do its
job.  Move the package verification into its own class which is
*almost* exclusively responsible for verifying app signatures. This
is in preparation for adding APK signature scheme v3, which will add
yet another way to do this.

Bug: 64686581
Test: Builds 'n' boots without issue.
Test: android.appsecurity.cts.PkgInstallSignatureVerificationTest passes.
Change-Id: Ieb76b2353bd44ffdb83e7b894e5ad720d1697dc7
2017-12-13 12:20:21 -08:00
Jason Monk
74f5e36f49 Give SliceManagerService a concept of pinned slices.
Allow launcher/assistant to pin slices. Also allow other apps
with access to a slice to pin it dynamically by adding a listener
to it. Dynamic pinnings can expire when the host app dies because
the binder will no longer be alive.

Public docs and unhiding will come in a later CL with CTS tests.

Bug: 68378571
Test: runtest --path frameworks/base/services/tests/uiservicestests
Change-Id: I1dd9a839f547fc949922b766ba4b54e6d50f3125
2017-12-13 14:28:09 -05:00
TreeHugger Robot
2c2ce763b7 Merge "Add an API for setting a new brightness curve." 2017-12-13 19:19:53 +00:00
Winson Chung
bccd4b5b8e Fix deadlock when fetching active voice interaction service component.
- Notify AM whenever the active voice interaction service changes and
  dependency on VoiceInteractionManagerService from AM.

Bug: 70616466
Test: android.server.am.ActivityManagerAssistantStackTests
Change-Id: Ifd3dcbf0b6afc7b3e8a1d9d29bacd5b04af2a15d
2017-12-13 11:08:39 -08:00
Arthur Ishiguro
3504737e46 Removes setters from NanoAppInstanceInfo
Removing these fields since they are not public APIs,
and is not used internally in the service.

Bug: 67734082
Test: None
Change-Id: I8897265365849ab5d0106849e41d16577a91ead9
2017-12-13 10:57:24 -08:00
Arthur Ishiguro
fb9e4c7a7c Creates a NanoAppStateManager at ContextHubService
Created to decouple the internal nanoapp state management at the
service with ContextHubService class

Bug: 67734082
Test: Compile and flash, run CHQTS and verify pass, also verify with
logs that the cache is updated accordingly after load/unload/query
Change-Id: Ie25460e7f8d903cdcb22f0a1c4870bb93ccbad3e
2017-12-13 10:54:04 -08:00
TreeHugger Robot
3176499b0a Merge "Fix identation for switch statement." 2017-12-13 18:51:07 +00:00
Alex Chau
443b6431dd Make DevicePolicyManager.isAffiliatedUser public
- Simplified javadoc on device affiliation concept. "affiliated with the
  device" will be used to describe affiliation with device owner user,
  as defined in #isAffiliatedUser javadoc.
- Link to #isAffiliatedUser whenever device affiliation is mentioned

Bug: 67582080
Test: None
Change-Id: I4395ff980aa1626d6ff352d2f16777887784082c
2017-12-13 17:40:36 +00:00
Jeff Sharkey
6cff5c2840 Merge "API that reports first SDK level of the device." 2017-12-13 16:53:55 +00:00
Tim Volodine
c809542c30 Add WebView Tracing API.
Add classes/interfaces necessary for the support of tracing API
in WebView.

In particular:
- TracingController: singleton class for starting and stopping
  tracing and inspecting tracing status.
- TracingConfig: holds tracing configuration, such as categories
  to filter and the tracing mode.
- TracingOutputStream: interface for capturing tracing data.
- TracingFileOutputStream: supporting class for capturing tracing
  data to a file.

BUG: 63750258
Test: in progress

Change-Id: I7decd486788766fc8dfa766ae027c02f9d4c6f80
2017-12-13 15:27:54 +00:00
Peter Visontay
1195083c0d Log an App Op when an accessibility service is registered.
Bug: 63907873
Test: manually tested that the app op is being logged for TalkBack when it's being registered as an accessibility service.
Change-Id: I10f36a86067950ef57c7afc7bf2f01efff46689c
2017-12-13 14:59:51 +00:00
Robert Berry
67ed8bb785 Merge "Move recoverablekeystore package under services" 2017-12-13 11:32:42 +00:00
Przemyslaw Szczepaniak
161614e12c Merge changes from topic "deprecated_sdk_1"
* changes:
  Reject apks targeting deprecated sdk
  Add Build.Version.MIN_SUPPORTED_TARGET_SDK_INT field.
2017-12-13 10:15:46 +00:00
TreeHugger Robot
25787529b5 Merge "Allow multiple standby buckets to be set in one IPC" 2017-12-13 04:33:39 +00:00
TreeHugger Robot
05e90071ec Merge "Add getDisallowedSystemApps to DevicePolicyManager" 2017-12-13 03:05:23 +00:00
Siarhei Vishniakou
d60090dd4c Fix identation for switch statement.
Presubmit hooks for repo are currently failing
due to the identation of the body of the switch
statement. Fix this spacing issue here.

Test: None
Change-Id: If96914a9f7345212077215502c5bf537f36e695f
2017-12-12 18:17:00 -08:00
Jack He
acfab62830 Merge "Bluetooth: Add convenience method to convert connection state to string" am: f7a69aeeab am: c57c5a9ba4
am: 061bc75d49

Change-Id: I6d8d75fdc686eebda4e0308168b956e1014b02d4
2017-12-13 01:08:26 +00:00
Jack He
061bc75d49 Merge "Bluetooth: Add convenience method to convert connection state to string" am: f7a69aeeab
am: c57c5a9ba4

Change-Id: Id9b238bb2493455650351d595e4c7d2dd5005f2e
2017-12-13 00:45:58 +00:00
Adam Lesinski
6036449709 Merge "OMS: Only allow trusted overlays to be registered." into oc-mr1-dev
am: a06854e77a

Change-Id: I9d4f214b3911fb66fd2baa8ad83e8450246c3c80
2017-12-12 23:36:57 +00:00
Treehugger Robot
f7a69aeeab Merge "Bluetooth: Add convenience method to convert connection state to string" 2017-12-12 22:41:13 +00:00
TreeHugger Robot
a06854e77a Merge "OMS: Only allow trusted overlays to be registered." into oc-mr1-dev 2017-12-12 21:48:11 +00:00
Adrian Roos
ba5aaf1867 Merge "DisplayCutout: Only dispatch to apps requesting it" 2017-12-12 21:15:59 +00:00
Jeff Sharkey
28c660f11a API that reports first SDK level of the device.
This is different from SDK_INT, which can change due to OTA
software updates.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.BuildTest
Bug: 69270887
Change-Id: Ic3f4b22b25dc08f3fbdbdf7622c953323447ea01
2017-12-12 14:11:14 -07:00
Hansong Zhang
57365515d5 Merge "Make BluetoothPbap implement BluetoothProfile (1/3)" am: 5b6b73800c am: 64d81fbf33
am: 9c6044771f

Change-Id: I0390d33d0d56b29e3632a4fe78106fcae4fcfb32
2017-12-12 19:35:42 +00:00
Hansong Zhang
9c6044771f Merge "Make BluetoothPbap implement BluetoothProfile (1/3)" am: 5b6b73800c
am: 64d81fbf33

Change-Id: I1be05324ec0134c801de08e0f60139c341261f33
2017-12-12 19:22:12 +00:00