378 Commits

Author SHA1 Message Date
Paul Duffin
26e81d2a47 Refactor code incompatible with Mockito 2.7.13
Bug: 32912773
Test: make checkbuild
Merged-In: I96e3da967fad731fc8f39bde9db95f50ab7353fb
Change-Id: I445b32432eea8a1ccb2060a73460a882a9ebe76f
2017-03-10 14:19:18 +00:00
Paul Duffin
ccb0445027 Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

(cherry picked from 6387604f9e672ece85e07c4bcbd7be396867f06f)

Bug: 30188076
Test: make checkbuild
Merged-In: I13e88297731253420e4e5f5291d503f13a39a156
Change-Id: I58446eb8c45d8ac2bcdbc9fa40d1321e811bdd4b
2017-01-19 09:43:05 +00:00
Neil Fuller
b04b5f697d Remove .mk lines that are just setting the default
1.8 is now the default unless targeting an old SDK.

Bug: 31944681
Test: make checkbuild
Change-Id: Ic8a50cfd332da8b84eb87207a3c2d2c9a9a58e99
2016-10-05 13:38:36 +01:00
Hang Yin
a23ed40af7 Merge "Code Patch for camera preview switch tests" into nyc-dev
am: 5c950a8078

* commit '5c950a8078e37eb9057da4aa5b3355189b675291':
  Code Patch for camera preview switch tests

Change-Id: I90e4880c7ec7d41c7b4b402b66c6e25b0006eb64
2016-05-27 22:40:26 +00:00
Hang Yin
39aafafa9a Code Patch for camera preview switch tests
This cl will fix the bug: b/28982885. It enables Raw10 Size Array
only when the device support Raw10.

Change-Id: I6a7a9d47708017f71c47fb5bbb15f3e98b555af4
2016-05-27 14:56:14 -07:00
Hang Yin
703d3fd84d Merge "Created 4 camera preview stress test cases." into nyc-dev
am: 581387a4ae

* commit '581387a4aebd88debe065dd2957ad59d0bb000b5':
  Created 4 camera preview stress test cases.

Change-Id: I3dc460887c688d666ad7d129fbad897666798042
2016-05-25 03:18:05 +00:00
Hang Yin
3ed27cc2b2 Created 4 camera preview stress test cases.
The 4 stress test cases cover situations of preview switch between
front/back camera and between photo/video mode. Followed Google
Camera App Kenai version streaming rules to set preview request in
the tests.

b/28916141 will be solved once this change is merged

Change-Id: I448be429df5b0813fa2e2f6ff05ad2936afee1b3
2016-05-23 17:29:28 -07:00
Narayan Kamath
3a00b69702 Remove unnecessary allocation+unboxing of objects.
am: a09b4d2

* commit 'a09b4d2a611a7606e8fc8c73a24bd941b6fc173f':
  Remove unnecessary allocation+unboxing of objects.

Change-Id: Idfffa8fad0f6bcffa954752910524bdc879d65b7
2016-04-18 10:31:37 +00:00
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Jaesung Chung
468a0796cb Merge "ExifInterface: keep the original metadata data instead of strings" into nyc-dev
am: 865cef4

* commit '865cef475dd4b0ffcb4df0dd62cb86d4ce65ab08':
  ExifInterface: keep the original metadata data instead of strings

Change-Id: Ie02b5ac90a8dde0389ace4bcae081f8bd4e064a0
2016-04-16 02:46:14 +00:00
Jaesung Chung
865cef475d Merge "ExifInterface: keep the original metadata data instead of strings" into nyc-dev 2016-04-16 02:41:23 +00:00
Chien-Yu Chen
767d366842 Merge "Camera2: Stop repeating request for abandoned output" into nyc-dev
am: dfe920d

* commit 'dfe920d3bb3a1b896d3b16d1b58bd7d56fc2e70d':
  Camera2: Stop repeating request for abandoned output

Change-Id: I9c5e31e5476e860d7b1ac974d62ae6fb5646069a
2016-04-15 23:44:33 +00:00
Jaesung Chung
0e7d22535d ExifInterface: keep the original metadata data instead of strings
This CL makes ExifInterface store the tag values as the original forms
and the format validiation is added that compares the given value and
the data format specificed in EXIF specification in order to keep the
valid tag values only.

Bug: 27583378, Bug: 27614052, Bug: 28075709
Change-Id: If60bbddefe74c4b87b4ce64b5fc79e467e36a5b9
2016-04-15 23:27:21 +00:00
Chien-Yu Chen
2da496f1ce Camera2: Stop repeating request for abandoned output
Stop repeating request if any of its output stream is abandoned
and notify that repeating request has been stopped.

Update binder tests for binder interface changes.

Update CameraDeviceImpl to expect an exception when canceling
a repeating request that is already stopped.

Bug: 21270879
Change-Id: I9fa72ae7218948aac88cb1a8e57839bd022c4a5e
2016-04-15 16:04:18 -07:00
Insun Kang
848785f20c Merge "ExifInterface: Code clean up" into nyc-dev
am: faecc3f

* commit 'faecc3f800cf2eaaf94f563faaba44193582e8b0':
  ExifInterface: Code clean up

Change-Id: I527fe115f16725d9f1ab371e96c776d81a62e36d
2016-04-01 08:59:03 +00:00
Insun Kang
8884af3ee9 ExifInterface: Code clean up
Replaces deprecated constants with newly added constants in the actual
implementation.

Bug: 27932489
Change-Id: Id54236a05127cd7ce3bf0668c002635fb86489a9
2016-04-01 11:53:14 +09:00
Insun Kang
018c382277 Merge "ExifInterface: Clean up test code and increase test coverage" into nyc-dev
am: 7625a59

* commit '7625a59bbd58f37a1aafefafaf4dc0f621dd548b':
  ExifInterface: Clean up test code and increase test coverage

Change-Id: I508218a732eb1bfcc4d9a83e41b349c7eb35b6f1
2016-03-30 08:48:58 +00:00
Insun Kang
9e175f468e ExifInterface: Clean up test code and increase test coverage
Bug: 27888859
Change-Id: I8a2d4f3cdafd932aa0c4272c80e4967097c62491
2016-03-30 11:47:18 +09:00
Jimmy Dalqvist
35bbebb6c5 Merge "Correct MediaAudioTrackTest testPlaybackHeadPositionAfterStop" am: faf2c42
am: 256c15a

* commit '256c15afd371cdf7d19c2c1f3cd2862cf2f7e4a4':
  Correct MediaAudioTrackTest testPlaybackHeadPositionAfterStop
2016-03-28 14:57:19 +00:00
Glenn Kasten
faf2c42ac9 Merge "Correct MediaAudioTrackTest testPlaybackHeadPositionAfterStop" 2016-03-28 14:42:46 +00:00
Jaesung Chung
42ac0d0015 ExifInterface: fix regression of re-writing JPEG
Bug: 27583378
Change-Id: I052dfedbb1393705eba378de5eaf3636ed0e65ea
2016-03-22 19:12:42 -07:00
Jaesung Chung
ad76dc2e62 ExifInterface: fix a bug in readExifEntryValue
The readExifEntry method has raised an unnessary EOFException on reading
an non-ASCII byte array.

Bug: 27484747
Change-Id: I19371e0eed25770929f50b3ca25f249c50113925
2016-03-09 23:21:32 +09:00
Jaesung Chung
6e08d2b082 ExifInterface: add RAW input stream support
And also the following things are included:

- Remove mInputStream.
- Update javadoc accordingly.

Bug: 11224701
Change-Id: I30b4c29ac800ae396fca8f6b2c2c0f68028a44b3
2016-03-09 17:22:11 +09:00
Brian Carlstrom
73d28418a4 Remove unneeded dependecy on core-tests to fix build
Bug: 27555885

(cherry picked from commit 2687673025f9b5a86f917135d2a8288d4f31818b)

Change-Id: I6c0aee5c1823b6c498d9306e4a7c749b093e6834
2016-03-08 17:57:16 -08:00
Brian Carlstrom
03cec27e7a Remove unneeded dependecy on core-tests to fix build
Bug: 27555885

(cherry picked from commit 2687673025f9b5a86f917135d2a8288d4f31818b)

Change-Id: I1c40ed0a565216652acdbef61dd8f44ce8df70f8
2016-03-08 17:34:07 -08:00
Eino-Ville Talvala
5d2d7788f1 Camera2: Switch to auto-gen C++ binder interfaces
- Move camera AIDL files to frameworks/av
 - Update makefiles to point to new AIDL locations
 - Adjust camera2 implementation to match modifications to AIDL needed
   for native AIDL auto-generation
 - Move Surface.aidl to frameworks/native to allow use in
   native AIDL. Use android::view::Surface in Surface JNI to
   serialize Surface objects to ensure parceling compatibility.
 - Adjust service binder tests to new interface

Bug: 25091611
Change-Id: I85b817374b34a4540fa145328dbe4bbf7f746baf
2016-03-01 17:15:17 -08:00
Jaesung Chung
596e1d3b7a Merge "Revert "Revert "ExifInterface: switch from using jhead to java implementation""" into nyc-dev 2016-02-25 14:14:28 +00:00
Jaesung Chung
15ef59e081 Revert "Revert "ExifInterface: switch from using jhead to java implementation""
This reverts commit 3c233ee291cfe1b765184920b6b7a69cb1bb82d9.

Bug: 27349581
Change-Id: Ib9f687e79ec36692fa7505ba3852099eb3e44573
2016-02-25 14:13:10 +00:00
Sungsoo Lim
b21622d477 Merge "Revert "ExifInterface: switch from using jhead to java implementation"" into nyc-dev 2016-02-25 11:50:43 +00:00
Sungsoo Lim
3c233ee291 Revert "ExifInterface: switch from using jhead to java implementation"
This reverts commit bf24c9fcb3e66b25c90c0cd51f8bf4f401f6c3d6.

Change-Id: Id278e831a9c03f615208fd6eab51c65f7bb019eb
2016-02-25 11:48:10 +00:00
Jaesung Chung
9ad5278e2b Merge "ExifInterface: switch from using jhead to java implementation" into nyc-dev 2016-02-25 05:35:54 +00:00
Jaesung Chung
bf24c9fcb3 ExifInterface: switch from using jhead to java implementation
Bug: 26044456, Bug: 11224701
Change-Id: I881ef0ead24bcec76c0fa5a7dd0b74cc71c77285
2016-02-25 10:57:27 +09:00
Neil Fuller
dce343dc41 Add flags needed to switch Jack to 1.8 for CTS targets
When linking against .jack files that contain 1.8 language
features Jack (currently) requires -D jack.java.source.version=1.8.

"core-tests" includes 1.8 language features.

Bug: 27113322
Bug: 26953739
(cherry-picked from commit a835180b74af2cad853db08e8d41a7b04773759b)

Change-Id: I2be4db6788b14558f74534c24bb007f7fb8b6b67
2016-02-18 14:16:59 +00:00
Neil Fuller
a835180b74 Add flags needed to switch Jack to 1.8 for CTS targets
When linking against .jack files that contain 1.8 language
features Jack (currently) requires -D jack.java.source.version=1.8.

"core-tests" includes 1.8 language features.

Bug: 27113322
Bug: 26953739
Change-Id: Ib9ceaadafc9c1d41ff137c48111ad3b060f7e248
2016-02-15 12:07:21 +00:00
Hyungtae Tim Kim
84789bef99 Rename instr argument 'repeat' to 'iterations'
The argument means the number of test iterations for camera
stress testing. Renamed for easier understanding of the argument.

Change-Id: I3247e35f8640c98db5c8438c3fc79a45073d9623
2016-02-01 16:00:49 -08:00
Hyungtae Tim Kim
6d8fd0a23f Camera2 framework stress test suite
Added a new Camera2 framework stress test to put stress in
the common use cases in exercising Camera2 APIs.

Note that this stress test differs from Camera CTS in that
it focus on ensuring stability rather than functionality.
It could also provide the flexibility to get integrated with
test tools if needed.

For the initial run, most test codes are taken from CTS package
except for test fixtures to handle arguments and results for
stress test. However test implementation could be differentiated
to meet needs in stress testing over time.

Change-Id: Ie36594de3904e41f6175b8d5072b91941975d091
2016-01-27 16:59:41 -08:00
Jeff Sharkey
60cfad80bd Discourage use of "_data" column.
Moving forward, all client file access really needs to be going
through explicit APIs like openFileDescriptor(), since that allows
the provider to better protect its underlying files.

This change also changes several classes to use the AutoClosable
pattern, which enables try-with-resources usage.  Older release()
methods are deprecated in favor of close().

Uniformly apply CloseGuard across several classes, using
AtomicBoolean to avoid double-freeing, and fix several resource
leaks and bugs related to MediaScanner allocation.  Switch
MediaScanner and friends to use public API instead of raw AIDL calls.

Bug: 22958127
Change-Id: Id722379f72c9e4b80d8b72550d7ce90e5e2bc786
2016-01-06 10:19:35 -07:00
Lazar Trsic
8ea56f6851 Replace hard-coded errno values with OsConstants
Errno values have been hard-coded inside java code. On the native side
however, bionic's errno.h is used (through utils/Errors.h). Some of
the numbers are architecture dependent (EOPNOTSUPP, ETIMEDOUT...).

This causes Camera app to crash on MIPS devices. There is a check for
expected errors, in CameraBinderDecorator.throwOnError, but the error
(EOPNOTSUPP) is not recognized and an exception is thrown.

Change-Id: I8bcac8f1ced50c76614f566a6e624967a18a25e1
2015-12-04 12:41:37 +01:00
Jimmy Dalqvist
28cae04368 Correct MediaAudioTrackTest testPlaybackHeadPositionAfterStop
When calling AudioTrack.stop the system needs some time to stop
the audiotrack and set the position to 0.
The current sleep time of 100ms is not enough.
Update the test to use the same strategy as the CTS test,
which is to call getPlaybackHeadPosition multiple time before
giving up and failing the test.

Change-Id: Ie938929c009c41e101782b4a46ac01a0aa73ee34
2015-10-23 11:36:44 +09:00
Eino-Ville Talvala
3a94b2d22e am 028c2e4e: am 33689420: am eec25a4f: am 1017f986: Merge "Camera2: Add camera type to getNumberOfCameras." into mnc-dev
* commit '028c2e4e264d1d2235e4d0f95d178fdf77510e7e':
  Camera2: Add camera type to getNumberOfCameras.
2015-08-16 02:55:33 +00:00
Eino-Ville Talvala
c964884eb7 am 1017f986: Merge "Camera2: Add camera type to getNumberOfCameras." into mnc-dev
* commit '1017f9862fb2cdfbff0abe12ef7d20b657a38e36':
  Camera2: Add camera type to getNumberOfCameras.
2015-08-15 00:54:18 +00:00
Eino-Ville Talvala
5717612ba9 Camera2: Add camera type to getNumberOfCameras.
Do not list strange cameras in old API; ensure new API gets all
cameras.

Bug: 23194168
Change-Id: Ia1fdffac245525674c913fefb1ec06e9094fe8d3
2015-08-14 14:52:57 -07:00
Narayan Kamath
74b04315c4 am b9f170ff: am b4db7923: Merge "Delete some obsolete test code."
* commit 'b9f170ff99a3ad25623bf20c77eb4f6173577c98':
  Delete some obsolete test code.
2015-07-14 22:53:14 +00:00
Narayan Kamath
fc5e0ba625 am b9f170ff: am b4db7923: Merge "Delete some obsolete test code."
* commit 'b9f170ff99a3ad25623bf20c77eb4f6173577c98':
  Delete some obsolete test code.
2015-07-14 20:27:48 +00:00
Narayan Kamath
85bdaae347 Delete some obsolete test code.
- Get rid of obsolete annotations in MediaInserterTest.

- Drop support for @BrokenTest and @SideEffect. Nobody uses
  SideEffect and none of the tests that use this test runner
  (vm-tests-tf, essentially) use @BrokenTest.

Change-Id: Id73c4d4eda8031689f9263c85b563c29e635d446
2015-07-09 18:23:53 +01:00
Hyungtae Tim Kim
333578bcd4 Add bucket that unknown state playback falls into
MediaPlayerStressTest some media files are missing on the results as they
were reported neither completed nor erroneous.
This case will fall into a new category named unknown playback state so that
we could track them in media dashboard.

Bug: 21755950
Change-Id: Iefcc3e375c63d952a7d9edb418208209d87b9e08
2015-06-11 08:33:04 -07:00
Zhijun He
b1300e39c7 Camera2: add high speed video APIs
Interface only.

Bug: 21442271
Change-Id: If81caa0f2dc9f7802af564abcd9541aff3e30901
2015-06-03 17:50:22 -07:00
Marco Nelissen
e796ff912e Handle unknown duration in playMediaSamples test
Bug: 21391417
Change-Id: I85d8f5921e8423da078acfe3aff34a6fcef69e78
2015-05-27 12:33:03 -07:00
Chong Zhang
9560ddb48a MediaCodec: rename usePersistentInputSurface to setInputSurface
bug: 21045402
Change-Id: I510a3a694367b8e5a21f4a4fa2a338031fed8991
2015-05-13 10:53:47 -07:00
Harish Mahendrakar
34265cd94f media: Added MPEG2 profile/levels and tests
Bug: 20852831
Change-Id: I172f2f08c30d12bf684f32a52db64823cc286d35
2015-05-05 11:05:22 -07:00