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
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
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
Added handling of app query reponse from context hub.
Exposed the maximum message size to clients.
Change-Id: Ie96a860774d005ad6ad72acc88dc79964835486b
Added handling of app query reponse from context hub.
Exposed the maximum message size to clients.
Change-Id: I8d8ecaa2e75f6ef86ee65a3a050538cbbadc32eb
* 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
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
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)
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
Reconnect to camera service if camera service is down when
registering a device availability or torch status listener.
Bug: 22483263
Change-Id: I56868b301151175e18aa1932a8b903e840bcac50
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
- 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
This change fixes a race condition when two SystemSensorManager
instances are initialized the same time.
Bug: 27334914
Change-Id: I7a886abcbff2ed6f8abf87556a78d1a4afb71f91
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
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
- 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
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
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
- 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
Similar to first patch, but now using new "rethrowFromSystemServer()"
method which internally translates DeadObjectException into
DeadSystemException. New logic over in Log.printlns() now
suppresses the DeadSystemException stack traces, since they're
misleading and just added pressure to the precious log buffer space.
Add some extra RuntimeInit checks to suppress logging-about-logging
when the system server is dead.
Bug: 27364859
Change-Id: I05316b3e8e42416b30a56a76c09cd3113a018123
"onSensorChanged" is really misnamed (perhaps we should deprecate
for a better name, but that's beyond the scope of this CL). We
will still call this method with identical sensor values if it
has a newer timestamp. That is different than the
"onAccuracyChanged" behavior.
We expand some of this documentation to clarify this point to users.
Change-Id: I95fa52574ebac3d20a2354b7b6dcf1bdf513448d
Parcelables don't work well with inheritance. So changed the
IRecognitionStatusCallback to have onKeyphraseDetected() and
onGenericSoundTriggerDetected() for those respective events.
Made corresponding changes to AlwaysOnHotwordDetector and SoundTriggerDetector.
Bug: 27250528
Change-Id: Ic08a431e7cc4248c688b05c865348170246de576