Commit Graph

2114 Commits

Author SHA1 Message Date
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
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
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
Shuzhen Wang
75d66023c8 Camera: Allow addSurface due to mismatched dataSpace for PRIVATE format
For surface with PRIVATE format, camera device may override the dataSpace.
So do not enforce matching dataSpaces for such surfaces within the same
OutputConfiguration.

Test: Camera CTS
Bug: 33777818
Change-Id: I1374511946c04ab158fa16ed6d596d747d31f385
2017-03-17 14:00:32 -07:00
Tomasz Wasilczyk
3d19f90c32 Merge "Add getProgramList call to the broadcast radio API." 2017-03-17 16:34:55 +00:00
TreeHugger Robot
ffe0bbbf60 Merge "Camera: Enable batching for constrained high speed recording" 2017-03-17 00:32:54 +00:00
Tomasz Wasilczyk
d44b2ea109 Add getProgramList call to the broadcast radio API.
Test: manual test of existing API, no tests for the new one.
Bug: b/34054813
Change-Id: I7fd8c89d1eb9685856a72c9234df6569d20cc2d4
2017-03-14 13:25:30 -07:00
Shuzhen Wang
ae10eb9f7d Camera: Enable batching for constrained high speed recording
For each constrained high speed recording request list, only 1 shutter
notify and 1 capture result are sent from cameraserver to application
process as a power-saving measure.

Once the shutter notify and capture result are passed into application
process, derive individual shutter and result for other requests in the
batch, and send them to application.

Test: Manually test high speed recording with GCA and CTS.
Bug: 35775704
Change-Id: Ie5fa1de6b3b87f1242d6c81770e40ae876991bc3
2017-03-14 12:32:56 -07:00
Andrii Kulian
35fa3c26ad Associate rotation watchers with displays
Displays can be rotated separately and rotation watcher clients
are only interested in rotation of some specific display. This CL
adds displayId to rotation watchers and only informs them about
changes on their display.

Bug: 34242678
Test: Manual and debug.
Change-Id: If0f03804da0392c2b14a4e7c2d6a06068ad8760b
2017-03-13 18:27:24 -07:00
Dianne Hackborn
5da9e9495d Partially return NEW_PICTURE and NEW_VIDEO.
They are again allowed to be dispatched, but now only
to registered receivers.

Test: manual, still need to write CTS

Change-Id: Ib95293d818430129d168cfc0616eb90bef25e5c6
2017-03-10 13:30:42 -08:00
Ashutosh Joshi
521d92bcdf Merge "Fix error in width of nanoAppId" 2017-03-09 19:04:25 +00:00
Ashutosh Joshi
6f64bf0590 Fix error in width of nanoAppId
NanoAppId should not be 32 bits as exposed in some APIs.
Adding new methods to accept a 64 bit nanoAppId and deprecating
the buggy API methods.

Test: Compile build, ensure CHRE applications (eg: geofencing) work.

Change-Id: I08b09ff1b1d23b616214282f200202c99620c300
2017-03-09 11:02:24 -08:00
Lei Yu
18f805e73d Merge "Hook up screen brightness knob to DisplayPowerController." 2017-03-09 04:05:25 +00:00
Donghyun Cho
d5386fd4ef Merge "CEC: Add a method to control standby mode of the device" 2017-03-09 02:06:52 +00:00
Eino-Ville Talvala
4e79fe7db0 Fix API checking for some
Using AIDL constants in the definition of public API static ints seems
to confuse build tools sometimes.  Switch to just duplicating the
constants until that's worked out.

Test: Builds, at least for me!
Change-Id: I0fbe95bc0492eb8b39687f25a6c7e073fbb65dc4
2017-03-08 16:03:47 -08:00
jackqdyulei
92681e8cfb Hook up screen brightness knob to DisplayPowerController.
This knob is designed to effectively tune the battery saver.

Bug: 34693888
Test: FrameworksServicesTests
Change-Id: I9fd7896f59fabd9baf649cdb12f01b1baaf4c34b
2017-03-08 13:15:19 -08:00
TreeHugger Robot
66f53ca937 Merge "Sensor direct report HardwareBuffer implementation" 2017-03-08 03:12:58 +00:00
Peng Xu
7d96fa0b2a Sensor direct report HardwareBuffer implementation
Implemented API for sensor direct channel creating with HardwareBuffer
shared memory. Also, simplified jni code for ashmem shared memory direct
channel.

Bug: 30985702
Test: cts-tradefed run cts --module CtsSensorTestCases
      --test android.hardware.cts.SensorDirectReportTest
Test: cts-tradefed run cts --module CtsSensorTestCases
      --test android.hardware.cts.SensorNativeTest

Change-Id: I067fe21808cf370e4a659fc762131ed3007334a8
2017-03-07 15:47:52 -08:00
Eino-Ville Talvala
49c62f51ba Camera: Add createCustomCameraSession to system API.
This has been requested by various Android implementers as
a way to simplify building new device-specific features for
default camera applications.

Test: The added system API tests pass.
Bug: 34853980
Change-Id: I3190f59394af97c0b0c8e520696d096235d596b9
2017-03-07 10:04:01 -08:00
Eino-Ville Talvala
0e04e910a6 CameraDevice: Add hidden createCustomCaptureSession
This exposes a direct route to selecting the operating mode, instead
of only allowing normal and high-speed modes.

Test: Compiles
Bug: 34853980
Change-Id: Ib4f833399834c9bacb9de666560e909109aa5af9
2017-03-07 10:04:01 -08:00
Donghyun Cho
b3515648fb CEC: Add a method to control standby mode of the device
Bug: 35318128
Test: m -j40
Change-Id: If787f8be5cfd82263e297d53841c1e0dc99c7c80
2017-03-02 16:36:32 +09:00
Bryce Lee
609bf65668 Update DisplayAdjustments in Display from Resources.
Previously, a copy of DisplayAdjustments was provided during Display
construction. If the Display instance is held, the adjustments would
not update. However, the DisplayInfo would, leading to a mismatch.

This changelist adds a reference to the Resources, which can be
queried to provide the latest adjustments.

Fixes: 33430498
Test: manual from bug repro steps.
Test: make -j32 cts; cts-tradefed; run cts --module CtsAppTestCases --test android.app.cts.DisplayTest#testRotation

Change-Id: Ida2ed3990add885d06b011494af24b055343f3fa
2017-02-22 10:27:34 -08:00
TreeHugger Robot
16386302d7 Merge "Camera: Make CameraMetadataNative compile-time initializable" 2017-02-17 23:15:27 +00:00
Romain Guy
172873f5e6 Merge "Add RGBA 10:10:10:2 format for surfaces" 2017-02-17 19:25:08 +00:00
Andreas Gampe
08e6c34cf7 Camera: Make CameraMetadataNative compile-time initializable
Ensure that all static initializer code can be executed in the
compiler. Move native field caching into the native method
registration function.

Saves up to 10ms on N6P zygote initialization.

Bug: 34956610
Test: m
Test: Device boots (N6P)
Test: Can take pictures and videos (N6P)
Change-Id: I481dfd3aa8dc3cc5a5c31eedad31390d8afda897
2017-02-16 17:01:35 -08:00
Eino-Ville Talvala
6f57065bd4 Merge "camera case fail for testSceneModes" am: b59cd66e93 am: a22c40839e am: a494d7287f
am: 6bd164bcd3

Change-Id: I7c3afdccda0b6105f8ef740ea0dc95528fdae91d
2017-02-16 21:57:34 +00:00
Eino-Ville Talvala
6bd164bcd3 Merge "camera case fail for testSceneModes" am: b59cd66e93 am: a22c40839e
am: a494d7287f

Change-Id: I8e7c31b71e1ccfb77d5cb46949e438c2f1e1ef4c
2017-02-16 21:53:23 +00:00
Eino-Ville Talvala
a494d7287f Merge "camera case fail for testSceneModes" am: b59cd66e93
am: a22c40839e

Change-Id: I52fca667fcd8b8ff501bb145ee49934ba47f92a3
2017-02-16 21:48:53 +00:00
Romain Guy
8ec21062de Add RGBA 10:10:10:2 format for surfaces
Bug: 2984164
Test: CtsHardwareTestCases
Change-Id: I4a42cb9002d8f1f1362999f2739d06c712157620
2017-02-15 18:29:50 -08:00
Nick Vaccaro
710a285110 Merge "Sensors: Add LOW_LATENCY_OFFBODY_DETECT sensor API" 2017-02-14 19:21:37 +00:00
Shuzhen Wang
7d0674ceb1 Camera: Update doc to allow unchanged configs in finalizeOutputConfigs
Bug: 35137641
Test: Compile
Change-Id: I671fc13c005eee27c87041dce23c30f40a394443
2017-02-13 14:55:34 -08:00
Shuzhen Wang
476bea8495 Revert "Camera2: Temporarily remove surface size 0 check"
This reverts commit bdabb0f582.
Bug: 35027811
Test: Use camera from hangouts
2017-02-09 13:13:04 -08:00
Charles He
9b734a7c4c Fingerprint: get auth id for non-current user.
am: aae60473e1

Change-Id: I547076caaa27d86d682addc14106a344a1b4cec9
2017-02-07 01:20:42 +00:00
Charles He
aae60473e1 Fingerprint: get auth id for non-current user.
Previously, getAuthenticatorId() simply returns the authenticator id
corresponding to the currently active user in FingerprintService.
However, this can cause bugs when, for example, KeyStore calls the
method before storing a fingerprint-bound key for a non-current user. In
such cases, the authenticator id of the calling user is desired, which
is not necessarily the same as the "current user" in FingerprintService.
This CL ensures the FingerprintService always returns the authenticator
id of the calling user.

Bug: 33459191
Test: manual
Change-Id: Ia9d6b869d16bd37f45358ba839cd12901ebc1076
Merged-In: I35c5a3a7082cffb8941eeaa219c8e20948ad41a9
2017-02-07 01:02:51 +00:00
TreeHugger Robot
f69ffd24b8 Merge "Fingerprint: get auth id for non-current user." 2017-02-07 00:58:17 +00:00
Justin Klaassen
46d3d6d313 Remove experimental twilight-based automatic brightness
am: 614f40ea01

Change-Id: I1b0ec1645f38892adb894900b3b3725fc0b23452
2017-02-06 23:28:27 +00:00
Shuzhen Wang
af4c6ac32f Merge "Camera2: Temporarily remove surface size 0 check" 2017-02-06 22:06:22 +00:00
Shuzhen Wang
bdabb0f582 Camera2: Temporarily remove surface size 0 check
Temporarily remove surface size 0 check for deferred surface.

Test: Manual test of camera use case from Hangouts
Bug: 35027811
Change-Id: If1ecb1b322b9608dafb5784d5d9fb83e3517b8e5
2017-02-06 11:51:25 -08:00
Justin Klaassen
5483cea67a Remove experimental twilight-based automatic brightness
Bug: 31602449
Test: verified adaptive brightness no longer varies with twilight with
"brightness_use_twilight" set to "1".

Change-Id: I6b5f7310020b2128c2b292414a205b6052270a0a
2017-02-06 07:36:55 -08:00
wei zheng dong
5f391188dc camera case fail for testSceneModes
add equals judgement for cts case: android.hardware.camera2.cts.CaptureRequestTest -m testSceneModes
scene-mode (auto) is not single string in some platform, the source is from getCameraCharacteristics
 which contains multiple characters. so previous code == is not correct.

Test: make
Test: run android.hardware.camera2.cts.CaptureRequestTest -m testSceneModes

Change-Id: Ie5ffeeebd0d0c237c80768a4a8217bc04e52a173
2017-02-06 14:36:48 +08:00
Charles He
da88f0e6b8 Fingerprint: get auth id for non-current user.
Previously, getAuthenticatorId() simply returns the authenticator id
corresponding to the currently active user in FingerprintService.
However, this can cause bugs when, for example, KeyStore calls the
method before storing a fingerprint-bound key for a non-current user. In
such cases, the authenticator id of the calling user is desired, which
is not necessarily the same as the "current user" in FingerprintService.
This CL ensures the FingerprintService always returns the authenticator
id of the calling user.

Bug: 33459191
Test: manual
Change-Id: I35c5a3a7082cffb8941eeaa219c8e20948ad41a9
2017-02-04 06:49:08 +00:00