Commit Graph

2069 Commits

Author SHA1 Message Date
Nick Vaccaro
710a285110 Merge "Sensors: Add LOW_LATENCY_OFFBODY_DETECT sensor API" 2017-02-14 19:21:37 +00:00
Shuzhen Wang
7d0674ceb1 Camera: Update doc to allow unchanged configs in finalizeOutputConfigs
Bug: 35137641
Test: Compile
Change-Id: I671fc13c005eee27c87041dce23c30f40a394443
2017-02-13 14:55:34 -08:00
Shuzhen Wang
476bea8495 Revert "Camera2: Temporarily remove surface size 0 check"
This reverts commit bdabb0f582.
Bug: 35027811
Test: Use camera from hangouts
2017-02-09 13:13:04 -08:00
TreeHugger Robot
f69ffd24b8 Merge "Fingerprint: get auth id for non-current user." 2017-02-07 00:58:17 +00:00
Shuzhen Wang
af4c6ac32f Merge "Camera2: Temporarily remove surface size 0 check" 2017-02-06 22:06:22 +00:00
Shuzhen Wang
bdabb0f582 Camera2: Temporarily remove surface size 0 check
Temporarily remove surface size 0 check for deferred surface.

Test: Manual test of camera use case from Hangouts
Bug: 35027811
Change-Id: If1ecb1b322b9608dafb5784d5d9fb83e3517b8e5
2017-02-06 11:51:25 -08:00
Justin Klaassen
5483cea67a Remove experimental twilight-based automatic brightness
Bug: 31602449
Test: verified adaptive brightness no longer varies with twilight with
"brightness_use_twilight" set to "1".

Change-Id: I6b5f7310020b2128c2b292414a205b6052270a0a
2017-02-06 07:36:55 -08:00
Charles He
da88f0e6b8 Fingerprint: get auth id for non-current user.
Previously, getAuthenticatorId() simply returns the authenticator id
corresponding to the currently active user in FingerprintService.
However, this can cause bugs when, for example, KeyStore calls the
method before storing a fingerprint-bound key for a non-current user. In
such cases, the authenticator id of the calling user is desired, which
is not necessarily the same as the "current user" in FingerprintService.
This CL ensures the FingerprintService always returns the authenticator
id of the calling user.

Bug: 33459191
Test: manual
Change-Id: I35c5a3a7082cffb8941eeaa219c8e20948ad41a9
2017-02-04 06:49:08 +00:00
TreeHugger Robot
9f864522af Merge "Camera2: Check for valid GPS timestamp before usage" 2017-02-01 08:18:07 +00:00
Phil Weaver
7da087d87d Merge "Accessibility can capture fingerprint gestures" 2017-02-01 02:01:44 +00:00
Shuzhen Wang
f02913c4ea Camera: Fix the document on createCaptureSession error
When createCaptureSessionByOutputConfigurations fails, it doesn't throw
an exception. Instead, onConfigureFailed will be called.

Test: Compiles
Bug: 33777818
Change-Id: Ia0e139265bee0eda2118f903a6b46358a14c672c
2017-01-31 15:39:17 -08:00
Phil Weaver
27fcd9c97a Accessibility can capture fingerprint gestures
Bug: 27148522
Test: Unit tests for two new classes in this CL, CTS in
linked CL.
Change-Id: Icb5113e00b1f8724814263b3cc7f72fe4a6f0b41
2017-01-31 14:27:09 -08:00
Emilian Peev
d008479920 Camera2: Check for valid GPS timestamp before usage
CaptureResult.JPEG_GPS_TIMESTAMP' queries can
 return null Long objects. The conversion to
 seconds should happen only in cases where we have
 non-null objects.

BUG: 34835263
Change-Id: I1251fad55b2a671928839725123adedfb12fe53a
2017-01-31 15:29:20 +00:00
Shuzhen Wang
21d63b2836 Camera2: Do not throw exception if addSurface size doesn't match
During addSurface, the surface size may not match the preconfigured
size, because the surface could be asynchronously changing its size.
Only log a warning in this case, and depend on native implementation
of createCaptureSession or finalizeOutputConfigurations to detect the
size mismatch.

This also reverts commit e56e606f82,
and enforce the surfaceSize for deferred OutputConfiguration is not
0.

Test: Camera CTS
Bug: 34737377
Bug: 34697112
Change-Id: I4b66166a9a2739a09a16d635d2599a9bcf5c036b
2017-01-30 14:58:55 -08:00
Andrii Kulian
7211d2eba8 Rename flag that enables showing display content with keyguard
Renamed SHOW_WITH_INSECURE_LOCKSCREEN to CAN_SHOW_WITH_INSECURE_KEYGUARD.

Test: android.server.cts.ActivityManagerDisplayTests
Change-Id: Ie03ee59730a9e9e715b2bad0a14fdd107b8c7c00
2017-01-27 17:27:11 -08:00
TreeHugger Robot
36d32c37a3 Merge "Camera2: Correct EXIF GPS timestamp" 2017-01-27 16:46:50 +00:00
Andrii Kulian
fc8f82bc6b Allow showing content on virtual displays when locked
This adds new flag to virtual display that changes its
behavior when keyguard is shown, but can be dismissed without
entering credentials. This can be applied only to private
virtual displays.

Bug: 34280365
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testVirtualDisplayHidesContentWhenLocked
Test: #testShowWhenLockedVirtualDisplay
Test: #testShowWhenLockedPublicVirtualDisplay
Change-Id: I9c19d36295e62f59bd1db1352af707d54ea51667
2017-01-27 00:14:06 -08:00
Emilian Peev
8f240961cc Camera2: Correct EXIF GPS timestamp
GPS 'Location' expects timestamps in milliseconds
 however the camera metadata uses seconds for it.
 An additional conversion is needed to take care
 of this mismatch.

BUG: 32593275
Change-Id: I636060aac2177ae9818af32d677292f1eb76d97e
2017-01-26 08:39:54 -08:00
TreeHugger Robot
eb30016ad4 Merge "Implement pointer capture API" 2017-01-26 07:22:24 +00:00
Elliot Waite
0ce4b0e4c3 Fix @links in reference docs. am: 54de77470d am: ab978c035e am: 28ba4722a9
am: 9b21265b2c

Change-Id: If246ebdb36cf2832d5a6c42cbe752e290b6fb6e8
2017-01-26 04:49:33 +00:00
Elliot Waite
9b21265b2c Fix @links in reference docs. am: 54de77470d am: ab978c035e
am: 28ba4722a9

Change-Id: I98177a8cf0a20677e140406bb7371474ca259e5b
2017-01-26 04:44:54 +00:00
Elliot Waite
28ba4722a9 Fix @links in reference docs. am: 54de77470d
am: ab978c035e

Change-Id: If0d0613362e0ea95cf48eaf9a16d3eea48b589ea
2017-01-26 04:39:57 +00:00
TreeHugger Robot
b66cfe8a88 Merge "Added support to authentication." 2017-01-26 01:35:39 +00:00
TreeHugger Robot
ef756c3a34 Merge "camera: Add enableZsl key" 2017-01-26 01:23:28 +00:00
Elliot Waite
54de77470d Fix @links in reference docs.
Change-Id: I40cea46efd80c448640ff69753698fe8404da40b
2017-01-25 17:00:55 -08:00
Vladislav Kaznacheev
3787de16d2 Implement pointer capture API
When in pointer capture mode, mouse pointer disappears and
further mouse events are dispatched to the focused view
in the window which has requested capture.

The captured events have the source SOURCE_MOUSE_RELATIVE
belonging to SOURCE_CLASS_TRACKBALL. They are
dispatched through dispatchCapturedPointerEvent /
onCapturedPointerEvent. There is also a new listener.

Pointer capture mode may only be granted to a currently
focused window, and will be canceled upon a window focus change.

Test: cts-tradefed ... --test android.view.cts.PointerCaptureTest
Bug: 30897034
Change-Id: I6e5934aa415ac2b6dda1cee173d0f23e5021af84
2017-01-25 13:13:45 -08:00
Shuzhen Wang
b44dee8e22 Merge "Camera2: Handle (0, 0) size for deferred OutputConfiguration" 2017-01-25 21:05:45 +00:00
Felipe Leme
436ab6a91d Added support to authentication.
AutoFillService can now require user authentication, both at
FillResponse and Dataset levels;
- FillResponse authentication is typically used when the user data
  need to be unlocked before the first use.
- Dataset authentication is typically used to unlock sensitive data
  such as credit card info.

The authentication can be handled by the service itself (for example,
when it uses the credit card CVV to unlock it) or by the Android
system (when the service asks for fingerprint authentication).

Bug: 31001899

Test: manual verification
Test: CtsAutoFillServiceTestCases passes

Change-Id: If62f42f697ab5ef0d14d991ff1077d1c38808e61
2017-01-25 13:03:32 -08:00
Shuzhen Wang
e56e606f82 Camera2: Handle (0, 0) size for deferred OutputConfiguration
We need to handle below sequence of events:
1. OutputConfiguration(Size(0, 0), klass)
2. addSurface(surface)
3. createCameraCaptureSession

In this case, allow the addSurface() to succeed.

Test: camera works in keep/hangouts/contacts
Bug: 34697112
Change-Id: I726c60cce9a11c69b050aad47f4ed4a0a7a0870e
2017-01-25 12:22:01 -08:00
TreeHugger Robot
d20a0fd3df Merge "Add support for BLOB format to HardwareBuffer." 2017-01-25 17:23:24 +00:00
TreeHugger Robot
b81d978490 Merge changes from topic 'sensor_direct_report'
* changes:
  Sensor event direct report mode implementation
  Sensor event direct report mode support API
2017-01-25 05:08:46 +00:00
Peng Xu
fa2672b71d Sensor event direct report mode implementation
Implementation of sensor direct report API. In this verison, only
ashmem(MemoryFile) backed direct channel is implemented. Support
of HardwareBuffer class will come in a following CL.

Test: tested with demo app
Bug: 30985702
Change-Id: I29cae5cb2615c7a128fe203ed1545c03010ca4aa
2017-01-24 19:18:29 -08:00
Craig Donner
2be5b9f966 Add support for BLOB format to HardwareBuffer.
Test: updated CTS test to check for error conditions if the blob dimensions are
bad.
Bug: 34050596

Change-Id: I3ec6e7a43dae8d0ac2b2d04bc4b38cd3c12f8390
2017-01-24 18:43:30 -08:00
TreeHugger Robot
58ac1310db Merge "Camera2: Combine API for deferred surface and shared surface" 2017-01-25 01:54:24 +00:00
Peng Xu
ccf0c8edea Sensor event direct report mode support API
Add direct report mode support API with stub implementation.

 * new SensorDirectChannel class to represent direct channel and
   hold related constants.
 * new methods in SensorManager to create/destroy direct channel
 * new method in SensorManager to config sensor report in direct
   channel
 * new methods in Sensor to expose direct report related capability
   of sensor.

Test: tested with demo app
Bug: 30985702
Change-Id: Ic03c67bea4ed0a728d3d783e95de6c59cf663cca
2017-01-24 16:54:05 -08:00
Chien-Yu Chen
e449171fc1 camera: Add enableZsl key
Add enableZsl key so the apps can choose to allow or disallow out of
order frame contents and metadata like timestamp.

Test: Camera CTS tests on Marlin
Bug: 30983997
Change-Id: I009c53a2cc63ac74a4467c26aa8de018a3e6b7aa
2017-01-24 16:06:17 -08:00
Badhri Jagan Sridharan
d979398983 Merge "Refactor UsbPortManager to use the binderised USB HAL" 2017-01-24 23:46:25 +00:00
Shuzhen Wang
4bd7abe72a Camera2: Combine API for deferred surface and shared surface
- Unhide API to enable sharing surfaces via OutputConfiguration.
- Combine the APIs for deferred surface and shared surfaces so that
  same functions can be used for both use cases.
  1. setDeferredSurface becomes addSurface.
  2. finishDeferredConfiguration becomes finalizeOutputConfiguration.
- Better documentation on shared surface use cases.

Test: Camera CTS, and preview/video/capture with GCA
Bug: 33777818
Change-Id: I528b221492e07888a2da96658aaf8e7b9c4d1640
2017-01-24 11:05:15 -08:00
Badhri Jagan Sridharan
823287d28e Refactor UsbPortManager to use the binderised USB HAL
Move to a USB HAL to handle type-c ports as upstream is
considering in merging a generic type-c interface to mainline
kernel. However, the new sysfs interface can see minor changes
in the future as the sysfs interface is sitll going to land
in testing and it is still under review.

Bug: 31015010
Test: Manually tested on Angler and sailfish for type-c role switches.
Change-Id: I26771074c4b4f79a133e519bc6d35a4864a696d8
2017-01-23 17:13:15 -08:00
TreeHugger Robot
953038d1ce Merge changes from topic 'anb'
* changes:
  Adding HardwareBuffer, a Java wrapper around AHardwareBuffer.
  AHardwareBuffer implementation.
2017-01-23 19:29:05 +00:00
Craig Donner
1a4d07d919 Adding HardwareBuffer, a Java wrapper around AHardwareBuffer.
Bug: 34050596
Test: new CTS test added in other topic CL; tested with cts-tradefed on Pixel XL
Change-Id: I177107757f917fcab5bc1f1dcdbb5b81a605f777
2017-01-20 18:52:01 -08:00
Andrii Kulian
fb1bf69d5d Set permissions for launching on private displays
- System UIDs must be allowed to launch anything and everywhere.
- Display owner must be allowed to launch activities on it.
- Apps that are already on target display must be allowed to launch
  there.
- All other apps mustn't be allowed to launch on private displays.

Bug: 34230873
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testPermissionLaunchFromSystem
Test: #testPermissionLaunchFromAppOnSecondary
Test: #testPermissionLaunchFromOwner
Test: #testPermissionLaunchFromDifferentApp
Change-Id: Ic98005649a6368370c512e822cba4e9decc18ae9
2017-01-20 15:15:59 -08:00
Peng Xu
d37d431c62 Merge "TYPE_DYNAMIC_SENSOR_META should be wake up sensor" am: cec2ebf676 am: 8cddb920b5 am: 2146f7ef42
am: 467d3b75e8

Change-Id: I4abeafb747d5f0798eec21e6244482ebc94a4c67
2017-01-19 01:36:55 +00:00
Peng Xu
467d3b75e8 Merge "TYPE_DYNAMIC_SENSOR_META should be wake up sensor" am: cec2ebf676 am: 8cddb920b5
am: 2146f7ef42

Change-Id: I0bf7252556efe2dcaa53e36d432c114776085a62
2017-01-19 01:26:48 +00:00
Peng Xu
cec2ebf676 Merge "TYPE_DYNAMIC_SENSOR_META should be wake up sensor" 2017-01-19 01:11:49 +00:00
Nick Vaccaro
6432bf7a4f Sensors: Add LOW_LATENCY_OFFBODY_DETECT sensor API
Test: none
Bug: 34234089
Change-Id: I2121e0e5132034254790ff6d4f9e3c65775a0ed2
2017-01-18 11:53:05 -08:00
TreeHugger Robot
626496effc Merge "Camera2: Add secondary surface to OutputConfiguration" 2017-01-18 01:55:04 +00:00
Shuzhen Wang
9c663d4415 Camera2: Add secondary surface to OutputConfiguration
Test: camera cts, and manually test camera preview/capture/recording.
Bug: 33777818
Change-Id: I853f2f48640e4b1ad20a468c152f7e9b536f7a3b
2017-01-17 16:38:39 -08:00
Jim Miller
40e4645e6e Rewrite FingerprintService to use HIDL 2.1
Bug: 33199080
Test: Fingerprint enroll, remove, unlock, fingerprint arbitration.

Change-Id: I8b98236ba81f053527ee74c8a189af1adfd17d55
2017-01-17 11:45:41 -08:00
Ashutosh Joshi
576ea41d2f Fix documentaiton formatting errors.
i) Fix documentation formatting errors converting a
     major part of the documentation into a link.
ii) Remove the DEVICE_ORIENTATION type documentation. Its
         a hidden sensor type, and links to the sensor fail.

Test: Compile build, generate docs, visually verify change.
Change-Id: I2659d18e35b60f5939ba18c6b3d752a990621447
2017-01-13 17:06:41 -08:00