Commit Graph

1855 Commits

Author SHA1 Message Date
Keisuke Kuroyanagi
c81b726ed1 Merge "Define equals and hashCode for InputDeviceIdentifier." into nyc-dev 2016-04-19 04:11:16 +00:00
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Keisuke Kuroyanagi
07ff292dcd Define equals and hashCode for InputDeviceIdentifier.
This CL fixes that physical keyboard layout is not changed when user
changes it in settings.  This happened because we compare
InputDeviceIdentifier instances by using Object#equals to choose
specified input device. However, one of them has been serialized and
deserialized, so it never be true.

Bug: 27747115
Change-Id: Ied84c510ccb8e2de919ba8bb326e0355a065e604
2016-04-17 21:43:56 +09:00
Chien-Yu Chen
dfe920d3bb Merge "Camera2: Stop repeating request for abandoned output" into nyc-dev 2016-04-15 23:38:14 +00:00
Chien-Yu Chen
2da496f1ce Camera2: Stop repeating request for abandoned output
Stop repeating request if any of its output stream is abandoned
and notify that repeating request has been stopped.

Update binder tests for binder interface changes.

Update CameraDeviceImpl to expect an exception when canceling
a repeating request that is already stopped.

Bug: 21270879
Change-Id: I9fa72ae7218948aac88cb1a8e57839bd022c4a5e
2016-04-15 16:04:18 -07:00
Jim Miller
cb2ce6f1f0 Fix bug where fingerprint events can be delivered to the wrong client
- Make FingerprintService more closely track the expected state of fingerprintd.
- Don't switch to a new operation until fingerprintd completes previous operation.
- Refactor clients into separate classes and add tracking logic.
- Add missing enumerate()/cancelEnumeration() methods to IFingerprintDaemon
- Make late-binding decision of "foregroundness" of activity so that it's
decided in the order the events are actually handled.
- Add more logging so we can determine FingerprintService state when errors occur.
- Cache a copy of authenticator_id from the last time it was set so we don't
interrupt the driver during actual authentication.
- Don't allow clients to access authenticator_id unless they're current.

Fixes: 27902478, 26273819
Change-Id: Ic1f9e30bd89bcdbb8fe7f69e0545e68339317721
2016-04-14 17:53:45 -07:00
Zhijun He
15aac69c8f Merge "Camera: clarify lens shading map" into nyc-dev 2016-04-14 05:20:45 +00:00
Yin-Chia Yeh
11aade9f6e Merge "Camera: update expectation of post RAW sensitivity control" into nyc-dev 2016-04-13 20:33:48 +00:00
Zhijun He
43210fe2e8 Camera: clarify lens shading map
Lens shading correction should be full correction that
corrects both color shading and vignetting.

Bug: 18175853
Change-Id: Ia552345b2bd78b1b2eed2472096ebae80680d70b
2016-04-12 23:15:23 -07:00
Eino-Ville Talvala
777c4e7644 Merge "Camera/Surface: Update OutputConfiguration API" into nyc-dev 2016-04-13 00:08:09 +00:00
Eino-Ville Talvala
fa5e2a156d Camera/Surface: Update OutputConfiguration API
- Rename "surface set ID" to "surface group ID"
- Remove setSurfaceSetId
- Use constructor overloads to set surface group ID, make
  OutputConfiguration immutable
- Add Surface.getConsumerDescriptor to make it possible to verify
  if two Surfaces have the same backing consumer
- Cache initial surface generation ID in OutputConfiguration so that
  changes in a Surface's internals will label it is as a
  new output
- Add sample use case for surface group IDs

Bug: 27950763
Bug: 28076469
Change-Id: I13251d1dd3d26a978ffbedc519966524e93bc61c
2016-04-12 14:51:17 -07:00
Yin-Chia Yeh
33052d3359 Camera: update expectation of post RAW sensitivity control
Codegen update.

Bug: 27950762
Change-Id: Icff6086c8bb3961247e876d9caae45b95d31cbf8
2016-04-11 17:45:14 -07:00
Greg Kaiser
7c0393abdf Merge "NanoApp: Make indentation consistent" into nyc-dev 2016-04-11 21:21:37 +00:00
Greg Kaiser
1f3560e75e NanoApp: Make indentation consistent
Four spaces is our style standard.

Change-Id: I94f4493268e29b7de5d4fc0f5ef98637997b3957
2016-04-11 12:49:21 -07:00
Greg Kaiser
f4d380537a Merge "ContextHubManager: Avoid bad NanoApp objects" into nyc-dev 2016-04-11 17:23:48 +00:00
Chris Thornton
9e928c1f71 Merge "Support multiple Enrollment APKs" into nyc-dev 2016-04-11 16:40:43 +00:00
Greg Kaiser
cb83bd04b7 ContextHubManager: Avoid bad NanoApp objects
We provide a preferred constructor for the user which will
always generate a serializable NanoApp object.  While we
still support the other path, we throw a specific exception
when trying to serialize a bad NanoApp object to ease
debugging.

Change-Id: I7ee610f0fce2f0dd489526e4819f66035281024b
2016-04-11 08:27:10 -07:00
Zhijun He
b0fe2a9637 Merge "Camera2: update API per API council review" into nyc-dev 2016-04-08 23:30:41 +00:00
Zhijun He
0034743236 Camera2: update API per API council review
Per API concil recommendation, made below API change:
* change method name from createCaptureSessionByOutputConfiguration to
createCaptureSessionByOutputConfigurations
* Change method name from
createReprocessableCaptureSessionWithConfigurations to
createReprocessableCaptureSessionByConfigurations

Bug: 27950067
Change-Id: I8346d384210556a40bc2544c3660cc4819f304a1
2016-04-08 23:21:06 +00:00
Ricky Wai
f86f986728 Delete all work fingerprints when unified lock changes to None/Swipe
Bug: 27551139
Change-Id: Ida398a922d9c42e65001b0a10e13552505824d2d
2016-04-07 15:40:54 +00:00
Ashutosh Joshi
7d4a7fa333 Merge "Add dumpsys capabilities for context hub service" into nyc-dev 2016-04-07 14:00:49 +00:00
Ashutosh Joshi
6239cc6fe1 Add dumpsys capabilities for context hub service
Add useful debug hook for context hub service.
Fix constants
Use helper functions to address OS

Change-Id: Iba5f24a9a1fd809c3d83752953389d373ff334ca
2016-04-06 21:21:34 -07:00
Chris Thornton
1cba0696bd Support multiple Enrollment APKs
Previously, the KeyphraseEnrollmentInfo would iterate through the list
of Enrollment APKs and just use the first one for a list of supported
keywords (of which there only could be one). Now, all APKs will be
enumerated and the enrollment APK that provides the given
keyphrase/locale will be used for the enrollment intent.

Change-Id: I78b0ef758c6c024b5787603bba5907a646f3c3f1
2016-04-06 20:41:26 -07:00
Andrii Kulian
48143f7ec5 Merge "Caps Lock toggle with Meta + Alt (2/2)" into nyc-dev 2016-04-07 01:43:03 +00:00
Andrii Kulian
112d05678b Caps Lock toggle with Meta + Alt (2/2)
Caps Lock implementation in frameworks/base

Bug: 27482276
Change-Id: Ie0d8145c049197d4591e012832a710e4f751d2ac
2016-04-06 12:36:33 -07:00
Eino-Ville Talvala
255490c33c Merge "Camera: Null check remote binder interface" into nyc-dev 2016-04-06 01:19:13 +00:00
Eino-Ville Talvala
0305624f3d Camera: Null check remote binder interface
For LEGACY mode, there's no remote binder, so need to null check for
that case.

Bug: 28000512
Change-Id: I31035f16fd32875d0bd84ca801927498e86133b3
2016-04-05 18:12:11 -07:00
Eino-Ville Talvala
2a6f476836 Merge "Camera2: Unlink camera device death listener on disconnect" into nyc-dev 2016-04-05 23:07:43 +00:00
Ashutosh Joshi
b4cc448946 Merge "App upload to Context hub." into nyc-dev 2016-04-05 01:32:59 +00:00
Ashutosh Joshi
cafdee9a72 App upload to Context hub.
Fix constants
Use helper functions to address OS

Change-Id: I61bd1f3eff2716ead2771eda335998f2e9b73afc
2016-04-04 16:50:27 -07:00
Eino-Ville Talvala
68a5811711 Merge "Camera: Allow preview operation of SCENE_MODE_HDR" into nyc-dev 2016-04-04 19:38:53 +00:00
Eino-Ville Talvala
ecfbb0a1bb Merge "Camera: Add proper buffer drop errors to LEGACY mode" into nyc-dev 2016-04-04 19:38:10 +00:00
Eino-Ville Talvala
ee46b5831c Camera2: Unlink camera device death listener on disconnect
Not removing the listener causes warning logging, which is especially
heavy when a lot of camera connect/disconnects are happening.

Bug: 27217534
Fixes: 28000512
Change-Id: I4911f27cc0f69301975b110a9b456977050ce5bc
2016-04-04 12:30:44 -07:00
Eino-Ville Talvala
c7c569d5e4 Camera: Allow preview operation of SCENE_MODE_HDR
Some devices support HDR output for preview in addition to still
capture, so explicitly allow for that in the documentation of
SCENE_MODE_HDR.

Bug: 27313038
Change-Id: I894d7449dc0cfb7353f535db23acd12143590208
2016-04-04 10:48:38 -07:00
Eino-Ville Talvala
385f9e2146 Camera: Add proper buffer drop errors to LEGACY mode
The correct stream ID is required to be sent along with buffer drop
errors, and LEGACY mode was putting in a placeholder.  This would
cause an error in the client-side implementation, triggered by
abortBuffers (Which is the only source of buffer drops from LEGACY).

Bug: 27828602
Change-Id: If3fba7a76f7aa0ff305efa4cce6c225eb720b30e
2016-04-04 10:28:20 -07:00
Ashutosh Joshi
b741e3b374 Added handling apps query response from context hub
Added handling of app query reponse from context hub.
Exposed the maximum message size to clients.

Change-Id: Ie96a860774d005ad6ad72acc88dc79964835486b
2016-04-01 20:10:27 -07:00
Ashutosh Joshi
2c697fb4a8 Revert "Added handling apps query response from context hub"
This reverts commit adf75e31f5.

Change-Id: I8391eb57c3a53e686bd817d27860fa6f785113f1
2016-04-01 20:49:28 +00:00
Ashutosh Joshi
adf75e31f5 Added handling apps query response from context hub
Added handling of app query reponse from context hub.
Exposed the maximum message size to clients.

Change-Id: I8d8ecaa2e75f6ef86ee65a3a050538cbbadc32eb
2016-04-01 17:57:35 +00:00
Peng Xu
fb1c94133b Fix a few known issue in sensor framework
* Resolve issues pointed out by API Consul:
      . Privacy concern about sensor UUID
      . Callback name consistency,
      . A few document error and typo.
  * New API to tell app if the sensor system support dynamic sensor
    discovery.
  * Added API to make dynamically connected sensor directly
    identifiable.
  * Explicitly indicate sensor additional information support for a
    sensor

Bugs:
b/27715564
b/27911274

Change-Id: Ie93ab4c07fea82002f3f107b7c35827a088312be
2016-03-30 18:49:40 -07:00
Peng Xu
50c52c0b34 Merge "Several code quality improvements" into nyc-dev 2016-03-30 18:04:12 +00:00
Peng Xu
4a4baef431 Several code quality improvements
* Added GuardedBy annotation.
* Fix a misleading variable name.
* Use anonymous namespace to reduce namespace pollution.

Change-Id: Ieffbb8dfd6abbb24b705445659fb96f7ce861592
2016-03-29 23:23:11 -07:00
Eino-Ville Talvala
6c91e2c31b Camera: Add bandaid for preview orientation on reverse-landscape cameras
Camera sensors on Android may be either landscape or reverse-landscape
oriented, but the vast majority of shipping devices only use landscape.

This means that many camera-using apps (which are generally forcing
themselves to landscape orientation) never call setDisplayOrientation,
since its default value of 0 is correct for the majority of devices.

However, there are some reverse-landscape devices, and for those, such
apps get upside-down preview.

This bandaid changes the default value of displayOrientation to be 180
on such devices, so that apps that never call setDisplayOrientation get
correct preview.  This bandaid has no effect on apps that do call
setDisplayOrientation, so hopefully such apps are doing the math
correctly.

Also update documentation to indicate that setDisplayOrientation should
be called, and to note the change in default orientation behavior in
Android N.

Change-Id: I1b2c957642fda8edead61bd07eda9d18c38d1fe6
Fixes: 27840948
2016-03-25 12:29:44 -07:00
Peng Xu
370985d00a [Sensor] Add a constant to match native header
This CL add private sensor type base constant to java file to match
C header file.

It is defined that all vendor sensor types have to be >= 0x10000.
There is a constant in sensor.h for reference. However, there is
no such constant defined in Sensor.java before. This CL adds it.

Change-Id: Ia8f8c06583c62879e51779815051c346f1a9cd14
(cherry picked from commit 1795e14dab)
2016-03-23 17:51:02 +00:00
Daichi Hirono
fe39386a96 Merge "Add USB_HOST_CONNECTED extra to ACTION_USB_STATE sticky intent." into nyc-dev 2016-03-22 01:21:13 +00:00
Greg Kaiser
6ba60e6049 ContextHubManager: Rename Callback class.
Since this Callback class is scoped within ContextHubManager, we
remove the redundant ContextHub from the name.  This CL is just
a rename and should not modify any behavior.

Change-Id: I40fea3ab7b5312d32a6f22b7543669ed563b9992
2016-03-18 10:29:29 -07:00
Chien-Yu Chen
9d78716131 Merge "Camera2: Reconnect camera service for listeners" into nyc-dev 2016-03-17 23:37:14 +00:00
Chien-Yu Chen
0ac408ef43 Camera2: Reconnect camera service for listeners
Reconnect to camera service if camera service is down when
registering a device availability or torch status listener.

Bug: 22483263
Change-Id: I56868b301151175e18aa1932a8b903e840bcac50
2016-03-17 10:51:25 -07:00
Daichi Hirono
618fa6ffc1 Add USB_HOST_CONNECTED extra to ACTION_USB_STATE sticky intent.
Previously UsbModeChooser activity is automatically closed when Android
is connected to another Android and works as host. This is because
ACTION_USB_STATE intent does not include the information whether Android
is connected as host and UsbModeChooser regards Android is not connected
USB devices.

The CL introduce the HOST_CONNECTED extra to ACTION_USB_STATE so that
UsbModeChooser can refer it.

BUG=27535640

Change-Id: Ie29583b78319078430f6d9a8390787780410ac8c
2016-03-17 14:14:32 +09:00
Eino-Ville Talvala
61adad884b Merge "Adjust graphics dataspace references to new standard" into nyc-dev 2016-03-16 22:49:37 +00:00
Daniel Estrada Alva
5e19f91585 Merge "Update ContextHubManager's System APIs." into nyc-dev 2016-03-16 21:49:12 +00:00