Commit Graph

2153 Commits

Author SHA1 Message Date
Chien-Yu Chen
753bb4ce84 Merge "Camera: Override enableZsl based on SDK version" into oc-dev am: 3b41407f19
am: e92d62ac89

Change-Id: Ia748c7848e6feedd87294475093837b43c3cc55e
2017-04-17 21:50:01 +00:00
Chien-Yu Chen
3d2b5fe3e0 Camera: Override enableZsl based on SDK version
Override enableZsl based on app target SDK version so that for apps
targeting N and older, enableZsl is false for all template. For
apps targeting O and newer, enableZsl is false for all templates
except STILL_CAPTURE.

Test: CTS
Bug: 34983527
Change-Id: I2057e2351e81c269d322dffc199c58481ac3e78f
2017-04-14 17:35:43 -07:00
Andrii Kulian
7ce72dac6d Merge "Hide flag SHOW_WITH_INSECURE_KEYGUARD" into oc-dev am: c66b6ff997
am: aa412973d9

Change-Id: I2e6394ce9c7bc72f5aa4de90e294defeb2dbf222
2017-04-14 17:46:46 +00:00
Peng Xu
3242ee7920 Merge "Address review suggestions for sensor direct report related APIs" into oc-dev am: 5ebb159a92
am: 70004dd19c

Change-Id: I68cbdfa94e98abde8fa0b072605051f3e0ed561d
2017-04-14 16:28:04 +00:00
Andrii Kulian
c66b6ff997 Merge "Hide flag SHOW_WITH_INSECURE_KEYGUARD" into oc-dev 2017-04-14 05:05:25 +00:00
TreeHugger Robot
5ebb159a92 Merge "Address review suggestions for sensor direct report related APIs" into oc-dev 2017-04-13 23:24:42 +00:00
Peng Xu
3c8c6a4cc9 Address review suggestions for sensor direct report related APIs
Changes inline with bug number

Some improvements about SensorDirectChannel class.
  * Complete the doc about creation of SensorDirectChannel object.
  * Make SensorDirectChannel implements java.nio.channels.Channel.
  * Change isValid() to isOpen().
  * Make close() thread safe.
Bug: 36550285

  * Throw exception on failure of SensorManager.createDirectChannel.
  * Change to use NullPointerException when unexpected null pointer
    is passed in.
Bug: 36555061

  * Move SensorManager.configureDirectChannel() to
    SensorDirectChannel.configure().
  * Format SensorDirectChannel.configure() function doc with
    <pre></pre> to maintain the table structure.
  * Reworded Sensor.isDirectChannelTypeSupported java doc.
Bug: 36555604

Test: pass updated cts SensorDirectReportTest
Change-Id: I447121eaf414cbc94292a109a9d93d2e3c89f8f4
2017-04-13 14:17:11 -07:00
Andrii Kulian
22512e8a22 Hide flag SHOW_WITH_INSECURE_KEYGUARD
Bug: 36555156
Test: android.server.cts.ActivityManagerDisplayTests
Change-Id: I831ada0ffd35ab96af8ae821588c9f6e0ff30e5a
2017-04-13 11:35:40 -07:00
Dave Friedman
293ac8cef2 Docs: Fixes broken link in Javadoc. am: df0fd34d50 am: 506a8b39fb am: 4eff74f8cb am: 2d642f9e2d am: f125662db1 am: 27aeab9763
am: 85b7a34094

Change-Id: I680e6828c66babf4d6e7bae3fd76f1015d2f209a
2017-04-13 17:43:02 +00:00
Dave Friedman
85b7a34094 Docs: Fixes broken link in Javadoc. am: df0fd34d50 am: 506a8b39fb am: 4eff74f8cb am: 2d642f9e2d am: f125662db1
am: 27aeab9763

Change-Id: I0879ba9238602a3af19cdc91c5ae8762d8776c4d
2017-04-13 17:33:56 +00:00
Dave Friedman
27aeab9763 Docs: Fixes broken link in Javadoc. am: df0fd34d50 am: 506a8b39fb am: 4eff74f8cb am: 2d642f9e2d
am: f125662db1

Change-Id: I5220c1ef4ac51e876c3461b64e2a3dd54c9e2b48
2017-04-13 17:28:34 +00:00
Dave Friedman
b97cdeb7ac Docs: Fixes broken link in Javadoc. am: df0fd34d50 am: 506a8b39fb am: 4eff74f8cb am: 2d642f9e2d
am: f125662db1

Change-Id: Ic69e95f68255e5e0bea646cdce2c56881586d24d
2017-04-13 17:28:18 +00:00
Dave Friedman
f125662db1 Docs: Fixes broken link in Javadoc. am: df0fd34d50 am: 506a8b39fb am: 4eff74f8cb
am: 2d642f9e2d

Change-Id: I5257f51a37e6e45a928befea94b2ecdb0cf01f45
2017-04-13 17:19:36 +00:00
Dave Friedman
4eff74f8cb Docs: Fixes broken link in Javadoc. am: df0fd34d50
am: 506a8b39fb

Change-Id: If60b7db71fe92508daaec1255c637927432d7b55
2017-04-13 17:00:44 +00:00
Dave Friedman
506a8b39fb Docs: Fixes broken link in Javadoc.
am: df0fd34d50

Change-Id: I76ed5361426065d5e532c5a11c2d11f28ba8c2d7
2017-04-13 16:48:41 +00:00
Tomasz Wasilczyk
5fccceb2c5 Merge "Initial implementation of Java-based broadcast radio service." 2017-04-12 14:58:41 +00:00
Tomasz Wasilczyk
347192e0da Initial implementation of Java-based broadcast radio service.
It provides only limited amount of service, without actual interaction
with HAL.

Added config.enable_java_radio switch to use Java-based service instead
of native. Added FEATURE_RADIO to PackageManager.

Bug: b/36863239
Test: Instrumentation, manual (Kitchen Sink)

Change-Id: I01139d326893c0a437c60cc35d6e5b005da35231
2017-04-10 15:20:50 -07:00
Dave Friedman
df0fd34d50 Docs: Fixes broken link in Javadoc.
Bug: 37198106
Change-Id: If005bf563f7bd97f794261e03d46c7b092955a89
2017-04-10 14:50:24 -07:00
Jim Kaye
9b5ee823a8 Do not declare USB support in the Emulator
Some Framework code assumes USB, but the Emulator does not
support USB connections. To work around this, the Emulator
includes a trivial UsbManager and indicates
'android.hardware.usb.accessory' support.

This situation is inconsistent and causes problems, including
CTS and CTS-Verifier failures.

This change removes the indication of
'android.hardware.usb.accessory' and corrects a Framework
NPE if USB support is queried relative to a null device.

BUG: 28088069
     b.android.com/234319

Change-Id: I9d35b6bb7788db08f8121755300384db9eb8baf9
(cherry picked from commit 0f7ca97a57200eb1e2f3fb0081722f5775a6a14b)
2017-04-10 17:36:23 +00:00
Philip P. Moltmann
8f9ae8ec8e Merge "Change requestWait API according to request" into oc-dev am: ca687ac39a
am: a89137545b

Change-Id: I918d16f7dd81ec641b023f3a19a0c3aeab984e1d
2017-04-07 13:35:50 +00:00
Philip P. Moltmann
9b6dd2b2c1 Change requestWait API according to request
Test: USB Device CTSVerifier test
Change-Id: Ib55bed248d7b37c6f5f4a7be7ec2d90a7ac396c7
Fixes: 36555805
2017-04-06 18:13:53 -07:00
Emilian Peev
d4dc369ca3 Merge "Camera: Initial support for vendor tag caches" into oc-dev am: a441da153e
am: 222cd1a634

Change-Id: I96fe807766dd59a68c237870724267410584b59c
2017-04-06 14:14:39 +00:00
TreeHugger Robot
a441da153e Merge "Camera: Initial support for vendor tag caches" into oc-dev 2017-04-06 14:02:11 +00:00
Peng Xu
2abd348296 Merge "Local geomagnetic field update to sensor" into oc-dev am: 33bbdda3d3
am: 58e1a90ba9

Change-Id: If9f5b75145423ea452d3e8129e5f1b4c8c643fe8
2017-04-06 02:33:42 +00:00
Emilian Peev
de62d84eb9 Camera: Initial support for vendor tag caches
Vendor tag cache will be used alternatively to the regular
Vendor tag descriptor. The caches can support multiple vendor
tag providers at the same time. The native metadata along with
the requests/results/characteristics will store vendor specific
information that will be used to indentify the respective
descriptor.

Bug: 34275821
Test: Complete Camera/Camera2 CTS tests
Change-Id: I50b7cf9aa5575944fde7673a1728869690b2ce0d
2017-04-05 20:50:10 +01:00
Peng Xu
1cfde25e40 Local geomagnetic field update to sensor
Local geomagnetic field strength, declination, inclination information
is useful for magnetometer calibration. It also benefits rotation
vector sensor implementation as it gives a baseline that aids detecting
magnetic field disturbance.

Bug: 30958130
Test: Tested with marlin. Modified hal implementation can get local
      geomagnetic field.

Change-Id: I373fe74d5a091a3adb80ff3c61e441edcf5a253b
2017-04-04 12:35:49 -07:00
Narayan Kamath
1163568d7c Merge "Properly guard access to CloseGuard in finalizers." 2017-04-04 12:27:02 +00:00
Philip P. Moltmann
872c968c0d Merge "Rename UsbRequest.enqueue to UsbRequest.queue" into oc-dev am: c56defe9c0
am: b0ed6b837e

Change-Id: I7cef506e23205de73d337b54979ed9f59d283495
2017-04-04 02:13:00 +00:00
Andrii Kulian
8623f89c32 Merge "Update display contents when metrics change" into oc-dev am: d6f0b0fc4f
am: de938b99fc

Change-Id: I5420f04c0d3f910ad1db3e0e5266e26de0c6f3f7
2017-04-04 02:00:22 +00:00
TreeHugger Robot
c56defe9c0 Merge "Rename UsbRequest.enqueue to UsbRequest.queue" into oc-dev 2017-04-04 01:57:23 +00:00
Andrii Kulian
cd09799339 Update display contents when metrics change
There are two separate overrides for display metrics in DisplayManager
and WindowManager:
- In DM - LogicalDisplay#mOverrideDisplayInfo, in most cases not null.
- In WM - DisplayContent#mBaseDisplayWidth/Height/Density, different
from #mInitialDisplayWidth/Height/Density values when some metrics are
forced.

When display was resized its windows weren't updated because of
two problems: old LogicaDisplay#mOverrideDisplayInfo was preventing
WM from detecting the change and override (base) display metrics were
never updated by resize.

When display size changes:
- Before this CL:
DM receives DISPLAY_CHANGED event, it updates internal values and
WM is notified about them with a message. In most cases there is an
override obtained from WM and WM doesn't get new values from
LogicalDisplay#getDisplayInfoLocked().

- With this CL:
WM will requests real updated values from DM without any overrides
and will decide whether to apply them or not: if there is no override
in WM - it will apply values from WM, otherwise it will keep the
override. Also it will always update initial display metrics if there
is a real change detected.

Bug: 35258051
Bug: 34164473
Bug: 36518752
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testDisplayResize
Test: #testForceDisplayMetrics
Change-Id: I2495c27797f11f9aaee4ea06648a8ccd29ac5b62
2017-04-03 19:45:14 +00:00
Philip P. Moltmann
91ed33b032 Rename UsbRequest.enqueue to UsbRequest.queue
Fixes: 36850572
Test: CtsVerifier USB device tests on angler
Change-Id: If2a376a8615bf2aa24a6d3a30c7d0a29365f52ea
2017-04-03 11:25:07 -07:00
Narayan Kamath
492e9e851c Properly guard access to CloseGuard in finalizers.
CloseGuard instances are allocated in constructors and usually
assigned to final fields. This implies they're non-null in finalizers
except in the case where the constructor throws. We add a null check
to make sure we can continue cleaning up other state in the finalizer
(if applicable).

Also, this change decouples closeguard warnings in constructors
from other state based logic. This because the logic there is usually
duplicated with the call to close().

NOTE: This change is not a "complete" fix. Many of these finalizers
are broken in the case where <init> throws. The only objective of
this change is to make such errors more obvious.

Note that some of these classes don't have CTS tests.

Test: make, CtsMediaTestCases.
Bug: 35609098

Change-Id: I24d9e0215f80e44914dba8ab99b6312fd6ed1fc0
2017-04-03 18:12:04 +01:00
Tomasz Wasilczyk
9423daf75b Merge "Add opaque vendorExension fields to ProgramInfo and Properties structs." 2017-03-31 15:32:54 +00:00
Tomasz Wasilczyk
6849aa852b Add opaque vendorExension fields to ProgramInfo and Properties structs.
Also pass background scanning capability from jni to java side.

Bug: b/34348946
Test: manual (KitchenSink)
Change-Id: I69905002f972844097d5bea71b929c4967fda705
2017-03-30 16:24:46 -07:00
Tomasz Wasilczyk
5f0fbaef38 Add analog force mode for analog/digital hybrid modes.
Bug: b/32621193
Test: existing VTS pass, none added.
Change-Id: Id8b53bb9881648ae64447cd7b4b3236ec3148f34
2017-03-29 14:21:13 -07:00
Tomasz Wasilczyk
5fb600b1e8 Add digital radio flags to ProgramInfo API.
Bug: b/32621193
Test: manual (KitchenSink)
Change-Id: I24b6beb326d23f456a010699d5ecdf20464ebb78
2017-03-29 09:08:44 -07:00
Tomasz Wasilczyk
2ebd55996a Merge "Add background scan routines and callbacks to broadcast radio API." 2017-03-28 19:55:09 +00:00
Tomasz Wasilczyk
e597ce15b3 Add background scan routines and callbacks to broadcast radio API.
Bug: b/34054813
Test: it builds.
Change-Id: I4483d1034f28af05d869cada672e9c0988bd4b65
2017-03-28 11:19:31 -07:00
TreeHugger Robot
186c0d1d91 Merge "Add RAW_DEPTH image format" 2017-03-28 07:17:11 +00:00
TreeHugger Robot
8ad4a429da Merge "Camera: Send onPrepared callback to all shared surfaces" 2017-03-28 02:10:51 +00:00
TreeHugger Robot
bf4d8d1238 Merge "Prevent inclusion of null KeyphraseMetadata in info map." 2017-03-25 02:50:36 +00:00
Dianne Hackborn
d81542cef4 Merge "Partially return NEW_PICTURE and NEW_VIDEO." 2017-03-24 17:28:59 +00:00
Emilian Peev
f7fec7397e Add RAW_DEPTH image format
- Add support for opaque RAW_DEPTH image format.
- Add support for RAW_DEPTH in ImageReader.

Bug: 36015382
Test: testPDStats
Change-Id: Id77b8e9fb22c2616a938c394c9ddc6c34bfff655
2017-03-24 16:23:35 +00:00
Chris Thornton
d7a7af558b Prevent inclusion of null KeyphraseMetadata in info map.
If getKeyphraseMetadataFromApplicationInfo encountered a parse error, it
would return a null KeyphraseMetadata instance. Other parts of
KeyphraseEnrollmentInfo assume that everything inserted into the member
mKeyphrasePackageMap is valid, so this would cause an NPE.

Bug:33448806
Test: Build a bogus enrollment APK and not see a crash.
Change-Id: I0936439ea4bd0050580a7b0ee8f08f2992ebfd63
2017-03-23 15:32:59 -07:00
Ashutosh Joshi
3ec7c35938 Merge "Fix the maximum value of sensor types" 2017-03-23 21:10:19 +00:00
Shuzhen Wang
e0a6667ee3 Camera: Send onPrepared callback to all shared surfaces
Test: Run testPrepareForSharedSurfaces
Bug: 34522408
Change-Id: I368021598a6212209c7edf00282d2a6f84629b4d
2017-03-23 13:49:04 -07:00
Ashutosh Joshi
cf18953cbf Fix the maximum value of sensor types
Sensors which should have a maximum vector length of 1 were erroneously
being treated as tri-axis sensors.

Bug: 36530209
Test: Ensure that pressure, light, ambient temperature, proximity,
      relative humidity, temperature are reported with maximum
      length of 1.

Change-Id: Iec76a6b8a2c1851300e92b71c46f2f12836fa7bf
2017-03-22 21:25:13 -07:00
TreeHugger Robot
166422317d Merge "Camera: Allow addSurface due to mismatched dataSpace for PRIVATE format" 2017-03-23 02:21:37 +00:00
Michael Wright
7121697a5e BZZZZZZT! BZZZZZT! New Vibrator APIs
Replace the existing Vibrator APIs with a new class to encapsulate the
haptic effect information, and add the ability to control the vibration
strength.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibratorTest
      cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibrationEffectTest
      runtest systemui-notification
      Manual testing with $T/google_experimental/users/michaelwr/Vibrator

Bug: 30961353

Change-Id: Idbb9864a7b084c85e7b7de3257a0e6b40d9d91d6
2017-03-20 16:09:51 +00:00