Commit Graph

2396 Commits

Author SHA1 Message Date
Arthur Ishiguro
893832bd38 Merge changes Ibf8cd200,I4ea2f293,I17b545da,Ia139fd6d,I3a7e69f8
* changes:
  Handles load and unload lifecycle callbacks
  Handles hub reset at ContextHubClientManager
  Converts old API message clients to the new API format
  Implements client close and death notification
  Creates framework for new API messaging
2017-11-29 21:00:54 +00:00
Arthur Ishiguro
49e030fbd2 Implements client close and death notification
Bug: 67734082
Test: make from root
Change-Id: Ia139fd6d4bb04c569a9ee3672e21e2700daa40a9
2017-11-29 10:35:31 -08:00
Arthur Ishiguro
4e39aa1e19 Creates framework for new API messaging
- Creates IContextHubClientCallback as a proxy to invoke
messaging/life-cycle callbacks for the client.
- Creates IContextHubClient as a proxy to send messages at the client
side.
- Creates a ContextHubClientManager at the service to manage
clients and messaging/lifecycle event callbacks.
- Implements generation of clients at ContextHubManager and sending
messages through ContextHubClient

Bug: 67734082
Test: make from root
Change-Id: I3a7e69f89cd70ea59160a651dcdb729e18027e9f
2017-11-29 10:35:30 -08:00
Adrian Roos
e99bc0501a WM: Move WindowManagerPolicy, DisplayFrames and WindowManagerInternal into services
Splits WindowManagerPolicy into a framework and a services part, preventing concepts that are
internal to the window manager from leaking out into the framework.

Test: make droid
Change-Id: I7b6a54f55f76f6fbb5f27090981b8f1d4d8be88b
2017-11-23 17:23:26 +01:00
TreeHugger Robot
e19dc30bd3 Merge "Check camera permissions for any devices using the VIDEO class" 2017-11-22 12:50:19 +00:00
Kenny Guy
e9a4b16ea1 Merge "Daily idle job for writing out brightness events." 2017-11-21 17:57:39 +00:00
Kenny Guy
cfe7b70e99 Daily idle job for writing out brightness events.
Schedule a job for idle + charging to kick off
writing out brighness slider events.
While writing events discard ones outside our
time window.

Bug: 69405990
Test: Manual using adb to kick off job.
Test: runtest -c com.android.server.display.BrightnessTrackerTest frameworks-services
Change-Id: Ibc79d1c80ced26827d6f985bc70ae165df106a42
2017-11-21 14:44:26 +00:00
Arthur Ishiguro
3fbc4f3845 Merge changes Id0ece760,I160b5a62,I8b7563d0
* changes:
  Creates utility functions to convert between messages
  Removes setters from ContextHubInfo
  Replace JNI code with Java HIDL at ContextHubService
2017-11-20 19:25:18 +00:00
TreeHugger Robot
a14a9d46c3 Merge "Revert "Revert "Implement front-end APIs for generic vendor-specific parameters.""" 2017-11-20 18:28:36 +00:00
Arthur Ishiguro
6cc8d47c9c Removes setters from ContextHubInfo
No longer needed after JNI code is removed.

Bug: 66965339
Test: Compile only
Change-Id: I160b5a621fd15dd8509ce779d5ff9b98c6395c94
2017-11-20 08:59:59 -08:00
Tomasz Wasilczyk
8e932c61db Revert "Revert "Implement front-end APIs for generic vendor-specific parameters.""
This reverts commit 3ccddd6747.

Change-Id: I2fefc0f128cc6f50ce51cbb2d689d931e7d34cf2
2017-11-17 16:18:40 +00:00
TreeHugger Robot
0f11fd496d Merge "Adds CHRE platform ID to ContextHubInfo" 2017-11-17 05:07:54 +00:00
Arthur Ishiguro
27155bc799 Adds CHRE platform ID to ContextHubInfo
Adds a parameterized constructor and the platform ID to the
ContextHubInfo.

Bug: 67734082
Test: make update-api && make from root
Change-Id: I98822f625c5173cdbd281b24550de434b67b18d3
2017-11-16 18:51:00 -08:00
TreeHugger Robot
cd8d0c07e7 Merge "Revert "Implement front-end APIs for generic vendor-specific parameters."" 2017-11-17 02:13:07 +00:00
Tomasz Wasilczyk
3ccddd6747 Revert "Implement front-end APIs for generic vendor-specific parameters."
This reverts commit 7c22694dc2.

Change-Id: I311166b4cfb55ea032c89a5a7ce49eeaeb02338e
2017-11-17 00:21:21 +00:00
Tomasz Wasilczyk
c99d6c1908 Merge "Implement front-end APIs for generic vendor-specific parameters." 2017-11-16 20:43:43 +00:00
TreeHugger Robot
902cb0b68b Merge "Camera2: Update generated docs to latest version" 2017-11-16 18:29:52 +00:00
Emilian Peev
c8ed5ecdc4 Check camera permissions for any devices using the VIDEO class
Any USB devices that are of class VIDEO or have similar
interfaces should check whether the calling client has
camera permissions before granting access to the device.
The above restriction will apply for any packages that
target P or above.

Bug: 27367690
Test: Manual using 3-rd party USB webcam applications.
Change-Id: I7b4f808d344cae33fde93e6d81c7cceed523e24a
2017-11-16 09:00:00 +00:00
Eino-Ville Talvala
9dc7ec1f54 Camera2: Update generated docs to latest version
- Move camera reference doc images to /reference/images
- Minor formatting changes due to merging SDK/NDK metadata definitions
- Minor wording changes for the same

Bug: 69175492
Bug: 29102963
Bug: 33262893
Test: Build and manual inspection of generated docs diff
Change-Id: Ieaf0c1943eba378cc94a22d184734602c40e25e7
2017-11-15 13:30:21 -08:00
Tomasz Wasilczyk
7c22694dc2 Implement front-end APIs for generic vendor-specific parameters.
Bug: 65862441
Test: instrumentalization
Change-Id: Ieec0431c9d851de3215c4cf8eb84581db7e001bc
2017-11-15 08:54:09 -08:00
Kenny Guy
a2dfa95e75 Merge "New class to track brightness slider interactions." 2017-11-14 15:26:03 +00:00
TreeHugger Robot
da701967e8 Merge "Camera: Enable API for dynamic camera output surfaces" 2017-11-14 14:08:44 +00:00
Kenny Guy
22bd044b0c New class to track brightness slider interactions.
Provides system apps with access to the users
brightness slider interactions and context from
when the brightness level was changed.

Test: runtest -c com.android.server.display.BrightnessTrackerTest frameworks-services

Change-Id: Ibdb3c78cb1d11887cb38b24c30754ff2e6f3bda8
2017-11-13 21:52:48 +00:00
Emilian Peev
032331578c Camera: Enable API for dynamic camera output surfaces
Two new methods within camera capture session will allow clients to
attach and remove shared output surfaces to a live camera session
dynamically.

Test: Camera CTS
Bug: 63912484
Change-Id: I291fc2b558fc62f7dc8072e57f5ff831d46e765c
2017-11-10 12:49:06 +00:00
Philip P. Moltmann
5a633c6e4d Don't show "always use" when app can't be default
Each USB device can have one default handler. This app is launched when
the device is plugged in. A default handler automatically gets
permission to access the device when launched.

All other apps have to request the permission to access the USB device
via UsbManager.requestPermission. In the permission dialog there is an
option to make the app the default app for the device. Of course this
only makes sense if this app declares the right properties to be
auto-launched. Hence check this and only then show this options.

Also made the string in the dialogs easier to understand.

AccessoryFilter and DeviceFilter needed to be copied so I can access
them from system-ui. No code change in these classes.

Test: requested permissions from app that could by the default for the
      device and from an app that could not. Also tested "confirm" flow
      that is executed when the device is plugged in and a app that
      might be default is installed.
Bug: 67381583
Change-Id: I12eb7efed0ad107c70ae32433a5629108f252486
2017-11-09 16:58:20 -08:00
TreeHugger Robot
f9ba65ac52 Merge "Switch display control betw. Android and Sidekick" 2017-11-03 21:49:54 +00:00
Chris Phoenix
bc839a3957 Switch display control betw. Android and Sidekick
Test: builds; Sidekick animates watch faces
Change-Id: I6ef1e91ed33b1790eed9a7b9af9bc6b6441c7de9
(cherry picked from commit 40f6f257f537b270be06a09a959202260cb53267)
2017-11-03 16:27:29 +00:00
Arthur Ishiguro
0d719c2af9 Expose headerless binary and flags in NanoAppBinary
Needed at the service when creating the app binary object to send to the
Context Hub.

Bug: 67734082
Test: Make from root
Change-Id: I4395fb1229fe384ffd5b2f7c3ba49152584a753d
2017-11-02 10:46:22 -07:00
Arthur Ishiguro
6c37fd0f53 Sets up ContextHub service/manager interface for transactions
Creates a IContextHubTransactionCallback, a callback that can be invoked
at the service as a proxy after completion of each transaction. The
ContextHubManager generates the callback for every transaction, and
passes it down to the service. This removes the need for the transaction
ID to be tracked at the client application side.

Bug: 67734082
Test: Make from root
Change-Id: I89a77a308671e7a84e50b27eb9c4de012dedc310
2017-11-02 10:46:22 -07:00
Andrew Solovay
4f3fdf5ff1 Merge "docs: Clarify wording on two Javadoc entries" into oc-mr1-dev am: b1748f87b1
am: 152be97c2e

Change-Id: I1bde702c235218e35e0592aedb7491f1a2ff2582
2017-10-30 18:41:58 +00:00
Andrew Solovay
152be97c2e Merge "docs: Clarify wording on two Javadoc entries" into oc-mr1-dev
am: b1748f87b1

Change-Id: I2336a38fb00f2c53406718e4e3a47f989ed1c094
2017-10-30 18:15:21 +00:00
Andrew Solovay
6534291811 docs: Clarify wording on two Javadoc entries
Per feedback from dmail@, rephrased to clarify that the intent is
fired at the time when a USB device/accessory is attached, not a
general "a USB device happens to be attached now" notification.

Staged to:

http://go/dac-stage/reference/android/hardware/usb/UsbManager.html

Bug: 36672976
Test: make ds-docs
Change-Id: I9f1c202d0a6a6a5b25cf775e2b11119a26625bf1
2017-10-27 18:55:21 -07:00
Arthur Ishiguro
b9ae7bd838 Creates framework for new ContextHubService APIs
Part of the redesign for P, designed to support multiple clients and
easier usage.

Bug: 67734082
Test: make from root

Change-Id: I1e12a0484350fabfc13af32269961ad0fc69f9b1
2017-10-26 18:47:47 -07:00
Andrew Solovay
0e0621a46b Merge "docs: Correct labeling for two USB events" into oc-mr1-dev am: b13dc50d12
am: cf973cdd89

Change-Id: Icfe783e569feef6269327b931296dc86f91e8ccd
2017-10-25 00:23:33 +00:00
Andrew Solovay
cf973cdd89 Merge "docs: Correct labeling for two USB events" into oc-mr1-dev
am: b13dc50d12

Change-Id: Ia5b3c5dcb1b2e72f275f12d05fb390699c6831ba
2017-10-25 00:08:09 +00:00
Andrew Solovay
65fc7f57ac docs: Correct labeling for two USB events
Per bug, these were mislabeled as broadcast actions, when they're
actually activity intents. This has consequences post-O, since
broadcast actions are now subject to limitations.

Doc is staged to:

http://go/dac-stage/reference/android/hardware/usb/UsbManager.html

Bug: 36672976
Test: make ds-docs
Change-Id: I2b515b1ac152de389f952af21166ed2ba7843044
2017-10-24 11:20:38 -07:00
rongliu
cabbceee5f Merge "Add comment about flag VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL as recommended." into oc-mr1-dev am: bf070a35cd
am: d6230d3d2a

Change-Id: I914a2a44a0828a6201af79ff467d024bf1460ddd
2017-10-06 23:51:49 +00:00
rongliu
d6230d3d2a Merge "Add comment about flag VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL as recommended." into oc-mr1-dev
am: bf070a35cd

Change-Id: I88f24ed82459b4cbc03c92a96774636a47509715
2017-10-06 23:42:27 +00:00
rongliu
3e9f972fde Add comment about flag VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL
as recommended.

Change-Id: I3778eed6f91e3ebf70683f40389c605648444b99
Bug: 67420451
Test: Only add comment.
2017-10-06 11:20:51 -07:00
rongliu
6400a40b34 Merge "Add a flag to virtual display to indicates that content on this display need to be destroyed once the display is removed. Then apply this flag to VR virtual display." into oc-mr1-dev am: 27378c64c7
am: 25b1093844

Change-Id: I0e2a64a72a9bbc14a1e8ef3a8b217d71b5eafb37
2017-10-06 15:12:11 +00:00
rongliu
25b1093844 Merge "Add a flag to virtual display to indicates that content on this display need to be destroyed once the display is removed. Then apply this flag to VR virtual display." into oc-mr1-dev
am: 27378c64c7

Change-Id: I45b685d99da325c627bf3f01b9038ddf81c781a1
2017-10-06 14:57:36 +00:00
rongliu
1e90fc38db Add a flag to virtual display to indicates that content on this
display need to be destroyed once the display is removed.
Then apply this flag to VR virtual display.

Change-Id: Icb5aa1280b6ebac5941afda1cc1b94b258ce44f4
Bug: 67420451
Test: Manually. "adb shell am stack list" does not show contents
from virtual display anymore after it's released.
2017-10-04 17:50:23 -07:00
Peng Xu
00ae599474 Merge changes from topic "equalizer_1" am: 1ba697e29b am: 46f2249f46 am: 01ad27a0eb
am: b855edc41f

Change-Id: I499360f6cb7ecdf5c8580faf066c9ac0c0aea59a
2017-09-26 12:49:03 +00:00
Peng Xu
b855edc41f Merge changes from topic "equalizer_1" am: 1ba697e29b am: 46f2249f46
am: 01ad27a0eb

Change-Id: Ie717da6b0e336701bdacc2949877bc0c1d71cb58
2017-09-26 12:38:01 +00:00
Peng Xu
46f2249f46 Merge changes from topic "equalizer_1"
am: 1ba697e29b

Change-Id: I0b5dabe42c0ab59fab63ea653392dd4d99b7d967
2017-09-26 11:07:28 +00:00
Peng Xu
62f2c87ee3 Fixing code formatting to comform to checkstyle
Fix following types of issue
  * over 100 char/line
  * missing space
  * trailing spaces
  * array bracket position
  * variable naming convention (some cases)
  * indentation
  * long expression wrapping operator position
  * missing curly brace for one line scope
  * function modifier order

Things not changed in this CL:
  * Redundant public modifiers.
  * A few local variable names.
  * Suggested @deprecate but function is actually @removed.

Test: m and m docs
Change-Id: I5c22648888487edaa5954026a166cfd810a8a912
2017-09-22 16:58:14 -07:00
Eino-Ville Talvala
8f7e9ab891 Merge "Camera: Add more documentation about thrown exceptions." into oc-mr1-dev am: a120e6b604
am: 5c8027a159

Change-Id: Ideb508436828aff5667777a526aeef4da1d51fab
2017-09-21 21:57:48 +00:00
TreeHugger Robot
a120e6b604 Merge "Camera: Add more documentation about thrown exceptions." into oc-mr1-dev 2017-09-21 19:50:33 +00:00
Peng Xu
9ee042efa8 Update Java doc of SensorManager.createDirectChannel
Java doc was left out when addressing API reviewer comments.
This CL fix the discrepancy between the actual logic and java doc.

Bug: 36550285
Test: compiles
Change-Id: I6406892ecdcc5d02f11966fa3fb0b81ed8d3b285
Merged-In: I6406892ecdcc5d02f11966fa3fb0b81ed8d3b285
2017-09-20 17:03:27 -07:00
Alexey Polyudov
29ad6b3960 sensors: pass sensor handle along with injected event
Change-Id: I5e8eacfa940c082a14a9876f455c55b84b975086
Merged-In: I5e8eacfa940c082a14a9876f455c55b84b975086
2017-09-20 11:13:51 -07:00