Commit Graph

2632 Commits

Author SHA1 Message Date
android-build-team Robot
a973d530df Merge "camera2/legacy: Fix expected errors on eglSwapBuffers" into pi-dev 2018-04-27 18:24:00 +00:00
Lloyd Pique
df34b49fa2 camera2/legacy: Fix expected errors on eglSwapBuffers
SurfaceTextureRenderer::swapBuffers interpreted EGL_BAD_SURFACE as
indicating an abandanoned buffer queue. But the EGL 1.4 lists additional
errors that also indicate extreme failure: EGL_CONTEXT_LOST, and
EGL_BAD_NATIVE_WINDOW.

Discovered while debugging CTS test
android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface
on ARC++ x86 boards.

Test: cts-tradefed/android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface
Bug: 64496778
Bug: 36063477
Change-Id: I782f2c923aa5ff2442bbcf3dfb09861e129a2872
(cherry picked from commit 3511f99cf986a9fe7a67a8aee301e05f1be07f62)
2018-04-26 15:31:12 -07:00
Tomasz Wasilczyk
a2015451a7 Merge "Don't check program selector's type for equality." into pi-dev 2018-04-20 13:49:39 +00:00
Tomasz Wasilczyk
71791f95c6 Don't check program selector's type for equality.
As the comments of the whole class says, primary ID is the field used
for checking for equality of the selectors. Current implementation also
checks program type, which is a deprecated field that can be inferred
from primary ID.

Test: open car.Media, add AM station to favorites
Bug: 78296701
Change-Id: I0423f831c2fdca2d1d126ed8a3b8fe40f28022ac
2018-04-19 14:23:54 -07:00
Kevin Chyn
54926ba6a9 Merge "Don't delay the FINGERPRINT_ERROR_CANCELED message" into pi-dev 2018-04-18 01:53:39 +00:00
Kevin Chyn
58a0d51472 Don't delay the FINGERPRINT_ERROR_CANCELED message
Test: tested with test APK

Change-Id: Ic975870c6f815b5f7dfa4c7f2d8bf5554fbb1c5b
Fixes: 78185698
2018-04-17 13:50:53 -07:00
Hidenari Koshimae
3a385f81a3 Camera: Fix a description for MONOCHROME camera capability
Test: Compile
Bug: 77902724
Change-Id: Ibb6a1d4b5f80a0c4d0e3f29625b03a827a3ed80c
2018-04-16 12:22:34 -07:00
Tomasz Wasilczyk
dc7687a29b Fix AM band range.
Test: open radio app, it doesn't throw any errors anymore
Bug: 75970985
Change-Id: I1d35fe02abf3c8de20c4426867f855feab3277d5
2018-04-11 16:04:05 -07:00
TreeHugger Robot
082147cfe1 Merge "Added system-wide minimum brightness curve." into pi-dev 2018-04-10 11:28:44 +00:00
Dan Gittik
122df86891 Added system-wide minimum brightness curve.
The minimum brightness curve guarantess that any brightness curve
that dips below it is rejected by the system.
This prevent auto-brightness from setting the screen so dark as to
prevent the user from resetting or disabling it, and maps lux to
the absolute minimum nits that are still readable in that ambient
brightness.

Test: atest BrightnessConfigurationTest.

Fixes: 77176207

Change-Id: Ibd1e83e9b147f3849d6c907f828cbe5950c8367f
2018-04-06 17:04:45 +01:00
Vishwath Mohan
ecf00cedb6 Rename BiometricDialog to BiometricPrompt.
Renamed to BiometricPrompt per API-council feedback.

Bug: 77494933
Test: m -j70
Change-Id: Ifed2b8f3439a7e671e0ce46d3a7db9f24871b16a
2018-04-05 10:41:19 -07:00
TreeHugger Robot
3275d9a004 Merge "Camera: sort getCameraIdList output" into pi-dev 2018-04-03 17:13:39 +00:00
TreeHugger Robot
7451945364 Merge "Camera: Update external camera orientation guidelines" into pi-dev 2018-04-03 12:57:19 +00:00
TreeHugger Robot
4ccefebb78 Merge "Camera: fix errorFlag logic" into pi-dev 2018-04-02 23:04:42 +00:00
TreeHugger Robot
374f6a26f9 Merge "Fingerprint user canceled message should not be delayed" into pi-dev 2018-03-31 01:52:37 +00:00
Kevin Chyn
c50aded51d Fingerprint user canceled message should not be delayed
The user canceled message is different than the other fingerprint errors
since it is caused by the user explicitly tapping on the UI at which
point the dialog will be already dismissing/dismissed. So the error
should be sent immediately to the application.

Test: manual test with FingerprintDialog, modified to show when the
      error messages are received

Change-Id: Ia2a3b0a7ac9c8cfcbd6055045a95fc06aa02c61a
Fixes: 77337939
2018-03-30 15:31:18 -07:00
TreeHugger Robot
49c27f2267 Merge "Add a SystemApi to control display saturation." into pi-dev 2018-03-29 20:55:22 +00:00
Tomasz Wasilczyk
d0c78f9f28 Fix empty program list filter handling.
Also, fix some minor issues about program list fetching.

Test: manual
Bug: 74353024
Change-Id: I77546b806f2d9de9505e64335af47e99079cea3e
2018-03-29 18:38:58 +00:00
Bryan Mawhinney
462e29da9b Add a SystemApi to control display saturation.
Allows an app with the appropriate permission to reduce
(make more gray) the saturation of colors on the display.

Test: manual
Bug: 77189882
Change-Id: I2b7b065d07bd2ca24730b2e8c52d161c22b307ab
2018-03-29 18:41:03 +01:00
Tomasz Wasilczyk
64faa5b60f Merge "Indicate whether BandConfig initialization is required or not." into pi-dev 2018-03-29 17:27:56 +00:00
Tomasz Wasilczyk
27926edc3b Indicate whether BandConfig initialization is required or not.
The broadcastradio HAL 1.x requires waiting for onConfigChanged callback
to indicate the initialization is done, while HAL 2.0 does not have the
config setting (at the tuner session level) at all.

This change makes it possible to cleanly workaround race condition in the
radio app retaining support for both HAL revisions. Future versions of the
RadioManager will provide a method to open a session without taking care
about these nuances.

Bug: 74353024
Test: manual
Change-Id: I5de2d5e5c33626fcf0cfbbaf121d0b13e53d0bae
2018-03-29 07:45:06 -07:00
TreeHugger Robot
889b21d181 Merge "Camera: Add MONOCHROME camera capability" into pi-dev 2018-03-28 21:01:31 +00:00
Vishwath Mohan
86ed912f5a Merge "Refactor FingerprintDialog to BiometricDialog" into pi-dev 2018-03-28 18:46:34 +00:00
Yin-Chia Yeh
f8aa7bc152 Camera: sort getCameraIdList output
Since API1 camera ID (int) can now be used as array index
of getCameraIdList output.

Test: mix internal/external camera and try CtsVerifier tests
Bug: 72261912
Change-Id: I7cc28f47d100424ebe1ce6f7b61f60c233688538
2018-03-28 12:59:49 +01:00
Emilian Peev
3abc7511b8 Camera: Update external camera orientation guidelines
The external camera orientation and facing should not be
used for the jpeg orientation calculation.

Bug: 72261912
Test: Android compiles without errors
Change-Id: I552c09ae8dada2122396128011f7b82a9889e126
2018-03-28 11:22:26 +01:00
Vishwath Mohan
cf87df1531 Refactor FingerprintDialog to BiometricDialog
This CL changes FingerprintDialog into the more generic
BiometricDialog, which OEMs will be able to extend as necessary to
provide support for alternate biometric modalities.

Bug: 74831038
Test: m -j50 FingerprintDialog (from the associated CL on this topic)
      The app works and authenticates successfully.
Test: make update-api -j56

Change-Id: Ic398ef0a0b448be68dbe3330b30779f93f567243
2018-03-27 13:15:01 -07:00
TreeHugger Robot
3801d3a7d9 Merge "Camera2: Add distortion correction support" into pi-dev 2018-03-27 19:26:44 +00:00
TreeHugger Robot
b57843059a Merge "Tweak FingerprintDialog" into pi-dev 2018-03-27 18:43:17 +00:00
Jerry Zhang
df101a4596 Merge "Write descriptors for Mtp in UsbService" into pi-dev 2018-03-27 02:49:02 +00:00
Shuzhen Wang
51248bf607 Camera: Add MONOCHROME camera capability
Test: Camera CTS
Bug: 74597035
Bug: 64691172
Change-Id: I0315faada2e69acfe3617fabe3e52563701e8ee7
2018-03-26 16:11:48 -07:00
Kevin Chyn
dba919af3a Tweak FingerprintDialog
FingerprintDialog optional fields should not take up space when null
FingerprintDialog error messages should be delayed until dialog is dismissed

Fixes: 75281164

Test: manual test with FingerprintDialog apk

Change-Id: Iaa95fc8c95b7c9f5fc5d8563ea37fc1f6497fabd
2018-03-26 14:45:23 -07:00
TreeHugger Robot
8cb2aba54d Merge changes from topic "executor_api" into pi-dev
* changes:
  Camera: Accept user-supplied executors in capture sessions
  Camera: Async camera manager calls should use executors
2018-03-26 13:31:30 +00:00
TreeHugger Robot
7ed5fb3e1d Merge changes from topic "bug73953366_bug74605221" into pi-dev
* changes:
  Camera: Complete transition from handlers to executors
  Camera: Camera shouldn't throw 'RejectedExecutionException'
  Revert "Revert "Camera: SessionConfiguration should use Executors""
2018-03-23 17:16:00 +00:00
Emilian Peev
2f0184fa89 Camera: Accept user-supplied executors in capture sessions
It should be possible for clients to pass executors instead of
handlers in any method that accepts capture result listener.

Bug: 3767382
Test: Camera CTS
Change-Id: I605c001533e93e6294d265fcd4d3d5783c313b8a
2018-03-23 14:27:37 +00:00
Jerry Zhang
6d319b8aaa Write descriptors for Mtp in UsbService
The current model for setting up a functionfs
function is:

UsbDeviceManager#setCurrentFunctions() ->
intent is sent to MtpReceiver to write the descriptors ->
init/hal waits for descriptors to write, then pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer

The main downside of this is a lack of reliability because
the Mtp process could be killed at any point. Normally, a
gadget is unbound if its control endpoint is closed. no_disconnect
works around this, but is still a little janky. In addition, the
extra intent delays the startup of the gadget.

With the new model, UsbDeviceManager writes the descriptors
on initialization. Since it is a system service, it won't be killed.

UsbDeviceManager#setCurrentFunctions() ->
init/hal pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer
MtpServer calls UsbManager#getControlFd to get a dup of the control
endpoint.

Also modify permissions so system server can access mtp files.

Bug: 72877174
Test: Change usb configurations to ptp/mtp
Change-Id: Id17d2b5930f4e1f37ec1b4f00add9d594174ad49
2018-03-22 11:35:19 -07:00
TreeHugger Robot
4d6dc48d24 Merge changes I7f413e38,I20aba7e9 into pi-dev
* changes:
  Remove FlpHardwareProvider
  Create the stubs lib for com.android.location.provider
2018-03-22 00:29:38 +00:00
TreeHugger Robot
6ed6340e3c Merge changes from topic "SoundTriggerJobService-steps" into pi-dev
* changes:
  Throttle number of sound trigger operations / day
  Add SoundTriggerDetectionService
  Expose SoundTriggerManager and SoundTrigger APIs
2018-03-21 03:27:56 +00:00
TreeHugger Robot
daec95a7f5 Merge "Get current and default brightness configs." into pi-dev 2018-03-21 02:31:19 +00:00
Jiyong Park
4cc3a1c056 Remove FlpHardwareProvider
After Treble's FLP merge into GNSS HAL, the FlpHardwareProvider is just
an empty shell. Removing FusedLocation and/or Flp + Hardware classes
altogether.

Bug: 35726697
Test: m -j
Test: Open Google Map and then walk around. The dot moves as I walk.
Change-Id: I7f413e38b57424e8ebb9d7d14d94f145a48d10f8
2018-03-21 10:36:44 +09:00
Eino-Ville Talvala
1486849e8b Merge "Camera2: Deprecate LENS_RADIAL_DISTORTION, add LENS_DISTORTION" into pi-dev 2018-03-20 21:58:15 +00:00
Philip P. Moltmann
a5fd0294c7 Expose SoundTriggerManager and SoundTrigger APIs
These APIs require a system permissions, hence SystemAPI.

As SoundTrigger is now partially SystemApi and partially internal API a
lot of @hide tags are needed to keep hiding the still internal classes,
fields and methods. As SoundTrigger is heavily used via reflection no
structural change to this class can be made.

The MANAGE_SOUND_TRIGGER permission should be visible to the apps as
the apps need to know which permission to request in their manifest.
If it wouldn't be exposed it would just be a magic string.

Test: built
Change-Id: Ic93d67639e2605c26c961acdd827c14cb0a68f47
Bug: 73829108, 71981721
2018-03-20 13:57:14 -07:00
Emilian Peev
9129aa25c1 Camera: Async camera manager calls should use executors
Methods in camera manager that receive and invoke user supplied
callbacks should also be able to accept executors and invoke them
instead of using user handlers.

Bug: 73953366
Test: Camera CTS
Change-Id: I2f22ada463d7debb90beba3e31579cdb4df42506
2018-03-20 15:46:15 +00:00
Shuzhen Wang
bde1397db8 Camera2: Use Set for physical camera IDs
Because physical camera IDs are not ordered, use Set instead.

Test: Camera CTS
Bug: 74838822
Change-Id: I2ca73ba42f4517283f4c0048f9369498b11eea66
2018-03-19 10:51:45 -07:00
Kenny Guy
6d1009f882 Get current and default brightness configs.
Getter System API to match existing setter for
the bightness configurations.
Getter System API to read the default brightness
configuration.

Bug: 74105596
Test: atest BrightnessTest

Change-Id: If0a0effad6a4ba6da2e5391dd6bde91dc04bad9c
2018-03-19 15:05:25 +00:00
Emilian Peev
9a0ec8c456 Camera: Complete transition from handlers to executors
Executors should be used instead handlers in all camera2
framework code. Remove or refactor any code that still
uses them.

Bug: 73953366
Test: Camera CTS
Change-Id: Ica01d7df5b2e298ea7e11c17fe558bd003072854
2018-03-19 12:55:48 +00:00
Yin-Chia Yeh
36ceaca325 Camera: fix errorFlag logic
Use BAD_VALUE for both
   - Surface is not backed by a native object
   - The native object has been disconnected

Test: new CTS tests
Bug: 67564265
Change-Id: Iffa404789a30f2fd09472822dbeaf9f6a7472a96
2018-03-16 17:01:54 -07:00
TreeHugger Robot
43a4dffd77 Merge "camera2: Add links for aeState" into pi-dev 2018-03-15 22:17:22 +00:00
Chien-Yu Chen
c9ca722ff6 camera2: Add links for aeState
Test: Build
Bug: 74976641
Change-Id: I5da5a59ae1072c9240c42ad7a38fc25548fcea63
2018-03-15 11:14:29 -07:00
Eino-Ville Talvala
4167072142 Camera2: Add distortion correction support
This allows camera devices to correct geometric distortion in their
optics, when requested by the application.

The correction only applies to processed (YUV, JPEG, etc) outputs,
not RAW buffers, or the result metadata.

Test: New CTS test passes
Bug: 74434422
Change-Id: I4566713874a152eaed237e823b8d65de4bcab539
2018-03-14 14:03:07 -07:00
Eino-Ville Talvala
915f5041bb Camera2: Deprecate LENS_RADIAL_DISTORTION, add LENS_DISTORTION
LENS_RADIAL_DISTORTION is inconsistently defined: in some places, it
is documented to operate on the range [-1...1], and in others, on a
range dependent on the camera lens's intrinsic calibration and focal
length.

Since fixing just the definition will not fix any existing devices
that define this value, deprecate the old key and add a new consistent
one to make sure applications only reference the consistent
definition.

Test: Adjusted camera CTS passes
Bug: 74641761
Change-Id: Ica7bcd0bc54baa0bdb1d388c4947431556643393
2018-03-14 14:03:07 -07:00