OSDN Git Service

android-x86/device-generic-goldfish.git
6 years agoconfig.ini: change the default settings for OPENTHOS multiwindow-oreo
Chih-Wei Huang [Wed, 27 Sep 2017 10:25:38 +0000 (18:25 +0800)]
config.ini: change the default settings for OPENTHOS

Use the resolution and lcd.density which are more common to the
target hardware of OPENTHOS.

6 years agoAdd android.hidl.base@1.0 to VNDK_SP_LIBRARIES
Chih-Wei Huang [Wed, 27 Sep 2017 10:05:02 +0000 (18:05 +0800)]
Add android.hidl.base@1.0 to VNDK_SP_LIBRARIES

Google SDK image does have it in vndk-sp. Apparently Google forgot to
release the correct list to AOSP.

6 years agoAdd camera HAL and vndk-sp to emu_* targets
Chih-Wei Huang [Wed, 27 Sep 2017 09:15:23 +0000 (17:15 +0800)]
Add camera HAL and vndk-sp to emu_* targets

6 years agooverlay: remove the incorrect webview packages list
Chih-Wei Huang [Wed, 27 Sep 2017 08:45:40 +0000 (16:45 +0800)]
overlay: remove the incorrect webview packages list

The AOSP build should not use com.google.android.* packages. This fixes
the Webview tester crashing.

6 years agogoldfish: get aosp-oreo to boot
bohu [Fri, 8 Sep 2017 07:12:46 +0000 (00:12 -0700)]
goldfish: get aosp-oreo to boot

Change-Id: Ic4678f95690955717ff18a24847e2f907cde28e3

6 years agoMerge cherrypicks of [2454758, 2454859, 2454837, 2454965, 2454984, 2455001, 2454760...
android-build-team Robot [Fri, 23 Jun 2017 20:54:11 +0000 (20:54 +0000)]
Merge cherrypicks of [24547582454859245483724549652454984245500124547602454860245483824548992454970245500524550272454973245500624550612455007245491424549872454974] into oc-release

Change-Id: I553bda5e86663208d37cf5dd37c25a82269f6577

6 years agoBuild power.ranchu and add power hal to manifest.xml
Lingfeng Yang [Mon, 1 May 2017 21:22:45 +0000 (14:22 -0700)]
Build power.ranchu and add power hal to manifest.xml

Bug: 37302997
Bug: 37863919

Test: Build and run sdk_google_aw_x86-userdebug emulator

Change-Id: Id8fc018b005b011426d3e0bc885ee8ef00dec1eb
(cherry picked from commit 4aa73d308e16905c5971d7c7ede464a824ed770a)
(cherry picked from commit 8ac023565943620cb6b1f85c396b0c3661219342)

6 years agoEmulator: update goldfish to 0ff252b9
bohu [Tue, 25 Apr 2017 03:36:25 +0000 (20:36 -0700)]
Emulator: update goldfish to 0ff252b9

Bug: 37302997

Test: Build and run sdk_google_aw_x86-userdebug emulator

To commit
0ff252b95a21998caa20403da724d6d7a0f50174 oc-emu-dev
Author: bohu <bohu@google.com>
Date:   Mon Jun 27 18:23:28 2016 -0700
Enable bugreport service

Change-Id: Ie04a6f7c3a19415b63db5850dc3b9aa0488af555
(cherry picked from commit bceb8ad4f4290b0076a4315644d79cbd1b713a67)
(cherry picked from commit 0319174f8eb0f97cfe27c70d95b91d006ee6c1ce)

6 years agorelease-request-951b3a8b-6c0c-4d2e-8af4-1c3f7e209f66-for-git_oc-release-4006899 snap...
android-build-team Robot [Sun, 14 May 2017 07:20:51 +0000 (07:20 +0000)]
release-request-951b3a8b-6c0c-4d2e-8af4-1c3f7e209f66-for-git_oc-release-4006899 snap-temp-L39600000063784275

Change-Id: I64be9a1a12c29beea62b1b9dec96dbc4a9fae4f0

6 years agoFix the 'flush' function for emulated sensors
Jim Kaye [Thu, 11 May 2017 00:20:42 +0000 (17:20 -0700)]
Fix the 'flush' function for emulated sensors

Flush operations could get lost by being overwritten
if a sensor value arrives before the 'flush' is seen.

This CL prevents overwriting the 'flush' if it hasn't
been accepted.

With this change, all 51 'SensorBatchingTests' pass.

Bug: 37465457

Test: CTS: CtsSensorTestCases android.hardware.cts.SensorBatchingTests

Change-Id: Iabf58ce0868f1470a8aa4b2c2b845dc30ca466cf
(cherry picked from commit 9ca9f56b11340307425ac09a497cde29af025cc6)

7 years agomerge in oc-release history after reset to master
gitbuildkicker [Sun, 26 Mar 2017 07:06:35 +0000 (00:06 -0700)]
merge in oc-release history after reset to master

7 years agoMerge "implemented enumerate method in fingerprintservice fixes bug 35358801 Test...
TreeHugger Robot [Thu, 23 Mar 2017 18:07:04 +0000 (18:07 +0000)]
Merge "implemented enumerate method in fingerprintservice fixes bug 35358801 Test: ran enumeration in template with 1) more fingerprints in fingerprintd 2) more fingerprints in framework 3) no fingerprints in fingerprintd, but fingerprints in framework 4) no fingerprints in framework, but fingerprints in fingerprintd"

7 years agomerge in oc-release history after reset to master
gitbuildkicker [Thu, 23 Mar 2017 04:22:40 +0000 (21:22 -0700)]
merge in oc-release history after reset to master

7 years agomerge in oc-release history after reset to 7165d3b5faf3d7a18bcb48bcb6a1afb863474ad3
gitbuildkicker [Thu, 23 Mar 2017 00:11:10 +0000 (17:11 -0700)]
merge in oc-release history after reset to 7165d3b5faf3d7a18bcb48bcb6a1afb863474ad3

7 years agoMerge "Emulator: start logcat -Q as logd user instead of root" am: 6fc52b4ef9 am...
bohu [Fri, 17 Mar 2017 16:38:26 +0000 (16:38 +0000)]
Merge "Emulator: start logcat -Q as logd user instead of root" am: 6fc52b4ef9 am: e87326d436
am: c09187b8b6

Change-Id: I96b5060b2d3c99891fd57e9256402140df289e50

7 years agoMerge "Emulator: start logcat -Q as logd user instead of root" am: 6fc52b4ef9
bohu [Fri, 17 Mar 2017 16:34:26 +0000 (16:34 +0000)]
Merge "Emulator: start logcat -Q as logd user instead of root" am: 6fc52b4ef9
am: e87326d436

Change-Id: I743c562257294814604807ad46839882bd48712e

7 years agoMerge "Emulator: start logcat -Q as logd user instead of root"
bohu [Fri, 17 Mar 2017 16:30:27 +0000 (16:30 +0000)]
Merge "Emulator: start logcat -Q as logd user instead of root"
am: 6fc52b4ef9

Change-Id: I295dbb08f6595a1c4a255c5e20106c449e00b773

7 years agoMerge "Emulator: start logcat -Q as logd user instead of root"
Treehugger Robot [Fri, 17 Mar 2017 16:23:53 +0000 (16:23 +0000)]
Merge "Emulator: start logcat -Q as logd user instead of root"

7 years agoPassthrough hwcomposer for emulator devices
Joshua Lang [Fri, 8 Apr 2016 01:33:06 +0000 (18:33 -0700)]
Passthrough hwcomposer for emulator devices

Basic hw composer implementation that directs surface flinger to do all
compositing.

Change-Id: I98e39985ae996db74b655cd4f726680f7066b236
(cherry picked from commit 2d87e1074b72acb859e5b37555266d108af748dd)

7 years agoEmulator: start logcat -Q as logd user instead of root
bohu [Tue, 7 Mar 2017 22:10:50 +0000 (14:10 -0800)]
Emulator: start logcat -Q as logd user instead of root

Change-Id: Ibe205141facf0240052aeba82e9b4761ebf5e848

7 years agoMerge "DO NOT MERGE ANYWHERE goldfish: adjust to the refactoring of qemu-pipe" am...
Bo Hu [Thu, 2 Mar 2017 18:14:28 +0000 (18:14 +0000)]
Merge "DO NOT MERGE ANYWHERE goldfish: adjust to the refactoring of qemu-pipe" am: 2ab37f8a72  -s ours am: 1f0a0dfaed  -s ours
am: b5890c5611  -s ours

Change-Id: I5e065ff53e9baf29fc5532eb060caf6efe3bb9e5

7 years agoMerge "DO NOT MERGE ANYWHERE goldfish: adjust to the refactoring of qemu-pipe" am...
Bo Hu [Thu, 2 Mar 2017 18:12:28 +0000 (18:12 +0000)]
Merge "DO NOT MERGE ANYWHERE goldfish: adjust to the refactoring of qemu-pipe" am: 2ab37f8a72  -s ours
am: 1f0a0dfaed  -s ours

Change-Id: I8683ef0456888f77b747144e411f146ee95a25d1

7 years agoMerge "DO NOT MERGE ANYWHERE goldfish: adjust to the refactoring of qemu-pipe"
Bo Hu [Thu, 2 Mar 2017 18:09:29 +0000 (18:09 +0000)]
Merge "DO NOT MERGE ANYWHERE goldfish: adjust to the refactoring of qemu-pipe"
am: 2ab37f8a72  -s ours

Change-Id: I4d7db9f2cd1602ac772f7ca111ca95599a71af67

7 years agoMerge "DO NOT MERGE ANYWHERE goldfish: adjust to the refactoring of qemu-pipe"
Bo Hu [Thu, 2 Mar 2017 18:03:30 +0000 (18:03 +0000)]
Merge "DO NOT MERGE ANYWHERE goldfish: adjust to the refactoring of qemu-pipe"

7 years agoDO NOT MERGE ANYWHERE goldfish: adjust to the refactoring of qemu-pipe
bohu [Tue, 28 Feb 2017 23:56:58 +0000 (15:56 -0800)]
DO NOT MERGE ANYWHERE goldfish: adjust to the refactoring of qemu-pipe

Since qemu-pipe is refactored into system/core/qemu_pipe, the goldfish
devices need to make adjustment accordingly.

Change-Id: Ie459bebf8f9f0c6864fb3e4fbbd64ac1c9bbab7c

7 years agoEmulator: make qemu_pipe_open usage consistent with definition
bohu [Sat, 25 Feb 2017 06:28:14 +0000 (22:28 -0800)]
Emulator: make qemu_pipe_open usage consistent with definition

The qemu_pipe_open(const char* purpose) inside the goldfish/include/qemu_pipe.h
adds 'pipe:' prefix to the purpose string, and the caller should not add that
'pipe:' prefix to avoid double prefixes of 'pipe:'

Note: This definition of qemu_pipe_open is the legacy definition; and it is different
from the new definition in system/core/include/qemu_pipe.h, where the caller should
add the 'pipe:' prefix. AFAIK, this new definition is used in adbd and rild.

goldfish project sticks with legacy definition for ease of cherry picking of fixes
accross different api levels.

Change-Id: I7b61bc1c58d64dcec5129582bd0981a4d534d084

7 years agoEmulator: handle partial read and write in qemu pipe functions
bohu [Fri, 24 Feb 2017 20:55:39 +0000 (12:55 -0800)]
Emulator: handle partial read and write in qemu pipe functions

When partial read or write happens, the services that depend on
qemu pipe will be flaky.

This CL checks for partial read or write, and retries the rest, unless
there is hard failure.

Change-Id: I3ebeee3f57672a8ae07236a7e53e9d0eee09f4fc

7 years agoimplemented enumerate method in fingerprintservice
Kevin Chyn [Tue, 14 Feb 2017 22:32:30 +0000 (14:32 -0800)]
implemented enumerate method in fingerprintservice
fixes bug 35358801
Test: ran enumeration in template with
1) more fingerprints in fingerprintd
2) more fingerprints in framework
3) no fingerprints in fingerprintd, but fingerprints in framework
4) no fingerprints in framework, but fingerprints in fingerprintd

Change-Id: If876ad0867360d1d05d6b12866a529024860d88a

7 years ago[Emulator] Include the "Cell Broadcast Receiver" app
Jim Kaye [Thu, 26 Jan 2017 03:52:32 +0000 (19:52 -0800)]
[Emulator] Include the "Cell Broadcast Receiver" app

The Cell Broadcast Receiver app deal with special notifications
such as AMBER Alerts.

Some CTS Verifier tests check the user's ability to configure this app.

This branch of the CL ensurse that the controls for this app are
exposed in Settings.

BUG: 32504713
Test: Manual and CTS Verifier

(cherry picked from d051a7eb8052237c46e0fa1ff861bbfbabf77fea)

Change-Id: Ibb3c6b6e167e8a15e937492c806e1d3370cb2abd

7 years agoMerge "Support multiple users in emulated devices"
Jim Kaye [Thu, 26 Jan 2017 02:19:32 +0000 (02:19 +0000)]
Merge "Support multiple users in emulated devices"

7 years agoSupport multiple users in emulated devices
Jim Kaye [Wed, 25 Jan 2017 18:43:10 +0000 (10:43 -0800)]
Support multiple users in emulated devices

Enable multi-user support in AVDs. Up to 4 users are allowed.

BUG: 32504505

Test: Manual verification

(cherry picked from commit 9fdf75764946ad20109ca25cff0eaaa6b0acb0be)

Change-Id: I37a5aaa665297e7134d43e832008bea6450a084e

7 years agoMerge "Allow headset plug/unplug in the emulator"
Jim Kaye [Thu, 26 Jan 2017 02:05:55 +0000 (02:05 +0000)]
Merge "Allow headset plug/unplug in the emulator"

7 years agoMerge "Set correct camera orientation for webcams"
Bjoern Johansson [Thu, 26 Jan 2017 00:58:47 +0000 (00:58 +0000)]
Merge "Set correct camera orientation for webcams"

7 years agoPrevent camera moving square from getting stuck
Bjoern Johansson [Thu, 12 Jan 2017 20:42:41 +0000 (12:42 -0800)]
Prevent camera moving square from getting stuck

The square in the emulated camera could get stuck bouncing around along
one edge if the time between two frames took long enough that the next
frame didn't clear the edge entirely. The coordinate for the square
would then remain outside the view and simply be negated once again,
causing it to bounce back immediately. On the next frame it would then
be negated again and so on.

This fixes the issue by correctly updating the relative position on
every bounce to make sure it's on the inside of the edge after the
bounce.

BUG: 34252276
Change-Id: I967fbef70d667e9977aaab9a11d07d7d6e8cd161
(cherry picked from commit 29dd289d7593bb4446b9d13a175a9cb2cfece01b)

7 years agoSet correct camera orientation for webcams
Bjoern Johansson [Wed, 30 Nov 2016 22:17:23 +0000 (14:17 -0800)]
Set correct camera orientation for webcams

This fixes the camera orientation for web cameras. Previously the
orientation would be 270 degrees which means that if you look at the
adjusted preview frame it will be upside down. With this change the
orientation is 90 degrees which means that it will line up with the way
JPEG pictures are generated.

BUG: 33245832
Change-Id: I25b4acbb05be0ac84eae000b96cb6e193b260ffa
(cherry picked from commit 1cc193d879dea74095aaa0bc22ee925d8b772e36)

7 years agoAllow headset plug/unplug in the emulator
Jim Kaye [Sat, 21 Jan 2017 01:22:32 +0000 (17:22 -0800)]
Allow headset plug/unplug in the emulator

Have the goldfish device support WIRED_HEADPHONE and WIRED_HEADSET in
addition to SPEAKER.
Support more audio sample rates.
Set 'useDevInputEventForAudioJack' so we respond to settings from the
emulator.

BUG: http://b/32437768

Test: Required for and covered by CTS Verifier

(cherry picked from commit e5d00ff412de76d1d0146d0aa7fc6243f6d98ffa)

Change-Id: Ic35c38d7169a02bedf19b148703ff4993d1037b4

7 years agoMerge changes from topic 'emu_misc_fixes'
Joshua Lang [Mon, 23 Jan 2017 19:33:12 +0000 (19:33 +0000)]
Merge changes from topic 'emu_misc_fixes'

* changes:
  Mount debugfs /sys/kernel/debug with 755 permissions
  Re-initialize emulated camera settings on cleanup

7 years ago[goldfish] Fix flaky LTE
Lingfeng Yang [Sat, 21 Jan 2017 03:01:00 +0000 (19:01 -0800)]
[goldfish] Fix flaky LTE

Change-Id: Ie7f9540d3f0bea700a542fd8d5b22e86fc6ec0f5

7 years agoMerge changes from topic 'emu_audio_fixes'
Joshua Lang [Fri, 20 Jan 2017 21:33:59 +0000 (21:33 +0000)]
Merge changes from topic 'emu_audio_fixes'

* changes:
  Increase audio input buffer sizes
  Fix audio input channel verification
  Reduce audio buffer sizes
  Rearrange audio locking on standby
  Fix audio mem corruption on stereo-mono conversion
  Fix for dropped output audio frames
  Offload goldfish audio device read/writes
  Enable audio channels and set default volume
  Adding get_presentation_position to gf audio
  Add required audio playback configurations
  Fix gf audio to return success when setting params
  Reduce period size to improve audio stuttering
  Fix audio output period size and buffer size
  Adding goldfish specific audio_policy.conf
  Add tinyalsa goldfish audio device
  Deprecating old golfish_audio HAL

7 years ago[goldfish-sensors] Sanitize v1.3 sensor settings
Lingfeng Yang [Fri, 20 Jan 2017 07:40:20 +0000 (23:40 -0800)]
[goldfish-sensors] Sanitize v1.3 sensor settings

- Stop specifying maxDelay twice
- Set on-change for sensors that should take that setting.

Change-Id: I3d6ac101579de632a7ed11f24ab9013f1cf06e1e

7 years ago[goldfish] update goldfish for O
Lingfeng Yang [Thu, 19 Jan 2017 23:53:05 +0000 (15:53 -0800)]
[goldfish] update goldfish for O

1. use latest qemu_pipe / qemd header combos
2. self contain them in goldfish/ so we don't break
anything that doesn't use goldfish but uses qemu pipe
3. stahp building the "vibrator" device for now since it uses
a lotof legacy stuff that is delted in O
4. upgrade sensor HAL impl to version 1.3

bug: 34465648

after this, rotation and camera work at least

Change-Id: I6157ede893d720acf4f8fcbe42db68a911cad531

7 years agoIncrease audio input buffer sizes
Joshua Lang [Wed, 21 Dec 2016 20:25:02 +0000 (12:25 -0800)]
Increase audio input buffer sizes

Audio input was distorted at the small buffer size.

Test: Record audio and playback
Change-Id: Iff92957a4452aea69238cc2cdb39c7e8a95fc799
(cherry picked from commit 037f564660877780b64151e0bbd05ce6735d5985)

7 years agoFix audio input channel verification
Joshua Lang [Wed, 21 Dec 2016 20:23:03 +0000 (12:23 -0800)]
Fix audio input channel verification

Channel mask verification bug caused wrong channel count to be
selected.

Test: Run CtsMedia module
Change-Id: I2275511a136bfc61bdf57a09ae800a37b145e948

7 years agoReduce audio buffer sizes
Joshua Lang [Thu, 17 Nov 2016 10:00:37 +0000 (02:00 -0800)]
Reduce audio buffer sizes

Reduce input stream buffer size to accommodate tests
Set output stream buffer size in terms of ms to match input buffer

Test: CtsMediaTestCases android.media.cts.AudioRecordTest#testTimestamp
Bug: 31648354
Change-Id: Ifba7773cf48bfe985be955e0911b15dc85ec9b54
(cherry picked from commit 6b8a4352230ca15aa859d532f0d5eb967ad02985)

7 years agoRearrange audio locking on standby
Joshua Lang [Tue, 15 Nov 2016 01:17:56 +0000 (17:17 -0800)]
Rearrange audio locking on standby

Test: Run CtsMedia module
Change-Id: I8947f8a84047101748df93b12d2b20651225b83a
(cherry picked from commit a7444150fec00213b73c69a59c0472f6217d7e48)

7 years agoFix audio mem corruption on stereo-mono conversion
Joshua Lang [Tue, 15 Nov 2016 01:16:10 +0000 (17:16 -0800)]
Fix audio mem corruption on stereo-mono conversion

Test: Run CtsMedia module and look for audioflinger crashes
Bug: 31648354
Change-Id: Ia7594bca0fbb495f83e9dd4ace170c9cdf87df52
(cherry picked from commit a3381f3117bfc112d50e278c38a8b97562a621c6)

7 years agoFix for dropped output audio frames
Joshua Lang [Sun, 6 Nov 2016 02:01:43 +0000 (19:01 -0700)]
Fix for dropped output audio frames

On every standby, some audio frames were being dropped causing the
presentation frame count to slowly drift from the written frames.

Test: Run CtsMedia module repeatedly
Bug: 31648354
Change-Id: I1075ffaad4e1baec7fdc7ebdcc9391fbb6945d28
(cherry picked from commit 818cfde6a65e7a212486092dbbcbb6f0b8de8cce)

7 years agoOffload goldfish audio device read/writes
Joshua Lang [Thu, 6 Oct 2016 00:49:55 +0000 (17:49 -0700)]
Offload goldfish audio device read/writes

Offload pcm read/write to worker threads as these accesses sometimes get
blocked by the host for longer than 30 ms. Whenever there is a lack of
data during recording or buffer space for playback, the audio data and
time duration is faked to simulate a smooth audio device.

Test: Run CtsMedia module
Bug:31648354
Change-Id: I323fdfcb8b273ac606021c10315a7a9f1d4027a6

7 years agoEnable audio channels and set default volume
Joshua Lang [Wed, 2 Nov 2016 21:29:21 +0000 (14:29 -0700)]
Enable audio channels and set default volume

This fixes the audio device being muted by default.

Test: Boot emulator and check audio is not muted
Change-Id: Ied6b02910dcb23fdebd3b8a1e3f8ec23d2d78ff1

7 years agoAdding get_presentation_position to gf audio
Joshua Lang [Fri, 30 Sep 2016 21:16:56 +0000 (14:16 -0700)]
Adding get_presentation_position to gf audio

Cts tests require keeping track of audio presentation position at
various playback rates.

Added playback rates to match required 6.0 CDD document.

Added get_presentation_position which simulates a playback rate.

Test: Run CtsMedia module
Bug: 31648354
Change-Id: I688c9db784a5ebbd9a790df38f5d07ca7ac24572

7 years agoAdd required audio playback configurations
Joshua Lang [Fri, 30 Sep 2016 21:14:57 +0000 (14:14 -0700)]
Add required audio playback configurations

Adding required audio playback rates according to 6.0 CDD.

Test: Try to generate audio tracks at various rates
Bug: 31648354
Change-Id: I90271b9ffa15ccd89a77f149df888b9a71d4c676

7 years agoFix gf audio to return success when setting params
Joshua Lang [Tue, 27 Sep 2016 19:36:41 +0000 (12:36 -0700)]
Fix gf audio to return success when setting params

CTS tests failing caused by being unable to create audio patches caused
by audio device not returning success status when setting parameters

Test: Run CtsMedia module
Bug:31648354
Change-Id: I40acf834afc694faa7514dc9b1f83bffc0f118ee

7 years agoReduce period size to improve audio stuttering
Joshua Lang [Tue, 2 Aug 2016 22:05:31 +0000 (15:05 -0700)]
Reduce period size to improve audio stuttering

Test: Listen to audio
Change-Id: Ic16dbb56c6fdd320126db08580eb24b18316f3dc
(cherry picked from commit ed9c5643996f2973d9aad5f9fc371d51fb3d4188)

7 years agoFix audio output period size and buffer size
Joshua Lang [Mon, 1 Aug 2016 23:36:44 +0000 (16:36 -0700)]
Fix audio output period size and buffer size

Previous values were causing many test failures due to increased audio latency
and incorrect buffer sizing.

Test: Run cts audio playback tests
Change-Id: If68449bbbca0ef219b44401192fa5d22a6c45413
(cherry picked from commit 0cc9aef3408231a7d5cec47879f2fe65102d9441)

7 years agoAdding goldfish specific audio_policy.conf
Joshua Lang [Mon, 25 Jul 2016 23:09:57 +0000 (16:09 -0700)]
Adding goldfish specific audio_policy.conf

Test: Builds
Change-Id: I4c94401198d11303b858d7b58001f3ab23c692bd
(cherry picked from commit f8c2f82716b285da79e420ab6caa5b9712e39acc)

7 years agoAdd tinyalsa goldfish audio device
Joshua Lang [Sat, 23 Jul 2016 01:20:02 +0000 (18:20 -0700)]
Add tinyalsa goldfish audio device

This is a basic implementation of a tinyhal audio hal.
It reduces the restrictions on audio input to rates/formats described by 6.0 CDD.
It keeps legacy audio output restrictions: 44.1khz, stereo, 16 bit.

Fallback to legacy audio device when alsa device not detected.

Test: Boot emulator and test audio with kernel supporting both alsa and
legacy audio device
Change-Id: Ia2c92fc5f4858dcd007159d14c76b81d18a7b605
(cherry picked from commit b002dd7726d2003d3294e026d61af90dc30f8efb)

7 years agoDeprecating old golfish_audio HAL
Joshua Lang [Sat, 23 Jul 2016 01:18:11 +0000 (18:18 -0700)]
Deprecating old golfish_audio HAL

Moving to _legacy to use as fallback.

Test: Boot emulator kernel built with old goldfish_audio device
Change-Id: Ia2519589a3c6baf28a8b84eb4a8c6bcfe4a59d08
(cherry picked from commit 7c87461bf6f9dc1c211c33d241a0117c690ff5df)

7 years agoAdd Input Device Configuration for rotary input. am: 3aee924475 am: a565e29dae
Nimrod Gileadi [Wed, 18 Jan 2017 18:56:00 +0000 (18:56 +0000)]
Add Input Device Configuration for rotary input. am: 3aee924475 am: a565e29dae
am: 78c8c0485d

Change-Id: Idf369b9c0ac58f620008b3e5de6dc61cd8a8d2bc

7 years agoAdd Input Device Configuration for rotary input. am: 3aee924475
Nimrod Gileadi [Wed, 18 Jan 2017 18:18:27 +0000 (18:18 +0000)]
Add Input Device Configuration for rotary input. am: 3aee924475
am: a565e29dae

Change-Id: Id855d9c58b2d4b70d2b80d927f8e544e0e517172

7 years agoAdd Input Device Configuration for rotary input. am: 3aee924475 am: a9603177be
Nimrod Gileadi [Wed, 18 Jan 2017 17:06:17 +0000 (17:06 +0000)]
Add Input Device Configuration for rotary input. am: 3aee924475 am: a9603177be
am: 8d458eeead

Change-Id: Ie296f750e435e0f9698065cc35240964cda5e6d8

7 years agoAdd Input Device Configuration for rotary input. am: 3aee924475
Nimrod Gileadi [Wed, 18 Jan 2017 16:59:47 +0000 (16:59 +0000)]
Add Input Device Configuration for rotary input. am: 3aee924475
am: a9603177be

Change-Id: I4b699f08c4d67ea3859789803e0fa282b36d066c

7 years agoAdd Input Device Configuration for rotary input.
Nimrod Gileadi [Wed, 18 Jan 2017 16:53:17 +0000 (16:53 +0000)]
Add Input Device Configuration for rotary input.
am: 3aee924475

Change-Id: I990b0b9c996ab94b509c62fd0348ec7a122f2e6a

7 years agoAdd Input Device Configuration for rotary input.
Nimrod Gileadi [Wed, 18 Jan 2017 16:53:17 +0000 (16:53 +0000)]
Add Input Device Configuration for rotary input.
am: 3aee924475

Change-Id: Ibf3469f38e28edbdf909d5f786e671dd7b8da5b6

7 years agoAdd Input Device Configuration for rotary input.
Nimrod Gileadi [Tue, 17 Jan 2017 18:02:31 +0000 (18:02 +0000)]
Add Input Device Configuration for rotary input.

This file adjusts InputReader's response to rotary input.

The rotary input driver is added to the qemu kernel in
http://r.android.com/321420

Rotary input events are added to the emulator in
http://r.android.com/312364

Bug: 33292948
Change-Id: I8d311dcd3ccaa06283e5ac51c70f7ea12ce9ca50

7 years agoLauncher3: add default wallpaper picker
bohu [Tue, 17 Jan 2017 16:41:16 +0000 (08:41 -0800)]
Launcher3: add default wallpaper picker

Launcher3 has a bug in choosing the appropriate wallpaper picker,
give it a default one to workaround.

BUG: 34277051
Change-Id: I58a744e98f5f2ed85e9cfeef3f7692a4615c980f

7 years agoAdd /dev/goldfish_sync to ueventd.ranchu.rc am: b4e6cf1a59 am: a4e238a6d2
Lingfeng Yang [Tue, 17 Jan 2017 01:13:27 +0000 (01:13 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc am: b4e6cf1a59 am: a4e238a6d2
am: c321338a65

Change-Id: If724c4b016cffca02d814ea1846945e4b70db74a

7 years agoAdd /dev/goldfish_sync to ueventd.ranchu.rc am: b4e6cf1a59 am: 6a68330757
Lingfeng Yang [Tue, 17 Jan 2017 01:12:56 +0000 (01:12 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc am: b4e6cf1a59 am: 6a68330757
am: 10d2891b14

Change-Id: I8e41e52217bdc6c40b826b25fd53205d45103333

7 years agoAdd /dev/goldfish_sync to ueventd.ranchu.rc am: b4e6cf1a59
Lingfeng Yang [Tue, 17 Jan 2017 00:51:26 +0000 (00:51 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc am: b4e6cf1a59
am: a4e238a6d2

Change-Id: Ia23cc4654b411bfd2ae5797904eceef4a7b4b4df

7 years agoAdd /dev/goldfish_sync to ueventd.ranchu.rc am: b4e6cf1a59
Lingfeng Yang [Tue, 17 Jan 2017 00:50:23 +0000 (00:50 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc am: b4e6cf1a59
am: 6a68330757

Change-Id: I42fd4714cab3932ed7426b810c11df9dfdffc213

7 years agoAdd /dev/goldfish_sync to ueventd.ranchu.rc
Lingfeng Yang [Tue, 17 Jan 2017 00:45:24 +0000 (00:45 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc
am: b4e6cf1a59

Change-Id: Ia621a20e20414422cdb245d2865032efcd707d21

7 years agoAdd /dev/goldfish_sync to ueventd.ranchu.rc
Lingfeng Yang [Tue, 17 Jan 2017 00:45:23 +0000 (00:45 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc
am: b4e6cf1a59

Change-Id: I7ce104a8b2a8837e0144cbe6f33ceeff70d58118

7 years agoAdd /dev/goldfish_sync to ueventd.ranchu.rc
Lingfeng Yang [Mon, 18 Jul 2016 19:52:34 +0000 (12:52 -0700)]
Add /dev/goldfish_sync to ueventd.ranchu.rc

Change-Id: I7855f2f8b535310e59a5f2ffa0f00ee78e475d66
(cherry picked from commit 550585135a1a82283a0484f48a16a78c990508bc)

7 years agoMerge changes from topic 'camera_cps'
Bjoern Johansson [Thu, 12 Jan 2017 16:35:03 +0000 (16:35 +0000)]
Merge changes from topic 'camera_cps'

* changes:
  Strip alignment bytes for camera video frames
  Set Emulated camera's view angles based on Logitech webcam
  Use YU12 instead of YV12 for camera video frames
  Start video on request even without recording hint
  Fix camera incorrectly using YU12 instead of YV12
  Make fake camera frames resolution independent
  Set correct EXIF picture size in camera pictures
  Fix format of camera preview FPS range parameter
  Use correct pixel format for camera videos
  Prevent camera deadlocks when taking pictures
  Filter out invalid webcam resolutions for camera
  Separate camera frame production and delivery
  Consolidate camera preview enabled checks
  Only restart camera preview if it's running
  Forget camera preview window on preview disabled
  Respond to camera auto-focus requests
  Correct camera YV12 format usage
  Restart camera preview on pixel format change
  Set default values for supported camera parameters
  Set a preferred video preview size for camera
  Restart camera preview on preview size change
  Add thumbnails to camera pictures
  Fix build for EXIF processing on 64-bit platforms
  Attach EXIF data to images from camera
  CTS: Camera: set supported effects
  CTS camera: Set camrecorder framerate to 24
  Emulator: wait for qemu-props to finish
  Emulator: Set supported antibanding values for emulated camera
  Verify preview size parameters in emulated camera
  Verify focus mode and distances in emulated camera
  Reject face detection commands in emulated camera
  Update media_codecs_performance.xml
  Port Emulator camera and location CTS fixes from mnc-emu-dev
  emulator: set max-video-encoder-input-buffers value in media_codecs.xml

7 years agoMerge "Emulator: add overlay for goldfish device"
Weilun Du [Thu, 12 Jan 2017 02:10:53 +0000 (02:10 +0000)]
Merge "Emulator: add overlay for goldfish device"

7 years agoStrip alignment bytes for camera video frames
Bjoern Johansson [Tue, 6 Dec 2016 19:08:09 +0000 (11:08 -0800)]
Strip alignment bytes for camera video frames

The encoder path in the emulator images do not expect any kind of
padding for YUV frames. After changing the emulator to correctly pass a
planar YUV format instead of a semiplanar format the encoding path
started breaking for resolutions with padding. This is because the
planar formats used by the camera had alignment padding. Since the video
encoding path is internal to the framework it's safe to use whatever
format works best. This change strips out any padding bytes used for
alignment for video frames, allowing the affected tests to pass.

BUG: 33382525
Test: ran camera CTS tests
Change-Id: I75cef46b03b90da13d91945cda8e2d2972df2f55
(cherry picked from commit 82a66bd172613835976e714d33fffa82412c88d6)

7 years agoSet Emulated camera's view angles based on Logitech webcam
Jim Kaye [Thu, 1 Dec 2016 01:13:50 +0000 (17:13 -0800)]
Set Emulated camera's view angles based on Logitech webcam

Use values based on a Logitech B910 HD Webcam:

  Focal length: 4.90 mm (from specs)
  Horizontal view angle: 61 degrees for 4:3 sizes, 70 degrees
      for 16:9 sizes (empirical)
  Vertical view angle: 45.8 degrees (= 61 * 3 / 4)

BUG: 33269957

Test: ran camera CTS tests
Change-Id: I84a2ead84f298ae55ade87e570131c2c53070d1e
(cherry picked from commit a49a912125c02f213bc96f7bc82bc818be58df5d)

7 years agoUse YU12 instead of YV12 for camera video frames
Bjoern Johansson [Fri, 18 Nov 2016 20:28:12 +0000 (12:28 -0800)]
Use YU12 instead of YV12 for camera video frames

The camera parameters API only supports formats where Y, U and V
components are in the YVU order, such as YV12 or NV21. Unfortunately the
software encoders that the emulator images use to encode video only
support YUV order. This presents a configuration problem as there is no
way to straight up match these. The CameraSource class in stagefright
that configures the encoder to match the camera settings actually
converts the YV12 setting to YU12 which leads to U and V components
being swapped. This caused problems as soon as we fixed the issue where
we were actually treating YV12 as YU12.

Fortunately it turns out that the data provided in the timestamped data
callback can be pretty much whatever format that the camera and the
encoder can agree upon. The settings and frames are only available
internally so it's mostly an implementation detail. This allows us to
generate YV12 frames and then convert them to YU12 before passing them
to the timestamped data callback. The regular data callback will still
receive YV12 frames, just like the caller asked for, but the encoder
will receive frames in a YU12 format that it will handle properly.

YU12 is the format of choice for video recording because the software
encoders do not seem to require extra conversion steps for this. As a
bonus the conversion from YV12 to YU12 is very cheap in this case. We
always had to copy memory, the only difference now is that we copy each
Y, U and V plane separately and just switch the order of the U and V
planes.

In more modern version of the camera HAL the camera does not provide raw
byte buffers like this but instead it feeds frames into a gralloc buffer
queue. This way the camera has a lot more flexibility in what formats it
can use and the encoders can also support YVU formats. So when we switch
to a new HAL version we shouldn't have to deal with this anymore.

BUG: 32771006
Test: ran camera CTS tests
Change-Id: Ic05c1f816dbb09d027f08dea59095a935716309c
(cherry picked from commit d7506ee34e9ccda8a8c7866706b8a2b897e842d7)

7 years agoStart video on request even without recording hint
Bjoern Johansson [Fri, 18 Nov 2016 20:21:30 +0000 (12:21 -0800)]
Start video on request even without recording hint

The camera parameter API contains a recording hint that we used to
determine if video recording was to be enabled or not. Unfortunately not
all clients use the recording hint so we cannot rely solely on that.
Luckily the camera is explicitly told when recording should start. This
change uses that mechanism to determine if we need to restart frame
delivery with a new pixel format or frame size because they might have
changed to something different than what the preview is using.

BUG: 32771006
Test: ran camera CTS tests
Change-Id: I0e0aac4915aa97d0cba71a4b652e6e2a68da7b6e
(cherry picked from commit 7705b5d1c27b8c4bb4865b1defcb160b0e1eecef)

7 years agoFix camera incorrectly using YU12 instead of YV12
Bjoern Johansson [Thu, 27 Oct 2016 23:27:07 +0000 (16:27 -0700)]
Fix camera incorrectly using YU12 instead of YV12

The pixel formats provided to the emulated camera are translated from
the camera parameter string value to a fourcc code. This translation was
incorrect for YV12, instead the camera interpreted it as YU12. This
caused the U and V components to be switched, altering the color of
images received when requesting YV12. This change makes sure that the
correct pixel format is used.

BUG: 32489697
Test: ran camera CTS tests
Change-Id: I65c908873631d58248fea6abad440125a91ac850
(cherry picked from commit 13650c14d59c7bd0247bb26e7e2599832581cc2d)

7 years agoMake fake camera frames resolution independent
Bjoern Johansson [Fri, 7 Oct 2016 18:25:00 +0000 (11:25 -0700)]
Make fake camera frames resolution independent

Make the generation of the checkerboard frames resolution independent
so that the frames look the same after changing resolution. This allows
seamless switches between resolutions without any noticable differences.
This change also modifies the animation of the moving square so that it
now bounces off the edges of the frame instead of a 255x255 invisible
square. This is to ensure that the square ends up in a place that does
not depend on a fixed pixel location. Instead it will appear in a
similar location regardless of resolution. This satisfies a newly added
test in the N CTS tests that will compare preview frames at certain
resolutions with the JPEG created when taking a picture.

BUG: 31913409
Test: ran camera CTS tests
Change-Id: I12fc47aaf3ed678383b70d6e91060e05aaf41452
(cherry picked from commit 1ac0584457f60b314a90fa6233c52c0d8ebb1ade)

7 years agoSet correct EXIF picture size in camera pictures
Bjoern Johansson [Mon, 3 Oct 2016 21:58:51 +0000 (14:58 -0700)]
Set correct EXIF picture size in camera pictures

The EXIF data created by the camera had pixel dimensions set to zero by
default. Newer versions of the camera app requires that these dimensions
are non-zero. This change updates the default values to match the
picture dimensions. In order to update a value this change also removes
an entry if it already exists and then recreates it.. This is to make it
easier to update tags without having to reallocate memory.

Test: ran camera CTS tests
Change-Id: If2d1b9714fe16d55f4d2a68e2cd6927d1d4866f6
(cherry picked from commit 7ef96014694a23e2d117544f2cca19a8b7ac0e01)

7 years agoFix format of camera preview FPS range parameter
Bjoern Johansson [Mon, 3 Oct 2016 22:07:36 +0000 (15:07 -0700)]
Fix format of camera preview FPS range parameter

The parameter for the preview FPS range contains two integers separated
by a comma. In the existing code the two integers were placed inside
parentheses which matches the list of support preview FPS ranges. It
seems however that this is not valid, the parentheses only exist in the
list of supported ranges so that treating it as a list becomes easier.
Newer versions of the Camera app relies on this parameter having the
correct format as does the getPreviewFpsRange method in the
CameraParameters class.

Test: ran camera CTS tests
Change-Id: If95fb0f2db2116a9c6452ac78da8f5fa077ee602
(cherry picked from commit 887d8c6b8ff6d037cc652fe59f4c160fa6de0d46)

7 years agoUse correct pixel format for camera videos
Bjoern Johansson [Tue, 27 Sep 2016 23:59:39 +0000 (16:59 -0700)]
Use correct pixel format for camera videos

A previous change removed code that would use the video pixel format if
video recording was enabled. This change was made because it didn't seem
to have any effect and it was causing problems because the code could
not reliably detect when recording was enabled. It turns out the video
pixel format is important and that the reason it was causing problems
was because the recording hint parameter was not properly reset and did
not cause preview restarts when needed. This change makes sure to use
the correct pixel format and correctly handles the recording hint
parameter.

Test: ran camera CTS tests
Change-Id: I7466a750f799c89a2933ccd712386fe6380c01d7
(cherry picked from commit 61cad039974014f0c6f29abe4b3519741c36074d)

7 years agoPrevent camera deadlocks when taking pictures
Bjoern Johansson [Tue, 27 Sep 2016 18:05:15 +0000 (11:05 -0700)]
Prevent camera deadlocks when taking pictures

The camera in the emulator would sometimes end up in a deadlock when
taking pictuers. This happened because the request to take a picture
could be blocked on waiting for the frame delivery thread to end. But
the frame delivery thread was waiting to acquire a lock in the image
delivery callback, a lock that was held by the take picture call in the
camera client. This change changes the synchronous take picture call
into an asynchronous request. The take picture functionality is moved to
the same thread that delivers frames which ensures that all callbacks to
the camera client happen from the same thread.

BUG: 31599348
Test: ran camera CTS tests
Change-Id: Ib8d3a6c04e7e9bf7f297e1aafcd73d7f2e629132
(cherry picked from commit 31466a4d2304d5097e70d6437c7bd7c8b08d961b)

7 years agoFilter out invalid webcam resolutions for camera
Bjoern Johansson [Tue, 20 Sep 2016 22:44:15 +0000 (15:44 -0700)]
Filter out invalid webcam resolutions for camera

To be able to use camera API v2 even with cameras that only implement
API v1 there is a wrapper in the Android framework. This wrapper
attempts to figure out the camera sensor size by looking at the
resolution with the highest area. Any attempt to use a resolution with a
width or height exceeding the width or height of the sensor size is
rejected. Since the emulator will filter out higher resolutions this
means that this is not a reliable way to determine the sensor size. In
order to work around this the camera will now filter out resolutions
that do not meet the criteria of the framework wrapper. This code is
placed in the guest since that where the check occurs, if we switch to
API v2 or the framework changes the guest camera code can change with it
without creating a dependency between the emulator and the image.

BUG: 30034008
Test: ran camera CTS tests
Change-Id: Iea85ae99031b49e669181c7a5626f7a8aab22353
(cherry picked from commit f96a76aa99eb449631e58e701103e7b4d7721816)

7 years agoSeparate camera frame production and delivery
Bjoern Johansson [Mon, 19 Sep 2016 22:49:24 +0000 (15:49 -0700)]
Separate camera frame production and delivery

Separate the production and delivery of camera frames into two separate
worker threads. The previous implementation did both at once and did not
take time taken for production and delivery into account when sleeping
between frames. Decoupling production and delivery allows the camera to
always deliver frames on time even if production can't keep up. The same
frame might be delivered more than once but performance testing
has not yet shown that this is happening. This also adjusts the sleeping
strategy in between frames to take the delivery or production time into
consideration. The goal is to deliver frames with very little deviation
from the configured frame rate.

BUG: 30034008
Test: ran camera CTS tests
Change-Id: I01d9c07795993e79c475249d87d9da32d7d14256
(cherry picked from commit c5f193548f3461a41b80b9720d66836e20b0999a)

7 years agoConsolidate camera preview enabled checks
Bjoern Johansson [Thu, 8 Sep 2016 18:01:03 +0000 (11:01 -0700)]
Consolidate camera preview enabled checks

A previous patch introduced a boolean to keep track of whether the
camera preview was running or not. Such a mechanism already existed in
the preview window class. This removes the boolean in favor of using the
older mechanism instead.

Test: ran camera CTS tests
Change-Id: Id62003c9596edf53d702c080455cf940524d4877
(cherry picked from commit 804fb7575829203017638401c93c987c11b1e120)

7 years agoOnly restart camera preview if it's running
Bjoern Johansson [Thu, 8 Sep 2016 17:56:42 +0000 (10:56 -0700)]
Only restart camera preview if it's running

Previously the camera preview would be restarted even if it wasn't
running. The end result of that was that the camera preview would be
started simply by changing parameters. This caused problems because the
camera client had not set everything up yet.

Test: ran camera CTS tests
Change-Id: I5b3356d1ee952a2b2a88a24072172d8069140461
(cherry picked from commit 9067964fd899de66e0be77b75332c76b852b4da3)

7 years agoForget camera preview window on preview disabled
Bjoern Johansson [Fri, 2 Sep 2016 21:21:24 +0000 (14:21 -0700)]
Forget camera preview window on preview disabled

The camera client does not informat the HAL that a preview window has
been destroyed unless the preview is running. This means that the
preview window can be destroyed and then later on when preview is
enabled the HAL will attempt to use a destroyed window. This fixes that
by setting the preview window pointer to NULL whenever previews stop.
The client will then set the preview window to use once it has enabled
preview again and that new window will be used.

BUG: 30034008

Test: ran camera CTS tests
Change-Id: I3b372d8e3d9732e87d05535867a1f67eba9e3170
(cherry picked from commit 1d812bda533463a7781589134cba834576ef9958)

7 years agoRespond to camera auto-focus requests
Bjoern Johansson [Thu, 1 Sep 2016 18:34:46 +0000 (11:34 -0700)]
Respond to camera auto-focus requests

Even though the emulated cameras do not support auto-focus they are
required to respond to auto-focus commands. They should immediately
signal a successful auto-focus complete event to the client. This change
implements this behavior by setting a flag that is inspected as long as
the worker thread that generates preview frames is running. This is safe
since the documentation mentions that the camera must be in preview mode
for the auto-focus request to work.

BUG: 30700822
Test: ran camera CTS tests
Change-Id: I2be24c734255bba2dcb55a73b84b49f7ee3e2232
(cherry picked from commit 01089051c75ff1e00476191614911f6046862fb3)

7 years agoCorrect camera YV12 format usage
Bjoern Johansson [Wed, 31 Aug 2016 00:18:39 +0000 (17:18 -0700)]
Correct camera YV12 format usage

The camera code incorrectly generated and decoded YV12 encoded images.
The format requires that row strides are aligned to 16 bytes which
introduces padding at some of the resolution that the camera supports,
most notably 176x144 where half of 176 is not divisible by 16. The width
is halved because the U and V components each cover 2x2 pixel blocks so
the effective width of each row is 88 pixels, this has to be padded to 96
bytes. This change ensures that the images generated by the fake camera
have the required alignment and also that decoding the YV12 images to RGB
for the preview window correctly takes the alignment into consideration.

BUG: 30700822
Test: ran camera CTS tests
Change-Id: I16590551af59c730c0c8b024dbaee40f5c8e9ab2
(cherry picked from commit ddeced00136c1299dfca1ea5066f23b5ada2a142)

7 years agoRestart camera preview on pixel format change
Bjoern Johansson [Tue, 30 Aug 2016 16:26:27 +0000 (09:26 -0700)]
Restart camera preview on pixel format change

Make sure the camera preview is restarted if the preview pixel format
changes. Otherwise preview frames will be delivered with the wrong
format. In addition to this also make sure that the camera only cares
about the preview pixel format, not the video pixel format. The video
pixel format parameter key is not even exposed in the higher level APIs
and CTS tests do not seem to exercise this setting, it seems to be an
unused parameter.

BUG: 30700822
Test: ran camera CTS tests
Change-Id: Ife3ad70ab8fe2f1f834a057bdbf5558f684ec7df
(cherry picked from commit f4455dcc522ed67052e911e245eef7927e76b8f2)

7 years agoSet default values for supported camera parameters
Bjoern Johansson [Thu, 25 Aug 2016 21:15:48 +0000 (14:15 -0700)]
Set default values for supported camera parameters

CTS requires that values which we indicate support for also have a
default value. In this cause anti-banding and effects had entries
indicating what values were supported but no value was set when querying
for the current value. This change sets reasonable defaults for these
values.

BUG: 30700822
Test: ran camera CTS tests
Change-Id: I855b9bf84a1545c169412d8ea56e3ebb3bdcf136
(cherry picked from commit 765503a76856609705e7222a165a5739055e9d24)

7 years agoSet a preferred video preview size for camera
Bjoern Johansson [Thu, 25 Aug 2016 19:49:57 +0000 (12:49 -0700)]
Set a preferred video preview size for camera

CTS requires that a preferred video preview size is set if video
previews are supported.

BUG: 30700822
Test: ran camera CTS tests
Change-Id: I52cc96c6745330e4609f925ca8087167523880db
(cherry picked from commit a3a7b67621d89e651ff08596586815296bc3b548)

7 years agoRestart camera preview on preview size change
Bjoern Johansson [Thu, 25 Aug 2016 19:24:56 +0000 (12:24 -0700)]
Restart camera preview on preview size change

Whenever the camera preview or video size changes the preview must be
restarted to ensure that the camera supplies correctly sized frames to
the camera client. In some instances the client will not validate buffer
sizes and will write into a buffer that's either too small or too large,
potentially causing data corruption or crashes.

BUG: 30700822
Test: ran camera CTS tests
Change-Id: Ie2e7726c05be1f39463654f1b8af6216d4b4cd9d
(cherry picked from commit 68d799a4c615be7a428d23fa7fa3137ae87340b9)

7 years agoAdd thumbnails to camera pictures
Bjoern Johansson [Mon, 22 Aug 2016 23:57:10 +0000 (16:57 -0700)]
Add thumbnails to camera pictures

This adds EXIF thumbnails to pictures taken by the camera. The
thumbnails will be of the size specified in the camera parameters and
JPEG compressed.

Test: ran camera CTS tests
Change-Id: Icddc435726dde748791be2f1dd2dd68fdcbc8f7e
(cherry picked from commit 833a0978d5abc730eca1975af20a4ebd9a754d7d)

7 years agoFix build for EXIF processing on 64-bit platforms
Bjoern Johansson [Fri, 19 Aug 2016 23:06:37 +0000 (16:06 -0700)]
Fix build for EXIF processing on 64-bit platforms

64-bit builds do not have time64_t since time_t itself is 64-bit, make
sure the EXIF code that processes GPS timestamps uses a 64-bit version
of time_t that exists on the current platform.

Test: ran camera CTS tests
Change-Id: Ia32ad546c57e685ec9dfdf47c65aa10fe5b5a120
(cherry picked from commit 5f9bf798dfb618fc204dfa422e89e75bbd5a7abd)

7 years agoAttach EXIF data to images from camera
Bjoern Johansson [Wed, 17 Aug 2016 22:24:44 +0000 (15:24 -0700)]
Attach EXIF data to images from camera

Create a default set of EXIF tags for any JPEG picture taken by the
emulator camera. In addition some camera parameters, such as GPS data
and focal length, will be converted to EXIF tags and placed in the
picture if they are available. This fixes the testJpegExif test in
android.hardware.cts.CameraTest and will serve as the base for fixing
other EXIF tests.

BUG: 30700822
Test: ran camera CTS tests
Change-Id: I42a4abb0190c3eb61c32b11d52a467965a9621ae
(cherry picked from commit 33ce097dedaf750d276ca5a8b7932de566e01399)

7 years agoCTS: Camera: set supported effects
bohu [Mon, 15 Aug 2016 15:16:42 +0000 (08:16 -0700)]
CTS: Camera: set supported effects

To pass the following test with emulated camera

android.hardware.camera2.cts.CaptureRequestTest#testEffectModes

Bug: 30862244
Test: ran camera CTS tests
Change-Id: Iaccdab91f03aebced72ad3d5e9e823f1e7ad2acb
(cherry picked from commit 74c4369bc503f87f2517a08acc1d3c42d5466128)

7 years agoCTS camera: Set camrecorder framerate to 24
bohu [Tue, 16 Aug 2016 00:30:36 +0000 (17:30 -0700)]
CTS camera: Set camrecorder framerate to 24

As requred by CTS, 24 is the minimum.
This fixes the following two cases:
android.hardware.camera2.cts.RecordingTest#testBasicRecording
android.hardware.camera2.cts.RecordingTest#testRecordingFromPersistentSurface

Bug: 30034008
Test: ran camera CTS tests
Change-Id: Iadd340c30eab5f449834958f83561201810e86ad
(cherry picked from commit 075f1aa4544d2f3512c8612bd607107772228d38)