Commit Graph

13194 Commits

Author SHA1 Message Date
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 8c854f86a4)
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
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
Sundong Ahn
ccf9672f64 Add the metalava_enabled property
The new property is added for supporting metalava. But some sdk library
cannot use metalava. So "metalava_enabled: false" is added to these
modules.

Test: make -j
Test: checkapi
Bug: 117127012
Merged-In: Ib65f3cd73dac0ac6ed64afeca6546d99739e4424
Change-Id: Ib65f3cd73dac0ac6ed64afeca6546d99739e4424
(cherry picked from commit 558e702be0)
2018-10-04 14:27:37 +09:00
James Wei
8772c649c2 Merge "MTP: Add OWNERS for MTP functionality"
am: 5f7129b925

Change-Id: I23105daccd7bc071bf8cf0337609017747b1dce6
2018-10-03 18:13:29 -07:00
Treehugger Robot
5f7129b925 Merge "MTP: Add OWNERS for MTP functionality" 2018-10-04 00:48:39 +00: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
Sundong Ahn
881a9872e7 Build com.android.media.remotedisplay with java_sdk_library
com.android.media.remotedisplay is built with java_sdk_library and api
files are added by running "make update-api".
The com.android.media.remotedisplay.xml is removed since it will be made
auto generation by soong when the library is built with java_sdk_library.

Bug:77577799
Test: make -j
Test: make checkapi
Test: adb shell cmd package list libraries |\
      grep com.android.media.remotedisplay
      And check the com.android.media.remotedisplay library

Merged-In: I40e2d5456877a434f7c1ae70b6ec3692db106537
Change-Id: I40e2d5456877a434f7c1ae70b6ec3692db106537
(cherry picked from commit 6e038837be)
2018-10-02 13:35:49 +09:00
Jeff Sharkey
f8ad474935 Merge changes from topic "bugfix_content_path"
am: aa642187cd

Change-Id: Ice15a2cffcaf96a370f8e73ebe0a25bdea67f1c3
2018-10-01 11:25:38 -07:00
nobuhiko saitou
436b7b5634 Add OEM_SOUNDS_DIR variable
Add OEM_SOUNDS_DIR variable
And add judgment of OEM_SOUNDS_DIR in isSystemSoundWithMetadata.

Test: build and check sound like ringtone etc
Bug: 79123178

Change-Id: Ib432910c7a99695e73c88480b7028be1c9d04702
2018-09-20 16:05:54 +09:00
Tomoharu Kasahara
96b6adc014 Merge "Convert AudioAttribute to Stream correctly for TTS"
am: 874e10f4a6

Change-Id: I52a610027d11574ab51cd83683de64ff2dddadfe
2018-09-11 13:35:21 -07:00
Treehugger Robot
874e10f4a6 Merge "Convert AudioAttribute to Stream correctly for TTS" 2018-09-11 19:26:56 +00:00
Tomoharu Kasahara
be0103c0a5 Convert AudioAttribute to Stream correctly for TTS
Add FLAG_BEACON for STREAM_TTS then use it for
conversion from AudioAttribute to stream type.

Bug: 113303490
Test: Use AudioAttributes.toLegacyStreamType

Change-Id: I7fa2b3f095437f8077545d1fff795bb0d8fe6b89
2018-09-11 20:21:59 +09:00
Treehugger Robot
024387744a Merge "Convert AudioAttribute to Stream correctly" 2018-09-05 22:43:07 +00: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
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
Par-Gunnar Hjalmdahl
96e68bc2e6 Convert AudioAttribute to Stream correctly
When converting an AudioAttribute with FLAG_SCO set, it should
be converted to STREAM_BLUETOOTH_SCO. However, since getFlags()
returns only public flags, and FLAG_SCO isn't public,
the conversion will fail. Change to getAllFlags() to get right
flags.

Bug: 113314374
Test: Use AudioAttributes.toLegacyStreamType

Change-Id: Ic283f055d746d5c3df645dc310c92dac3c80827f
2018-08-28 20:34:01 +09:00
Chih-hung Hsieh
c22d1184d4 Merge "Fix errors in LOG_FATAL_IF arguments."
am: 78755a8c97

Change-Id: I8a75a52970ea8bda0ba2ae71dd82845b0bad7333
2018-08-27 10:51:59 -07:00