Commit Graph

2407 Commits

Author SHA1 Message Date
TreeHugger Robot
b5079d1f47 Merge changes I2a808b9f,I8cbd4651
* changes:
  Implements queryNanoApps API
  Implements the new loadNanoApp/unloadNanoApp APIs
2017-12-11 20:44:25 +00:00
Arthur Ishiguro
4493e14984 Implements queryNanoApps API
Bug: 67734082
Test: Run a test app to use the new query API, verify returns the
expected set of nanoapps
Change-Id: I2a808b9f80dd0d9168466f80b79ca1fa35da242c
2017-12-11 10:57:09 -08:00
Tor Norbye
f740c7ea08 Switch @IntDef from long to int, and add @LongDef
This CL mirrors changes made to the android.support.annotation version
of IntDef, to keep the usage and semantics identical (though the
internal version of @IntDef and @LongDef are of course hidden and not
part of the SDK.)

Test: These annotations have source retention and therefore have
no runtime impact; the change was compiling the SDK.

Change-Id: Idaf47e8d983c88be1bd8f938615c86611014b45a
2017-12-08 20:54:50 -08:00
Chien-Yu Chen
2adc8ec68e camera: Update AF scene change key
Update the generated docs.

Test: make
Bug: 64847201
Change-Id: I4737a982afa3b237feaf84ec777716066c870ce0
2017-12-07 14:45:50 -08:00
Kenny Guy
f41ee681ed Merge "Limit access to package names in brightness slider data." 2017-12-06 17:08:59 +00:00
TreeHugger Robot
153daa89e7 Merge "Modifies logs on findNanoAppOnHub" 2017-12-05 23:16:03 +00:00
Chien-Yu Chen
1f272d89e3 Merge "camera: Add AF scene change key" 2017-12-05 22:19:39 +00:00
Arthur Ishiguro
e1ade4368f Implements the new loadNanoApp/unloadNanoApp APIs
Bug: 67734082
Test: Run a test app that uses the new API to load/unload a nanoapp,
verify that the nanoapp loads/unloads successfully
Change-Id: I8cbd46515ad33f7d9a1805dadcf8a99428686aef
2017-12-05 11:52:41 -08:00
Arthur Ishiguro
afe52464a7 Modifies logs on findNanoAppOnHub
Bug: 63174640
Test: Compile only
Change-Id: I8dd06c061409135d9513a9576efa5ccbebda0921
2017-12-05 08:36:19 -08:00
Kenny Guy
29aa30e56c Limit access to package names in brightness slider data.
Only allow access to package names if the calling package
has PACKAGE_USAGE_STATS.

Bug: 69405990
Test: runtest -c com.android.server.display.BrightnessTrackerTest frameworks-services
Change-Id: I1c924d408a7c74620b9aa9d672c99a6424bb85ca
2017-11-30 15:00:38 +00:00
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
Chien-Yu Chen
e8d86eb87b camera: Add AF scene change key
Test: CTS
Bug: 64847201
Change-Id: I61b05cce0137ace9f806f3bbad2a72b158469a34
2017-11-27 16:11:19 -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