Commit Graph

1837 Commits

Author SHA1 Message Date
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
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
destradaa
8bad3fec0f Update ContextHubManager's System APIs.
- Consolidates the use of handles in context hub, and nano apps.
- Quick fixes to typos.
- Update the signature to find nano apps to use primitive types

Change-Id: Icffa6fa86e0e33a536516d98bc4674c0a39b2163
2016-03-16 14:05:58 -07:00
Peng Xu
83d0078f95 Merge "Fix NC caused by race condition in SystemSensorManager" into nyc-dev 2016-03-16 19:30:55 +00:00
Peng Xu
aa957274e7 Fix NC caused by race condition in SystemSensorManager
This change fixes a race condition when two SystemSensorManager
instances are initialized the same time.

Bug: 27334914
Change-Id: I7a886abcbff2ed6f8abf87556a78d1a4afb71f91
2016-03-16 17:46:59 +00:00
Peng Xu
9ff7d22354 Exposing Context Hub service.
Adding the Context hub service. This is the service that exposes
the context hub HAL to the system. The API exposed is a System API.

Change-Id: I854141714ecd21f6386e6b15b7bc9a997483ccf6
2016-03-15 15:18:56 -07:00
Eino-Ville Talvala
7966d446cd Adjust graphics dataspace references to new standard
Bug: 27344373
Change-Id: I0ad67868894b01948d40336812d836ee2f3bcfdb
2016-03-14 13:21:03 -07:00
Eino-Ville Talvala
3e0023ae89 Camera2: Add buffer drop error callback
Previously single buffer drop errors were not propagated to
the client application, even though the HAL generated them.

Add new error callback to handle this case.

Bug: 24168122
Change-Id: Ice0d9a3592efed222351353abd7acc35854a20bd
2016-03-10 12:41:24 -08:00
Yin-Chia Yeh
373482009b Camera: codegen update
Add device custom scene mode range.

Bug: 26687007
Change-Id: I4a11e5f0bc5cbaabe85d4f9c6f2904125a038028
2016-03-09 15:01:06 -08:00
Shuzhen Wang
783929368b Camera2: Handle binder death on ICameraDeviceUser
Call onError(CAMERA_SERVICE) when binder death happens on ICameraDeviceUser.

Bug: 27206055
Change-Id: Ic720933d057559966556658d478ff6d3536f0e3f
2016-03-08 15:47:32 -08:00
Chien-Yu Chen
329484bb7e Merge "Camera2 Legacy: Connect to surfaces it produces" into nyc-dev 2016-03-04 21:01:34 +00:00
Eino-Ville Talvala
8069b1f252 DngCreator: Improve BlackLevel, fix thumbnail metadata
- Use new dynamic black level result key when available
 - Write rational black level instead of integral value
 - Fix incorrect thumbnail BitsPerSample metadata
 - Fix incorrect date/time format string
 - Fix unknown orientation

Test: dng_validate for captured DNGs is clean
Bug: 27452979
Bug: 25862995
Change-Id: I87b73f7a4f4ecc3cf6498c7db16df68dd0b0b43a
2016-03-04 11:22:15 -08:00
Chien-Yu Chen
29c3630563 Camera2 Legacy: Connect to surfaces it produces
When legacy camera device is the producer of its output surfaces,
it needs to connect to the surfaces before using the surfaces
and disconnect from the surfaces after finishing using the surfaces.

Bug: 27331537
Bug: 27383242
Change-Id: Ia3e2ca142f7973face0f60fbfc96935054aac1c4
2016-03-03 16:50:35 -08:00
Ryan Bavetta
840c617c38 Merge "Fix soundtrigger test, adds null pointer check" into nyc-dev 2016-03-03 03:46:10 +00:00
Ryan Bavetta
ea04e8fe75 Fix soundtrigger test, adds null pointer check
BUG:27461735
Change-Id: I95ea641e41bcaefce15004f508ddb4bed0b5f2a8
2016-03-03 03:10:40 +00:00
Eino-Ville Talvala
74989b4d3f Merge "Camera2: Switch to auto-gen C++ binder interfaces" into nyc-dev 2016-03-02 21:47:13 +00:00
Greg Kaiser
7d3a9e5259 Merge "SensorEventListener: Clarify documentation." into nyc-dev 2016-03-02 17:27:47 +00:00
Greg Kaiser
fa806c5031 Merge "doc: Fix syntax error in code example." into nyc-dev 2016-03-02 17:26:45 +00:00
Jeff Sharkey
c53962d4ed When system server goes down, crash apps more.
Apps making calls into the system server may end up persisting
internal state or making security decisions based on the perceived
success or failure of a call, or the default values returned.

The reality is that if the system process just died, init will be
along shortly to kill all running apps, so we should have no problem
rethrowing the RemoteException as a RuntimeException.

Bug: 27364859
Change-Id: Ife0bcb079636c88d54c44d17eb580409fd79028b
2016-03-01 19:29:16 -07:00
Eino-Ville Talvala
5d2d7788f1 Camera2: Switch to auto-gen C++ binder interfaces
- Move camera AIDL files to frameworks/av
 - Update makefiles to point to new AIDL locations
 - Adjust camera2 implementation to match modifications to AIDL needed
   for native AIDL auto-generation
 - Move Surface.aidl to frameworks/native to allow use in
   native AIDL. Use android::view::Surface in Surface JNI to
   serialize Surface objects to ensure parceling compatibility.
 - Adjust service binder tests to new interface

Bug: 25091611
Change-Id: I85b817374b34a4540fa145328dbe4bbf7f746baf
2016-03-01 17:15:17 -08:00