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
Ignored! Removed! A non-broadcast!
Any attempt to send these will be silently (except a log)
ignored.
Change-Id: Ia19357d4c90fdcd18e45f2b41c57e654ef94edb1
All depth formats are considered as non-high-res. Also compare depth
minimum frame durations instead of regular minimum frame durations
for depth formats.
Bug: 26687093
Change-Id: I65b691fe450077b0e3ace15f6ac0289b41caf42f
TwilightService:
- Add support for locking on/off twilight globally
- Change twilight state to have float amount rather than
having clients calculate it using the sunrise/set values
- State controlled through secure setting
- Override mode which locks to a state for a couple hours then
resets
- Add broadcast for SysUI to listen to
Brightness/Power:
- Updates to handle TwilightService changes
- Added secure setting to control whether or not to use
twilight when calculating brightness.
Tuner:
- UI Overhall
- NightModeController will set the values of the custom color matrix
taking into account the current twilight service state and any
custom calibration set by the user.
- Probably other stuff.
Change-Id: I213f1f76a143e711c507b2ba7d784f581bfc32b4
It's not a guarantee that onCaptureProgressed happens after
onCaptureStart for a particular request.
Bug: 26676240
Change-Id: I900c3b36e1738dd3514954498023eaa4a1618989
As an exercise for a new API candidate LocaleList class, this CL does a
mechanical refactoring to replace Locale[] with LocaleList in
KeyboardLayout class. Note that what changed in this CL is just an
implementation details that is never exposed to application developers.
One take-away from this exercise is that finding the best-match locale from
an ordered locale list is really a common pattern. Perhaps we may want
to have a guideline for this kind of situation.
Change-Id: I142379afbaf24d524ff09cf6c7ee7720150f7489
Adding a System API for applications to access a context hub.
The API is not expected to be exposed to third party Android
applications in the medium term.
Change-Id: Ia2222317c913de6901f3912e4c89b5cfa398be85
This implements a mechanism for sensor hardware/HAL to deliver additional information beside sensor
readings to application. It includes internal temperature reading, untracked delay of sample,
location and pose of sensor device placement in phone frame, etc. This is also a very expandable
frame to account for future need.
Change-Id: Ifd52ff315ef675086326f118eab773b0194bae23
Note: sensor additional information report used to be called sensor meta data.
Defined the dynamic sensor meta data type and UUID of sensor, as well
as the broadcast intent that is related to dynamic sensor status
change.
Modify SensorManager, SystemSensorManager and the JNI layer to support
dynamic sensor discovery.
Added SensorNotificationService to notify apps that sensor connected
or disconnected via broadcast.
Change-Id: I28adfb005357d7e3983d65117d6865830c75027d
Adding new sensor types for the following -
i) Stationay Detection
ii) Motion Detection
iii) Heart Beat Detection
Change-Id: I95dd81605e0ce2467fe5e0b65dbd25447bba412b