670 Commits

Author SHA1 Message Date
Tobias Thierer
8edd837b79 Track MimeMap moving to libcore.content.type.
Another CL in this topic moves libcore.net.MimeMap to package
libcore.content.type. This CL updates associated references.

Bug: 136256059
Bug: 124232146
Test: Treehugger
Test: CtsMimeMapTestCases
Exempt-From-Owner-Approval: move affecting imports only
Change-Id: I30aac8b28a1740180ea01834a2bb66b61cb255d4
2019-10-04 12:52:38 +00:00
Shuzhen Wang
105f6f68f8 Merge "MediaFrameworkTest: Fix storage path" into qt-dev
am: e83c7779c0

Change-Id: I03884595c1aa9edb0be95f80cf9a58adec13301d
2019-05-29 12:08:30 -07:00
Shuzhen Wang
f2d1172f48 MediaFrameworkTest: Fix storage path
Test: Run mediaframeworktest
Bug: 133767357
Change-Id: If2930dffff0582a6a1b33a7de15c3008aaf923bd
2019-05-29 09:50:00 -07:00
Ying Liu
0e54f48102 Merge "Modified camera framework stress tests." into qt-dev
am: d6c8e026b9

Change-Id: I9992c6eed0d712da3f15200fb565451c7e828571
2019-05-23 19:16:35 -07:00
Ying Liu
dec6989bbf Modified camera framework stress tests.
Bug:130821349
Test: local run pass
'adb shell am instrument -w -r   -e waitIntervalMs 1000 -e timeout_msec
7200000 -e iterations 1 -e class
'com.android.mediaframeworktest.stress.Camera2RecordingTest#testBasicRecording'
com.android.mediaframeworktest/androidx.test.runner.AndroidJUnitRunner'

Change-Id: I2c2d84babd229b49cddeaf913d8e027189f2cbf6
(cherry picked from commit 909962d7edd765b9e6d080a839f0e465a5e1cd76)
2019-05-23 20:20:07 +00:00
Tobias Thierer
533b333485 Inline calls to MimeUtils.
MimeMap is a configurable replacement for MimeUtils. This
CL inlines calls to MimeUtils, in preparation for its
removal.

Bug: 120171727
Test: atest com.android.mediaframeworktest.unit.MediaFileTest
Change-Id: I8a2bfec55d913cd0f85ed13fc9cdc052208ed729
Merged-In: I8a2bfec55d913cd0f85ed13fc9cdc052208ed729
(cherry picked from commit 524a364754cb447f55f6ef4452e4253ff4e16133)
2019-05-08 13:00:11 +00:00
Kyunglyul Hyun
a1c7990bc4 DO NOT MERGE: Revert "Media: Add MediaRouterManager to control media route of other apps"
This reverts commit 1c8188f2b40cad3dcefdcc3b7e308451bd705180.

Bug: 130511870
Test: atest android.media.cts.MediaRouterTest
Change-Id: I1de6fbeb81b1d5ef0ec4b73173b6525d4c6edc07
2019-04-15 11:44:55 +09:00
Sasha Smundak
b61bab6a58 Convert Android.mk file to Android.bp
Files failing automerge from AOSP.
See build/soong/README.md for more information.

Bug: 122332340
Test: treehugger
Change-Id: I92f7584aeaf502336f67e04fbc22634784c9305d
2019-03-26 15:18:41 -07:00
Kyunglyul Hyun
2d70f04a1d Merge "Media: Add MediaRouterManager to control media route of other apps" 2019-03-25 23:39:34 +00:00
Ying Liu
36952ab053 Fix camera stress tests directory
Test: build apk locally and run,  test pass
Bug: 124237534
Change-Id: I077ccf55996f8fac568d3a617e2ffdbfccdf14aa
2019-03-22 17:31:37 -07:00
Kyunglyul Hyun
1c8188f2b4 Media: Add MediaRouterManager to control media route of other apps
This CL is a draft for supporting seamless transfer

MediaRouterManager is added to notify providers seamless transfer request.

It also adds MediaRouter.setControlCategories() to let application notify
their control categories and filter out irrelevant routes.

Test: atest mediaroutertest after installing mediarouteprovider.apk

Change-Id: I7446855271d27ffaad2e82dda133bed80b9f9630
2019-03-18 14:23:38 +09:00
Sasha Smundak
2cdebeb174 Merge "Convert Android.mk file to Android.bp" am: 504a33a64e am: c35c355dbb
am: c78d2ff15f

Change-Id: I88fe73e11421204c4f0b2e20b91088cf91bdaa13
2019-03-15 16:41:01 -07:00
Sasha Smundak
c3d9efbe3a Convert Android.mk file to Android.bp
See build/soong/README.md for more information.
NOTE: MediaFrameworkTest/, MtpTests/, NativeMidiDemo/ have to be fixed in
internal master first.

Bug: 122332340
Test: treehugger
Change-Id: I7451696b2fc3f1384e255e35280e66850f3f01a3
2019-03-12 11:30:43 -07:00
TreeHugger Robot
f80eb9dcde Merge "Camera: Add support for camera access permission callback" 2019-03-04 20:36:37 +00:00
Brett Chabot
502ec7ae4b Migrate remainder of frameworks/base to androidx.test
See go/jetpack-test-android-migration

Exempt-From-Owner-Approval: automated package name refactoring

Test: m  m -j BroadcastRadioTests KeystoreTests mediaframeworktest ActivityManagerPerfTests AppLaunch AppLaunchWear BackgroundDexOptServiceIntegrationTests AppCompatibilityTest DynamicCodeLoggerIntegrationTests FlickerLibTest InternalTests PackageWatchdogTest RcsTests RollbackTestAppAv1 RollbackTestAppAv2 RollbackTestAppACrashingV2 RollbackTestAppBv1 RollbackTestAppBv2 RollbackTestAppASplitV1 RollbackTestAppASplitV2 RollbackTest ServiceCrashTest UsageStatsPerfTests UsbTests WindowAnimationJank
Change-Id: I32fe3297656eec6060da6c7e24582bcd5315fb16
2019-03-02 00:35:17 +00:00
Emilian Peev
0e971f32b2 Camera: Add support for camera access permission callback
Camera availability callbacks must support client
notifications about access priority changes. Such
data can be useful for any client that is actively
waiting for access to a particular camera device.

Bug: 121379978
Test: Camera CTS, successful docs build.
Change-Id: I423960c3a5bc5a2e156ccf3e8623c26d49350131
2019-02-27 16:08:25 -08:00
TreeHugger Robot
5e55e809a7 Merge "Camera: Add support for dynamic depth image format" 2019-01-28 22:21:46 +00:00
Dan Willemsen
981bdac4d0 Merge "Remove the eng tag from invoke_mock_media_player" am: 2e29def109 am: b19dc43a0b
am: f67e867fc7

Change-Id: Ie24c544d54a920473daee898a2044512ddc9f006
2019-01-18 21:00:39 -08:00
Dan Willemsen
7eccc741f0 Remove the eng tag from invoke_mock_media_player
The test using this has been suppressed for >9 years since we moved
testing from eng devices to userdebug.

Test: treehugger
Change-Id: Ie91f3b97a33a8e8e5be49ea2098f163567e2496d
2019-01-18 14:40:54 -08:00
Emilian Peev
934ffa6d40 Camera: Add support for dynamic depth image format
The Jpeg image format must support additional dynamic
depth metadata according to the new standard. Camera
devices supporting non-exclusive depth map streams
along with appropriate Jpeg output will include this
new format by default.

Bug: 109735087
Test: Camera CTS
Change-Id: Id628466323a1ffbbdc7b44a5d15fe8df1cab8743
2019-01-11 15:24:21 +00:00
KOUSHIK PANUGANTI
628373035e Migrate frameworks/base/media/tests/MtpTests to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: Ic101be84c83a227b0e5c5c5c20357831c1419f8c
2018-12-18 03:06:03 +00:00
Yin-Chia Yeh
92843954e0 Camera: fix typo in jniThrowException
Test: new unit test pass
Bug: 117234442
Change-Id: I0be699a84c9fb19875c80cb9d30b39a8e27efc9b
2018-11-27 14:23:40 -08:00
James Wei
99cc042899 Merge "MTP: Add OWNERS for MTP functionality" am: 5f7129b925 am: 8772c649c2
am: d0beec7e3e

Change-Id: I0ed466fc1ba3ffa76da3fca14d992a94aac4ad87
2018-10-03 18:40:07 -07:00
James Wei
8772c649c2 Merge "MTP: Add OWNERS for MTP functionality"
am: 5f7129b925

Change-Id: I23105daccd7bc071bf8cf0337609017747b1dce6
2018-10-03 18:13:29 -07:00
James Wei
ea628b619c MTP: Add OWNERS for MTP functionality
Bug: 116760814
Test: NA
Change-Id: I743f307c5fb4b34cd7ab52b3107609bbd87ad57f
2018-10-02 14:15:35 +08:00
Philip P. Moltmann
a8e1da9165 Merge "Allow ignoring return values when checking if class is mockable"
am: e91c337d41

Change-Id: I36ae2c2f4755810bfbaf06d30e20c1461106aa06
2018-08-28 12:15:53 -07:00
Jeff Sharkey
91e3cd4c6c More robust MTP-to-MIME-type mappings.
Recently in I830717428e72ac37c5ecd1f23d915aa878ef3744, we greatly
improved the underlying file-extension-to-MIME-type mappings defined
in libcore and used across the OS.

Instead of maintaining divergent mappings here in MediaFile, this
change delegates all file extension logic down to libcore, and
standardizes all MediaScanner internals on using MIME types.  To
register new file types in the future:

1. Add the MIME-to-extension registration in libcore.
2. Add the MIME-to-MTP mapping here in MediaFile.

This change also ensures that unknown MIME types are surfaced
across MTP, using constants like FORMAT_UNDEFINED_AUDIO for audio/*
until an explicit format is defined.

We now surface WMA/WMV file formats, even if the device can't
natively play them back, since we still want to offer the ability
for users to copy them around, and the user may have a third-party
app capable of playing them.

Keeps @UnsupportedAppUsage intact for now.

Bug: 111268862, 112162449
Test: atest frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaFileTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I2f6a5411bc215f776f00e0f9a4b7d825b10b377d
2018-08-28 13:02:35 -06:00
Philip P. Moltmann
441f0283fb Allow ignoring return values when checking if class is mockable
Test: make -j javac-check RUN_ERROR_PRONE=true
Change-Id: I5094fa145fc5f6d5c5d9426b07d764c07e545819
Merged-In: I5094fa145fc5f6d5c5d9426b07d764c07e545819
2018-08-28 09:53:19 -07:00
James
e4f680e058 MTP: Add support of ObjectInfoChanged Event
Under MTP mode, new file created at device side shown size zero at PC side
due to file information is not updated to PC in time with ObjectAdded event

Bug: 77883345
Test: 1. Take screenshot of device under MTP mode with Win10 / Linux
    2. file copy, delete, rename between PC and device
    3. file copy, delete, rename on device with adb shell command
Test: adb shell am instrument -w android.mtp/
	android.support.test.runner.AndroidJUnitRunner

Change-Id: If428064fb0104b53b8afd5b050a4fab4a09312f0
2018-07-27 11:54:43 +08:00
TreeHugger Robot
bd2a8811f3 Merge "Replace streams with Lists in MtpStorageManager" 2018-07-25 06:16:27 +00:00
Jerry Zhang
9a018747be Replace streams with Lists in MtpStorageManager
Streams are dispreferred in Android java, so
use Lists for all cases instead.

Test: Mtp works and MtpStorageManager tests pass
Change-Id: I0579013fca690346c6c2561fe3079fd50f215833
2018-07-16 18:21:47 -07:00
Philip P. Moltmann
416abab7b4 Merge "Allow ignoring return values when checking if class is mockable" 2018-07-13 15:35:39 +00:00
chened
54eaff8618 Merge "Camera: Use session configuraion when recording tests" into pi-dev am: 26da9f18ed
am: c6360e5772

Change-Id: I7667526285406451cea841dba22d265163c95354
2018-07-12 11:33:30 -07:00
chened
c6360e5772 Merge "Camera: Use session configuraion when recording tests" into pi-dev
am: 26da9f18ed

Change-Id: I68975212f84e6e31c2dffb002749d2ec735689b5
2018-07-12 10:53:26 -07:00
Philip P. Moltmann
f0b8d0fac0 Allow ignoring return values when checking if class is mockable
Test: make -j javac-check RUN_ERROR_PRONE=true
Change-Id: I5094fa145fc5f6d5c5d9426b07d764c07e545819
2018-07-10 11:11:15 -07:00
chened
2cc04e654c Camera: Use session configuraion when recording tests
Use session configuration API to pass the initial recording
request.

Bug: 111168889
Test: atest
frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/Camera2RecordingTest.java

Change-Id: Ie53a6b0fb0fd9573d135fdddb1a54b0afbd0d73b
2018-07-05 17:24:45 +08:00
Robert Shih
203c738591 Merge "Add cleartextTrafficPermitted to MediaFrameworkTest" into pi-dev am: 300ab58e9a
am: 5ecf175573

Change-Id: Iaecb78eca49f32d155ea856630d6299b8604d8fc
2018-05-25 16:26:00 -07:00
Robert Shih
5ecf175573 Merge "Add cleartextTrafficPermitted to MediaFrameworkTest" into pi-dev
am: 300ab58e9a

Change-Id: Ib8fd78e9d876ce986d443a8422330b7d69a44c10
2018-05-25 16:15:40 -07:00
TreeHugger Robot
300ab58e9a Merge "Add cleartextTrafficPermitted to MediaFrameworkTest" into pi-dev 2018-05-25 23:01:53 +00:00
Robert Shih
9a7cca9106 Add cleartextTrafficPermitted to MediaFrameworkTest
Bug: 75276616
Test: this
Change-Id: I520950a148658e9f1602e1b4657dd0273bdaf0e2
2018-05-25 12:01:06 -07:00
Dan Willemsen
f97d380ca7 Merge "Convert to Soong" am: acbd94d76f am: b1005a8a2a
am: d00c851e55

Change-Id: I889b5d31535d927b3aa9cf5ad6af955ca0678356
2018-05-15 15:52:51 -07:00
Jerry Zhang
acc0043abd Merge "Call access(2) on all files/dirs modified by Mtp" into pi-dev am: 01f41f96fe
am: 73e4d170c5

Change-Id: I12a754ef36e72a3913d641012da3b0419e64c161
2018-05-15 15:42:03 -07:00
Dan Willemsen
d00c851e55 Merge "Convert to Soong" am: acbd94d76f
am: b1005a8a2a

Change-Id: If5cb26e0669f79240d8fee1d40aaa2162d8e611f
2018-05-15 15:06:19 -07:00
Jerry Zhang
73e4d170c5 Merge "Call access(2) on all files/dirs modified by Mtp" into pi-dev
am: 01f41f96fe

Change-Id: I7c329a8cdff834a24a3e0ef3f82387421084b5de
2018-05-15 14:55:19 -07:00
Jerry Zhang
d470a1eca6 Call access(2) on all files/dirs modified by Mtp
External sdcards are accessed through /mnt/media_rw,
so access() each touched file for sdcardfs to update
its metadata.

Java handles single object renames directly so that
is the only place where it is needed.

Bug: 77849654
Test: use mtp with emulated sdcard
Change-Id: Ie460398010f1fe74d8084808a6333b121674362c
2018-05-15 12:29:13 -07:00
Colin Cross
d6a3bafd12 Merge "Fix errors caught by aapt2" am: 5d58a302e3
am: 2743c5bb09

Change-Id: I84dbf6e0fbfe8e2730ffa3fa79c3ef732702e192
2018-05-14 18:03:55 -07:00
Dan Willemsen
4888b1f6f0 Convert to Soong
See build/soong/README.md for more information.

Test: m libframeworks_coretests_jni
Test: m FrameworkCoreTests_install
Test: m libshim_jni
Test: m CtsShimPrivUpgrade
Test: m libfilterfw
Test: m PMTest_Java_dual
Test: m libdefcontainer_jni
Test: m libperftestscore_jni
Test: m libpmtest32 libpmtest64
Test: m libprintspooler_jni
Test: m libsmartcamera_jni
Test: m idmap
Test: m libdrmframework_jni
Test: m libdvr_loader com.google.vr.platform com.google.vr.platform.xml
Test: m libfilterpack_imageproc libfilterpack_base
Test: m libwebviewchromium_loader
Test: m shared_mem_test
Test: m test-touchlag
Change-Id: I868561dd237fa28647896d59049ab9260373ada1
2018-05-14 16:47:02 -07:00
Colin Cross
3478ddce8f Fix errors caught by aapt2
Fixes:
frameworks/base/media/tests/NativeMidiDemo/AndroidManifest.xml:11: error: unknown element <uses-feature> found.

Bug: 79481102
Test: m java FORCE_AAPT2=true
Change-Id: Ife9b7c9eb97adfd6525912776f16cb27b5d22677
Merged-In: I7bb02b8926d01090132ce873c785b5323a9fa5f8
2018-05-10 22:16:35 -07:00
Paul McLean
8a3e33b36a (re)integrating Native MIDI API into NDK - base API
Implement native MIDI API (amidi)

Bug: 30252756
Bug: 37090545

Test: manual - Connect PreSonus AudioBox 22VSL and run tests in NativeMidiTestbed app.
Verify MIDI messages sent to external MIDI synthesizer.
Verify MIDI messages received from external MIDI synthesizer.
CTS

Change-Id: I7bb02b8926d01090132ce873c785b5323a9fa5f8
2018-03-15 16:20:07 -07:00
Anton Hansson
a3e79fbb8c frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: Ibcffec873a693d1c792ca210fb597d2bf37e9068
Merged-In: I4233b9091d9066c4fa69f3d24aaf367ea500f760
2018-02-28 17:15:21 +00:00