Commit Graph

2017 Commits

Author SHA1 Message Date
TreeHugger Robot
626496effc Merge "Camera2: Add secondary surface to OutputConfiguration" 2017-01-18 01:55:04 +00:00
Shuzhen Wang
9c663d4415 Camera2: Add secondary surface to OutputConfiguration
Test: camera cts, and manually test camera preview/capture/recording.
Bug: 33777818
Change-Id: I853f2f48640e4b1ad20a468c152f7e9b536f7a3b
2017-01-17 16:38:39 -08:00
Jim Miller
40e4645e6e Rewrite FingerprintService to use HIDL 2.1
Bug: 33199080
Test: Fingerprint enroll, remove, unlock, fingerprint arbitration.

Change-Id: I8b98236ba81f053527ee74c8a189af1adfd17d55
2017-01-17 11:45:41 -08:00
Ashutosh Joshi
576ea41d2f Fix documentaiton formatting errors.
i) Fix documentation formatting errors converting a
     major part of the documentation into a link.
ii) Remove the DEVICE_ORIENTATION type documentation. Its
         a hidden sensor type, and links to the sensor fail.

Test: Compile build, generate docs, visually verify change.
Change-Id: I2659d18e35b60f5939ba18c6b3d752a990621447
2017-01-13 17:06:41 -08:00
Ashutosh Joshi
24f2a6f939 Merge "Add an uncalibrated acclerometer sensor type." 2017-01-13 17:47:33 +00:00
Ashutosh Joshi
e33eb92809 Add an uncalibrated acclerometer sensor type.
Adding the uncalibrated accelerometer sensor type.

Test: Build compiles.
Change-Id: I586bd924e0fb90ef4b4a9565f8fbf72a39eccb36
2017-01-11 20:52:29 -08:00
Santos Cordon
3107d29c8f Add Brightness setting for VR Mode.
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.

Test: runtests frameworks-core
Test: Turn vr mode on and change brightness (should remain separate from
normal brightness)

Bug: 30984614
Change-Id: If3c3e81b592e0c6fd037e5783559683e5cb58379
2017-01-10 17:16:04 -08:00
Ian Pedowitz
7e96654f1b Revert "Add Brightness setting for VR Mode."
This reverts commit c7e853f511.

Bug: 33895226
Bug: 30984614
Change-Id: Icca320e02651b7dd7b8db84ab414f41edee32760
2016-12-27 18:28:36 +00:00
Santos Cordon
c7e853f511 Add Brightness setting for VR Mode.
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.

Bug: 30984614
Change-Id: Ie5578bbd6ea346f0eb34fe4abbfd604a5d7c0c93
2016-12-22 12:27:51 -08:00
Ashutosh Joshi
420e45e9cb Move ContextHubService to a better location.
Move ContextHub service from system core to a more appropriate place
for a service.

Test: GTS tests pass.

Change-Id: Ie0f25414fc472a0214c0dd94e7ad4564cd38f842
2016-12-21 11:33:28 -08:00
Eino-Ville Talvala
52d600769c Merge "Camera: Updates in preparation for HIDL" 2016-12-14 23:08:14 +00:00
TreeHugger Robot
db10a2094c Merge "Remove accidentally exposed Geofencing classes." 2016-12-14 20:15:27 +00:00
Eino-Ville Talvala
283ae234f9 Camera: Updates in preparation for HIDL
- For all camera2 paths, and anything shared between the legacy API and
  camera2, switch to using String for camera IDs.
- Remove assumption that camera device IDs must be a dense set of small
  integers, and rewrite the camera ID query methods
- Change operation of ICameraService.addListener: it now returns the list of
  available devices directly, instead of invoking callbacks. This is
  needed to ensure an up-to-date list of cameras is immediately available
  on connection to the camera service.
- Add new CameraStatus object to use as the addListener return value
- Update tests to work with new interface

Test: cts-tradefed run cts -m Camera --skip-connectivity-check -d -o --abi armeabi-v7a --disable-reboot
Bug: 32991422
Change-Id: I6ff4a5dd014c6aefe0750850eeece6f3267a3e5b
2016-12-13 12:12:21 -08:00
Jerry Zhang
d9291d55f6 Merge "Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers." am: 1975240f17 am: 830874dbe7 am: 88672d7d29
am: 11dc0eccfb

Change-Id: Ibafebe4877052595cb34626bde9ac6fba1983fb0
2016-12-13 01:02:55 +00:00
Jerry Zhang
bb598ee16f Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers.
Functionfs requires MtpServer to write descriptors before the device can be
configured. This adds a new configure call that will occur only when
functions are changed (new argument added to updateUsbStateBroadcast for this)
and be called after sys.usb.config is changed but before the waitForState
call to ensure compatibility with configfs devices.

Bug: 30976142
Change-Id: I7e94a5847d3b19c0fd75139e1b15a3f2a1cea01d
Test: Manual
2016-12-12 11:05:32 -08:00
TreeHugger Robot
5683204632 Merge "Camera2: Consolidate the overriding of PRIVATE format" 2016-12-08 02:34:08 +00:00
Shuzhen Wang
71e6d62d23 Camera2: Consolidate the overriding of PRIVATE format
We had overriding of PRIVATE format scattered at multiple places.
Consolidate them into one place.

Test: Camera preview/capture, and camcorder recording
Change-Id: I098ce93bba2000760a20c0297fcf0cb9d8c6caab
2016-12-07 16:22:37 -08:00
Michael Wright
05c68d3940 Remove accidentally exposed Geofencing classes.
Bug: 33238174
Test: m -j12

Change-Id: I95c3c314f8659f1eeff1dfa218c4c0ab7f0b47b3
2016-12-02 14:45:18 +00:00
Eino-Ville Talvala
d5b9c6ba55 CameraDevice: Add missing @Nullable for a handler argument.
Like the other capture session creation methods,
createCaptureSessionByOutputConfigurations() will happily take a null
handler.

Test: Compiles
Change-Id: I702a0761e40207ca5143ad69f5d8694c45f27561
2016-12-01 11:31:02 -08:00
Jorim Jaggi
57e2f4db35 Make LockoutResetCallback oneway
Test: Get locked out, make sure wake-and-unlock is working
again after 30 seconds.

Change-Id: I2fb03775898c0567f058d6d9d0b963ed071cc786
Fixes: 32946531
2016-11-24 14:50:54 +01:00
Jerry Zhang
4c4666c5ef Merge commit '54f33d9af22e62629798555a3cde4e784bd8ba54' into manual_merge_54f33d9
Change-Id: Icfd9bc3eff034d33e733dbb8386949c9ec345e58
2016-11-17 10:48:26 -08:00
Jerry Zhang
5cbd151d40 Refactored setCurrentFunction and setUsbDataUnlocked into single method.
am: 935372bfd6

Change-Id: I5436278e092f691c9179f7cc3709c4578b544e74
2016-11-17 00:12:50 +00:00
Jerry Zhang
935372bfd6 Refactored setCurrentFunction and setUsbDataUnlocked into single method.
This gets rid of an extraneous configuration change when going from
adb to adb + file transfer as previously the config would have been
reset once for functions and once for data unlocked.

It also simplifies some of the code.

Test: manually changing usb configurations
Change-Id: Ica10a195338b2189db13113f44657393db110bee
(cherry picked from commit 7a396be6d5)
2016-11-15 15:29:45 -08:00
Sudheer Shanka
dc589ac82b Update usage of ActivityManagerNative.
- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
      adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
          -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
2016-11-14 11:27:12 -08:00
Jeff Sharkey
cb62162219 Make another interface oneway, whitelist provider.
More progress towards removing blocking calls to improve system
stability.

Test: builds, boots
Bug: 32715088
Change-Id: I5ab2d2687f4f47e0ee68105c6998e74798af061c
2016-11-11 14:06:11 -07:00
Jeff Sharkey
0a17db1cc5 Detect non-oneway calls leaving system_server.
To protect system stability, any Binder calls leaving the
system_server must carefully be performed using FLAG_ONEWAY (or
the 'oneway' verb in AIDL) which prevents the call from blocking
indefinitely on the remote process.

In this CL, the system_server uses the new Binder.setWarnOnBlocking()
method to enable detection by default for all remote Binder
interfaces.  It can also use Binder.allowBlocking() to allow
blocking calls on certain remote interfaces that have been
determined to be safe.

This CL adds the 'oneway' verb to several interfaces and methods
where it should have been added, and marks a handful of system
ContentProviders as being safe to call into.  Also, we assume that
any services obtained from ServiceManager are part of the core
OS, and are okay to make blocking calls to.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: Ide476e120cb40436a94b7faf7615c943d691f4c0
2016-11-07 17:03:37 -07:00
TreeHugger Robot
2c442e962e Merge "Stop using return within finally" 2016-11-04 02:42:11 +00:00
Ray Essick
7601049275 Stop using return within finally
Refactor code to avoid a return statement inside a finally block. Such
constructs interfere with exception propagation in non-obvious ways
and are therefore considered bad practice.

Bug: 32586420
Test: manual code walk
2016-11-03 14:45:56 -07:00
Philip P. Moltmann
08b678c029 Correctly use ByteBuffer in UsbRequest
Meaning: Read/Write to correct area in buffer, set position correectly.

- Create a new method UsbRequest#enqueue that has correct behavior, deprecate
  UsbRequest#queue.
- Move all description of the weird (legacy) UsbRequest#queue behavior to
  this method.

Change-Id: Ibeed400b4ad2aa9d005ace345c7895a3dc4ba1ad
Fixes: 31050148
Test: Submitted alongside
2016-10-27 10:25:40 -07:00
Philip P. Moltmann
927fefe813 Add UsbDeviceConnection.requestWait with a timeout
Test: Test is submitted alongside this change
Change-Id: I1c46143030a2822ee76676ddc80d3b5c8c62ee80
Fixes: 31288102
2016-10-26 10:21:21 -07:00
Yin-Chia Yeh
3e254b6953 Merge "Camera2 Legacy: catch more surface abandoned error" am: 03f14bef41 am: 50f9b6e71f
am: 0eb99d23b4

Change-Id: Ie8dbed22423aa52b418cebfd19e29c6ae2c6e2b5
2016-10-21 21:28:21 +00:00
Yin-Chia Yeh
50f9b6e71f Merge "Camera2 Legacy: catch more surface abandoned error"
am: 03f14bef41

Change-Id: If2e05eeb8c7fe24f97fc0c5e20bfe03a6c8c9e23
2016-10-21 21:07:44 +00:00
Yin-Chia Yeh
091661334b Camera2 Legacy: catch more surface abandoned error
Bug: 30140107
Change-Id: Ia293bdbb85c8078e17def55db9c599cfe70458db
2016-10-21 11:40:46 -07:00
Shuzhen Wang
88f1af2410 Camera2: Add onCaptureQueueEmpty callback
onCaptureQueueEmpty indicates that the non-repeating
capture request queue of camera device is empty, and
is ready to process a new request.

Test: testMultipleCapture in PerformanceTest.java

Bug: 29006447
Change-Id: If245ff6abf352548ca13a10fcfbd1550b92c1224
2016-10-18 17:50:17 -07:00
Philip P. Moltmann
f2d83edc26 Clarify which props of USB devices are optional
Test: Compiles, manually inspected object creation code, ran USB CTS
verifier tests
Fixes: 32209658
Change-Id: I738c0cea5a0f37484e986f0a01c8ed9c46b639ed
2016-10-17 12:14:45 -07:00
Jerry Zhang
7a396be6d5 Refactored setCurrentFunction and setUsbDataUnlocked into single method.
This gets rid of an extraneous configuration change when going from
adb to adb + file transfer as previously the config would have been
reset once for functions and once for data unlocked.

It also simplifies some of the code.

Test: manually changing usb configurations
Change-Id: Ica10a195338b2189db13113f44657393db110bee
2016-10-13 17:32:21 -07:00
Philip P. Moltmann
5201f1e61c Do not access MTP devices when disabled.
The USB data transfer is disabled we should not allow access MTP devices
(e.g.
usb sticks). We have two ways of accessing them: Either by mounting them
or by creating a MTPDevice in an app.

Of course an app could implement implement their own MTPDevice
implementation. In this case we cannot enforce the policy without
completely suppressing all MTP USB devices which would be too
restrictive.

Note: When the policy is set we do _not_ disconnect already connected
MTP devices

Fixes: 31472955
Change-Id: I6080c48c49657102774b2b3b4d89ff030245a266
2016-09-30 22:24:23 +00:00
Eino-Ville Talvala
dce815430d DngCreator: Do not cache timezone in static initializer am: ec727411d2 am: fa141e303e
am: f6ea31d8f1

Change-Id: Ib702bb0fed2a4980ce543a1ab37d7c43179a67e8
2016-09-29 02:05:30 +00:00
Eino-Ville Talvala
fa141e303e DngCreator: Do not cache timezone in static initializer
am: ec727411d2

Change-Id: I86d207b7bfd156f5296aa3f5ba5acecd2d762d4e
2016-09-28 21:27:21 +00:00
Eino-Ville Talvala
4e3bb26f64 Merge "DngCreator: Do not cache timezone in static initializer" into nyc-mr1-dev 2016-09-28 21:20:21 +00:00
Philip P. Moltmann
5dd4e6cf74 Clarify the behavior of UsbRequest
This is obviously just about describing a bad behavior. In the next step
these methods should be deprecated and replaced with versions that deal
with ByteBuffers appropriately.

Bug: 31050148
Test: Test that enshrines the documented behavior is submitted alongside
      this change
Change-Id: If250a8bbd636784355e839a1638d52f3bbe9b83d
2016-09-28 11:29:02 -07:00
Eino-Ville Talvala
ec727411d2 DngCreator: Do not cache timezone in static initializer
The static initializer for a pre-loaded framework class is run
no later than at zygote startup, which happens at device boot.

Which means that if the timezone later changes, DngCreator will use
an incorrect cached timezone until the next reboot.  This is especially
evident in freshly wiped devices, where initial setup will typically
change the timezone.

Instead, read the timezone each time DngCreator is created, which is
also when we query the current time for constructing the timestamps.

Test: android.hardware.camera2.cts.DngCreatorTest#testSingleImageThumbnail
Bug: 31743060
Change-Id: I83a4eac762650e5f904f3b8fa779c094cef30562
2016-09-28 11:10:00 -07:00
Greg Kaiser
5abcc9a888 ContextHubService: Hack around 32-bit app ID am: 1983f9b05b am: 40c0435026
am: eaed84e40a

Change-Id: I2eb38c4cf7e27bfb75db2f41b529840ac9fd1f44
2016-09-28 00:11:46 +00:00
Greg Kaiser
1983f9b05b ContextHubService: Hack around 32-bit app ID
The NanoApp.java class has a bug (b/30808791) where the API treats
app IDs as 32-bits, instead of 64-bits.  We are too late in the
Android N release cycle to change this API.

We previously put in a hack to fix this only for Google nanoapps.
However, our GTS nanoapps need this to work, and there are other
partners who need this to work in the N timeframe.  So we make
a more robust hack which parses the full 64-bit app ID out of
the header binary.

Test: Compiles and runs GTS
Bug: 31767599
Change-Id: Ic43f1f62c685fb99aac08d08767d1a67c329503f
2016-09-27 15:01:48 -07:00
Chien-Yu Chen
62d6962835 Camera2: Support early finished tasks am: dd6629ef86 am: 8425ebc28f
am: e98ffa404e

Change-Id: If7c38066a4244a0ba02158442d0a067b6fc802cd
2016-09-27 00:55:42 +00:00
Chien-Yu Chen
dd6629ef86 Camera2: Support early finished tasks
Add support to track finished tasks before it starts.

Bug: 30117138
Change-Id: I42eb0377f719d57d820d9c1b2484600116c8807a
2016-09-23 17:23:45 -07:00
Philip P. Moltmann
1599ab8d12 Merge "Clarify UsbConnection#bulkTransfer api behavior" 2016-09-23 16:49:34 +00:00
Philip P. Moltmann
71985f5e23 Merge "Do not access MTP devices when disabled." 2016-09-21 18:14:25 +00:00
Philip P. Moltmann
5e040ae477 Clarify UsbConnection#bulkTransfer api behavior
- Do not allow negative length as inside of JNI this is interpreted as
  unsigned value which lead to memory corruptions.
- Document behavior for uncommon but usable values of parameters

Test: Ran CTS verifier UBS device test
Change-Id: I0899a2831c6dd2617528a5e79ea21932f6a66c13
2016-09-20 15:31:32 -07:00
Eino-Ville Talvala
2ce4b7a8a0 DngCreator: Fix calculation of date/time stamps am: 3fc21ef78b am: 215c76b1f4
am: ba57a47375

Change-Id: I818087e4a3495162eedceaebcd4da93c9eecfe87
2016-09-20 03:04:26 +00:00