13215 Commits

Author SHA1 Message Date
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
Andrei-Valentin Onea
10c573ff85 Merge "Add @UnsupportedAppUsage annotations" 2019-03-07 17:26:15 +00:00
Andrei Onea
8c2fb5b99b Add @UnsupportedAppUsage annotations
For packages:
  android.database
  android.hardware.display
  android.hardware.input
  android.hardware.location
  android.location
  android.media
  android.media.projection
  android.media.tv

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Merged-In: I570c08292f8a9f512c96f9dce13f5337718f112c
Change-Id: I1d6c60fcb53f404d5775163bf6929395921f5a45
2019-03-06 15:39:19 +00:00
Treehugger Robot
d14d29ca8f Merge "Extract android_media_Utils.cpp as a lib" 2019-03-04 22:47:16 +00:00
Jooyung Han
d989bb6377 Extract android_media_Utils.cpp as a lib
This is a part of job to cut dependency from libmediandk
to libandroid_runtime. As a LL-NDK, libmediandk desn't have
to depend on libandroid_runtime.

dependency: libmediandk -> libmedia_jni -> libandroid_runtime

Libmediandk calls three utility functions defined in
android_media_Utils.cpp. But these functions are independent
from libandroid_runtime.

By extracting those utility functions into its own shared library
(libmedia_jni_utils), the dependency from libmediandk to
libmedia_jni is cut down.

However, some classes and other functions in android_media_Utils.cpp
are moved into new file, android_media_Streams.cpp since they
depend on libandroid_runtime.

Bug: 124268753
Test: m -j
Change-Id: I1e1ea4bc1ff7022d8d9c42785c8c00e3ca153a50
Merged-In: I1e1ea4bc1ff7022d8d9c42785c8c00e3ca153a50
2019-02-28 12:03:48 +09:00
Dichen Zhang
6593694f97 revert "HLS seeking: call readAt() on new thread"
This reverts commit Ie527aeaff91e1b82c7e707a6feaf79548c7ac380

Bug: 119900000
Test: go/ag/5140159

Change-Id: Ia8b2f3efc2f3551e749c16c6c8dfbc070f8bb980
2019-02-27 11:04:02 -08:00
Jin Seok Park
3250d90912 Merge "Add OWNERS for ExifInterface"
am: 996d37ea59

Change-Id: I24669310bf259344675110b2e4463894843e776b
2019-02-18 07:06:53 -08:00
Jin Seok Park
996d37ea59 Merge "Add OWNERS for ExifInterface" 2019-02-18 14:56:06 +00:00
Jin Seok Park
06410d0714 Add OWNERS for ExifInterface
Adding specific owners for ExifInterface in order to make sure
AndroidX code is changed when framework code is changed.

Bug: 122276930
Test: N/A
Change-Id: Icf0d74ad915d4b322a70c74762753411ad96bbb1
2019-02-18 11:44:35 +09:00
Dichen Zhang
7b459880ee Merge "HLS seeking: call readAt() on new thread"
am: f9d7df6f78

Change-Id: Idf8a6341cdb8a2bf9478aa523e8066d96089e598
2019-02-15 14:02:59 -08:00
Dichen Zhang
f9d7df6f78 Merge "HLS seeking: call readAt() on new thread" 2019-02-15 21:47:26 +00:00
Dichen Zhang
94843014bc HLS seeking: call readAt() on new thread
Bug: 119900000
Test: go/ag/5140159
Change-Id: Ie527aeaff91e1b82c7e707a6feaf79548c7ac380
2019-02-14 16:26:49 -08:00
Xin Li
0e71b4f19b DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
Suren Baghdasaryan
9c9b025715 Replace hardcoded cgroup paths
Replace hardcoded cgroup paths with new processgroup library API calls,
include required headers. Add required dependencies.

Bug: 111307099
Test: builds, boots

Change-Id: Ic2dc2a94328cf1927fafaa9506537aeb213df413
Merged-In: Ic2dc2a94328cf1927fafaa9506537aeb213df413
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-02 17:03:41 +00:00
Tomoharu Kasahara
a0d0c542b9 Enable phone apps to mute the BLUETOOTH_SCO stream
This change adds support for privileged apps with the MODIFY_PHONE_STATE
permission to mute the bluetooth sco stream using the adjustStreamVolume
method.
The change adds specific handling for BLUETOOTH_SCO as a mutable stream.

Bug: 111195322
Test: Mute works by AudioManager.adjustStreamVolume
 (STREAM_BLUETOOTH_SCO, ADJUST_MUTE, 0)

Change-Id: I932f9e152e9b6df93a749b083a7bcc7e08c2ad70
2019-01-23 09:04:42 +09:00
Tor Norbye
8752dedb76 Update signature files to the new format
The new format is described in tools/metalava/FORMAT.md.

Fixes: 116589402 Switch signature files over to the v2 format
Fixes: 112626813 Drop "synchronized" modifier from the signature format
Fixes: 122358225 Omit overriding methods that only differ in final [...]
Fixes: 73088715 API Review: Need doclava to output nullability
Fixes: 79739773 API Review: Metalava enforcing constants are constant
Exempt-From-Owner-Approval: Large-scale tooling change
Test: make sdk, make update-api, make checkapi
Change-Id: I8314f4e7099fa92e4f8ed7d283ccf836cc9a84a0
Merged-In: Ia248aece5250e84e47c815c601133b698bf644c2
2019-01-19 07:22:55 -08:00
Treehugger Robot
2e29def109 Merge "Remove the eng tag from invoke_mock_media_player" 2019-01-19 04:24:23 +00:00
Treehugger Robot
bce5b2f971 Merge "Fix potential NULL dereference errors." 2019-01-19 02:39:35 +00: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
Sundong Ahn
3e6812ad49 Switch to metalava
android.test.mock, com.android.location.provider and
com.android.mediadrm.signer libraries are change to using metalava
instead of doclava.

Test: m -j
Bug: 117127012
Change-Id: I82e838ab60110698e1c0ea8e567467a1b32707ce
2019-01-09 16:12:24 +09:00
Mathew Inwood
55418eada5 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 14:26:35 +00:00
Treehugger Robot
a32f898720 Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" 2018-12-13 05:45:20 +00:00
Andy Hung
bfb6086f67 Merge "Visualizer: fix native crash when visualizer release" 2018-12-12 21:37:04 +00:00
zengjing
5a56b61c16 Visualizer: fix native crash when visualizer release
Visualizer should not be destroyed before mCaptureThread exit.

Test: CTS VisualizerTest
Change-Id: I0cda2ff2be8ce487e10b5311fbdc043fa57d91d4
Signed-off-by: zengjing <zengjing@xiaomi.com>
2018-12-12 20:02:45 +00:00
Adrian Roos
6115769c16 API: Clean up redundant and ineffective usages of SystemApi and TestApi
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.

In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.

Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Merged-In: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
2018-12-12 15:02:26 +01:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
Chih-Hung Hsieh
054dab1d47 Fix cert-dcl16-c clang-tidy warnings.
Bug: 120614316
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,cert-dcl16-c
Change-Id: I2dc262d3407aafa969e921236dc3fc3ae60eb9d4
2018-12-11 11:27:17 -08:00
Treehugger Robot
422fa22456 Merge "Remove ScopedBytes use" 2018-12-09 19:36:28 +00:00
Jeff Sharkey
1d287ef484 Add OWNERS for upcoming MediaStore work.
Also match contents of internal branch and alphabetize.

Bug: 113356944
Test: manual
Merged-In: I98245fe411295b6112cdc73a13baf2ac70edeb9d
Merged-In: I369767557ae023c0a7cdaf7cde46ad65c11bb6de
Change-Id: Ie48f2f70973e468d95fbbfa9fb56449dfa910b66
2018-12-04 09:10:50 -07:00
Chong Zhang
317316fb2b Fix ExifInterface for .heic when meta is at the end
available() bytes is counted after the last read position,
after the seek to new position, size should be compared
with the avaliable directly (without adding position).

bug: 120086693
test: Open .heic files in Downloads/Photos that's either
very small (b/117625929, b/111897855), or with the meta
at the very end (b/120086693). There shouldn't be error
in ExifInterface.
Change-Id: I37ac57823b26f03bb0ba555ee6213cf999942d21
2018-11-30 15:37:03 -08:00
Orion Hodson
9b909c3b70 Remove ScopedBytes use
The libnativehelper ScopedBytes class is being deprecated. It's use in
android_media_AudioTrack.cpp is unnecessary because the JNI method
takes a direct buffer as an argument whereas ScopedBytes classes exist
to mask the difference between byte arrays and byte buffers.

Bug: 119840313
Test: m -j32
Change-Id: I2a6478dbaa861c5391cc298871df0f8cd1f1439c
2018-11-27 17:54:05 +00:00
mtk33169
03ae44a8ff The JE about "android.process.media" will pop up when you eject the
SD card after you set SD as internel phone storage

This JE is happening due to null pointer access in makeEntryFor() in
MediaScanner.Java.
Before accessing the cursor, check if cursor is available and not null.
It is a safe check.

Bug: 119392250
Test: manual, ran test 20 times and it passed every times.
Change-Id: I23039281b63a0a6a411860eb5989cf20a5663c8f
2018-11-12 10:49:55 +00:00
Daniel Bonnevier
56a9a6631a Add key for sample rate and bits per sample
Add new keys for sample rate and bits per sample.
This makes it possible to indicate the specification of
the music files on application.

Bug: 112986969
Test: Check if sample rate and bits per sample can be retrieved

Change-Id: Ie5a90800297a0a7c2dd6f3a2bdf9e88c9221bee1
2018-11-02 19:49:48 +09:00
Chong Zhang
6636b0227d Merge "Add keys to retrieve color aspects from metadata" 2018-10-25 02:04:48 +00:00
Toshikazu Saito
26b3de310f Add keys to retrieve color aspects from metadata
Add keys to retrieve color standard, color transfer and color range from
MediaMetadataRetriever.

Bug: 114329709
Test: put hdr/non-hdr contents and check media db

Change-Id: Ifa90f12a572b330f87acd6ef06e1e83ddceb8483
2018-10-23 23:37:31 +00:00
nobuhiko saitou
839cc00889 Color aspects keys information stored database
Add keys for color aspects to VideoColumns in MediaStore.
And standard, transfer and range is stored to database.

Bug: 114329709
Test: put hdr/non-hdr contents and check media db

Change-Id: Id4bf27a35720f5cf5a60f08eb3f30314e1a1a167
2018-10-23 22:03:30 +00:00
Nathan Harold
f5cf9f24ed Merge "Move some members to the "Q blacklist"." 2018-10-23 21:53:51 +00:00
Treehugger Robot
31bbb473ce Merge "Fix data source for HEIF exif extractor" 2018-10-23 17:36:33 +00:00
Treehugger Robot
0915931939 Merge "Change caught exception in MediaScanner when ExifInterface is created" 2018-10-23 17:36:33 +00:00
Mathew Inwood
45d2c252b1 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a477fbbee38092f449333e1425e5cd7e)
2018-10-22 17:28:24 -07:00
Chih-Hung Hsieh
e8abd06776 Allow implicit-fallthrough warnings locally.
It will be a global error by default.

Test: make checkbuild
Bug: 112564944
Change-Id: I26616fd50ccf3639fa7c01d850a14d079273ede7
Exempt-From-Owner-Approval: do not block on new warnings
2018-10-22 09:56:12 -07:00
Chong Zhang
f2b041dce0 Fix data source for HEIF exif extractor
Do not allow the source to read past available bytes, since
the underlying input stream may not be able to seek after that.

For input streams from files, the available bytes is usually the
file size, and we usually don't have problem when the file is
of decent size. But when the file is very small, some of the
extractors (other than mp4) would request bytes past the end
of the file, which goes over the available range. Once that
condition is hit, we can't reset to the offet needed for
mp4 extractor and heif parsing would fail.

bug: 111897855
bug: 117625929
test: open heic files of various sizes in Files (Downloads) app,
check that ExifInterface shouldn't encounter any exceptions.

Change-Id: I668ff900f4155dc310cb7ea8977bbe091791c5d7
2018-10-22 16:02:33 +00:00
Toshikazu Saito
a74c77991a Change caught exception in MediaScanner when ExifInterface is created
Some HEIF content happens RuntimeException in ExifInterface because
sniff is failed and MediaExtractor is not found. If exception happens,
scanning is aborted. So all contents may not be registered to database
correctly. To avoid that, this fix changes caught exception from
IOException to Exception for creating ExifInterface.

Bug: 117625929
Test: put some HEIF contents and check on photos

Change-Id: I6d32dec27c3be13993ec08f92d567b772d03ace9
2018-10-22 09:25:43 +00:00
weichinweng
c91b0fdfeb Merge "AudioService: Add Hearing Aid Switch Control"
am: f3b7821fbd

Change-Id: I6abbbc268a8c391e2d400e7a9811ea0e04362bfc
2018-10-18 14:18:06 -07:00
weichinweng
0de4adc7ca AudioService: Add Hearing Aid Switch Control
1) Add setBluetoothHearingAidDeviceConnectionState interface to control
suppressNoisyIntent flag.
2) Add check to confirm the previous device is active or not when want
to clean it.

Bug: 112279820
Test: Build Pass, BT off/on when play A2DP, Switch active device
Change-Id: I73f1236d44213c6cf4a2708f3c96144416cfa67d
Merged-In: I73f1236d44213c6cf4a2708f3c96144416cfa67d
2018-10-18 13:31:11 -07:00
weichinweng
c30a3e8d1c AudioService: Add Hearing Aid Switch Control
1) Add setBluetoothHearingAidDeviceConnectionState interface to control
suppressNoisyIntent flag.
2) Add check to confirm the previous device is active or not when want
to clean it.

Bug: 112279820
Test: Build Pass, BT off/on when play A2DP, Switch active device
Change-Id: I73f1236d44213c6cf4a2708f3c96144416cfa67d
2018-10-18 07:28:39 +08:00
Sundong Ahn
a1bc1b1331 Merge "Build com.android.media.remotedisplay with java_sdk_library"
am: 1ad4aed0b9

Change-Id: Icb633bd7f8cc0ed932c0aa70ef9dfe475722ada0
2018-10-14 18:48:01 -07:00
Treehugger Robot
1ad4aed0b9 Merge "Build com.android.media.remotedisplay with java_sdk_library" 2018-10-15 01:32:16 +00:00
Sundong Ahn
83a2bc6a3b Merge "Add the metalava_enabled property"
am: 69251fca46

Change-Id: I5720ce833d0ffd0016dc8a77cb0f56b0d34a9c21
2018-10-11 18:06:17 -07:00
kopriva
d104c81916 docs: bug 37007350, missing word
Test: make ds-docs

Bug: 37007350

Change-Id: Ibbff4232f67e7c955b182ff9f3b97250bb15c310
Exempt-From-Owner-Approval: Docs-only change
2018-10-08 15:24:21 -07:00