Commit Graph

2626 Commits

Author SHA1 Message Date
Eino-Ville Talvala
a262051294 Merge "Merge "Camera2: Add distortion correction support" into pi-dev am: 3801d3a7d9" into pi-dev-plus-aosp
am: a2b839170f

Change-Id: I89e9c5044a8cc5b6a107aa6e1b7843d624a11726
2018-03-27 21:38:15 +00:00
Kevin Chyn
6b8ba697b1 Merge "Tweak FingerprintDialog" into pi-dev am: b57843059a
am: 4dd84f9c92

Change-Id: Iffc554493e09da5202d27f66cf32956dae03fc59
2018-03-27 20:30:02 +00: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
e52c2b98e9 Merge "Write descriptors for Mtp in UsbService" into pi-dev am: df101a4596
am: 03f2788598

Change-Id: If6a24ce29d891159a60e4690eb82ef83b2f82885
2018-03-27 03:57:23 +00:00
Jerry Zhang
df101a4596 Merge "Write descriptors for Mtp in UsbService" into pi-dev 2018-03-27 02:49:02 +00: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
Emilian Peev
261aef584d Merge changes from topic "executor_api" into pi-dev am: 8cb2aba54d
am: d0d4291fef

Change-Id: I00bb1fbfbeeee77454f156fd1853380c33be7dab
2018-03-26 14:05:56 +00:00
Emilian Peev
3b0166dbf1 Camera: Async camera manager calls should use executors am: 9129aa25c1
am: f977ff992c

Change-Id: Ib2819df3ac27e4580bafa9420136c6678318d9b4
2018-03-26 14:02:38 +00:00
Emilian Peev
f977ff992c Camera: Async camera manager calls should use executors
am: 9129aa25c1

Change-Id: Idd12695a8cdd15522d167499deb7b119d5b7db45
2018-03-26 13:46:48 +00: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
Emilian Peev
6dfdd8ccd4 Merge changes from topic "bug73953366_bug74605221" into pi-dev am: 7ed5fb3e1d
am: a87c6da04b

Change-Id: I4ef17c30e731fe96628d39fa8bcf6b8eb7c49ae8
2018-03-23 18:40:44 +00:00
Emilian Peev
d3c4753f34 Camera: Camera shouldn't throw 'RejectedExecutionException' am: b9a5194e9e
am: ca5ffee316

Change-Id: I1f659f2b7a5e2af801b2508e8d8bfd36b9194e05
2018-03-23 18:36:51 +00:00
Emilian Peev
669ca91e00 Revert "Revert "Camera: SessionConfiguration should use Executors"" am: 77ca866b53
am: f18ec57381

Change-Id: Iad789b80b193b535a517c991894cc29046e517b1
2018-03-23 18:33:45 +00:00
Emilian Peev
ca5ffee316 Camera: Camera shouldn't throw 'RejectedExecutionException'
am: b9a5194e9e

Change-Id: Ic4dd87d89f91822fce82c5ca27632f69716279e5
2018-03-23 18:15:35 +00:00
Emilian Peev
f18ec57381 Revert "Revert "Camera: SessionConfiguration should use Executors""
am: 77ca866b53

Change-Id: I226e1ba33047695b74ce5de9054c4760e61bf773
2018-03-23 18:11:10 +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
Jiyong Park
c296e7f805 Merge changes I7f413e38,I20aba7e9 into pi-dev am: 4d6dc48d24
am: 189cc7df45

Change-Id: I725063a24bd1c5713cfbdd63753b8fdb0d552a26
2018-03-22 01:41:21 +00: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
Philip P. Moltmann
5a34c05f3d Expose SoundTriggerManager and SoundTrigger APIs am: a5fd0294c7
am: 961db4b07d

Change-Id: I55f8958c5a98662d70154c3e4f951351a38fd546
2018-03-21 09:14:20 +00:00
Kenny Guy
0d5e69bb7a Merge "Merge "Get current and default brightness configs." into pi-dev am: daec95a7f5" into pi-dev-plus-aosp
am: 86db0ea4af

Change-Id: I6cc9fbe11cd3787b75d6e07ac2d26af6fdd911b7
2018-03-21 07:54:31 +00:00
Philip P. Moltmann
961db4b07d Expose SoundTriggerManager and SoundTrigger APIs
am: a5fd0294c7

Change-Id: I71c2698aa282d33fb5468164b0b5bf90b28f8323
2018-03-21 05:56:25 +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
Eino-Ville Talvala
a44f232bd0 Merge "Camera2: Deprecate LENS_RADIAL_DISTORTION, add LENS_DISTORTION" into pi-dev am: 1486849e8b
am: 6b031adf08

Change-Id: Id51e2167245c56e80f37d52ed0d9d3d650af9f20
2018-03-21 02:57:55 +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
ff1b149443 Merge "Camera2: Use Set for physical camera IDs" into pi-dev am: 83c4690f55
am: f1b5a2a866

Change-Id: Ic6624159009c3dc5d312ab27be4aa9ec4e690686
2018-03-20 03:43:47 +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
Chien-Yu Chen
552bfaca5e Merge "camera2: Add links for aeState" into pi-dev am: 43a4dffd77
am: a95a760759

Change-Id: Ie6730e424f792288a8f009a89b59834d656a9b69
2018-03-16 01:02:44 +00: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
Robert Carr
12ddbdc0b1 Merge changes I68dab076,Ife50c3d3,I705518be,I949fbe81 into pi-dev am: 0a6e6e8911
am: d28cdb8cb9

Change-Id: I19c111ccf54b61f955112160632a8ca26f084767
2018-03-15 02:11:13 +00: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
Robert Carr
ae606b4457 Eliminate usage of global transaction for display configuration.
For seamless rotation to work in the brave new world we need the setting
of the display projection to occur in the same transaction as the
reconfiguration of the stack SurfaceControl. To understand this simply see
that the inverse rotation for seamless rotation happens at the
WindowStateAnimator level so if the stack bounds weren't updated to the new
rotation we would clip. This means: We need to use the pending transaction.
We also need to port the rotation animation to use the pending transaction
as it needs to perform transactions at the same time as setting the display
projection. A pleasant consequence is we can eliminate some "inTransaction"
code-paths that always seemed to be a bit of a wart.

Bug: 72038766
Test: Manual. go/wm-smoke.
Change-Id: I949fbe8150d452c1ef5c13e704ddf87269f824f3
2018-03-14 12:01:01 -07:00
Emilian Peev
b9a5194e9e Camera: Camera shouldn't throw 'RejectedExecutionException'
In case the camera client registers a valid callback but the
respective handler looper exits a 'RejectedExecutionException'
could be thrown by the 'HandlerExecutor' implementation once it
detects that the 'post' method is failing. This exception is not
mentioned in the current camera API and deviates from the usual
behavior where the post status is ignored. To avoid possible
issues with camera clients a new camera specific handler executor
is used which will also ignore the 'post' method return value.

Bug: 74605221
Test: Camera CTS
Change-Id: I2d947ba9cebfc9b4b2a7c88ace6a4060ff7c175e
2018-03-14 17:50:05 +00:00
Emilian Peev
77ca866b53 Revert "Revert "Camera: SessionConfiguration should use Executors""
This reverts commit 90d6fccf01.

Bug: 73953366
Test: Camera CTS
Change-Id: I9092c10ebd3049d886210172cc8364067c439574
2018-03-14 17:12:36 +00:00
Yin-Chia Yeh
7a29d074a8 Merge "Revert "Camera: SessionConfiguration should use Executors"" into pi-dev am: 6896508045
am: 2ccd6d1ea6

Change-Id: I9c9c4318c88fc125d629c043808dc41c1bdd9957
2018-03-14 01:55:40 +00:00
TreeHugger Robot
6896508045 Merge "Revert "Camera: SessionConfiguration should use Executors"" into pi-dev 2018-03-13 22:44:21 +00:00
Yin-Chia Yeh
90d6fccf01 Revert "Camera: SessionConfiguration should use Executors"
This reverts commit 004e73c38c.

Bug: 74605221
Bug: 73953366
Change-Id: I1665c3d235434f57a4cd4aa5f082720b83ac10cc
2018-03-13 20:57:42 +00:00
TreeHugger Robot
4c2ef0271a Merge "Move display id into MotionEvent" 2018-03-12 18:02:43 +00:00
TreeHugger Robot
9d3d6b4076 Merge "Camera: SessionConfiguration should use Executors" into pi-dev 2018-03-12 14:55:34 +00:00
TreeHugger Robot
59444f6abf Merge "Revert "Plumb IME subtype change from IMMS to IMS."" into pi-dev 2018-03-12 08:49:20 +00:00