Commit Graph

7973 Commits

Author SHA1 Message Date
Jin Seok Park
12812746ce Merge "Add support for parsing Exif chunk in PNG" 2019-09-26 08:17:54 +00:00
Jin Seok Park
740558e422 Add support for parsing Exif chunk in PNG
Bug: 138376314
Test: Cannot find PNG file with Exif chunk but manually checked that
      the chunks were being read correctly

Change-Id: Ifa54a4bb9bfde7ea02d82821a5a3b2b4cb5a8f71
2019-09-26 10:34:18 +09:00
Jin Seok Park
0a2366d805 Merge "Add API to check if specified mime type is supported" 2019-09-18 02:34:40 +00:00
Jin Seok Park
f0851b2704 Add API to check if specified mime type is supported
Bug: 138845596
Test: N/A
Change-Id: I082f1d63b85a786214316fa00fa14522fc822b20
2019-09-16 08:19:55 +09:00
Eric Laurent
bf904a2fab Merge "AudioTrack: fix default low power mode selection" into qt-qpr1-dev am: 38dceceaf2
am: e07f956e87

Change-Id: I8dad80b2ce0584a0d30765f4355a1704ba38051a
2019-09-13 13:09:00 -07:00
Eric Laurent
e07f956e87 Merge "AudioTrack: fix default low power mode selection" into qt-qpr1-dev
am: 38dceceaf2

Change-Id: Iff06ef6996eb8f410432272ea44c6aa118fd2aa0
2019-09-13 12:54:50 -07:00
Eric Laurent
40f7e04f74 AudioTrack: fix default low power mode selection
Fix AudioAttributes flags checking logic in
shouldEnablePowerSaving() to take into account
flags that are compatible with deep buffer.

Bug: 140899988
Test: check that playback with Spotify goes to deep buffer
Change-Id: I492410b7837b15e248d61ec50dbb468e78e04524
2019-09-13 09:23:54 -07:00
TreeHugger Robot
d8c549a0e9 Merge "Add ability to get soundtrigger props from dsp" 2019-09-04 23:59:05 +00:00
Nicholas Ambur
1aa4b4b779 Add ability to get soundtrigger props from dsp
exposes sound trigger module properties to privileged
system apps with MANAGE_SOUND_TRIGGER permission

Bug: 139071862
Test: GTS test confirmed API accessible and providing valid data
Change-Id: Iec7ba6fc59912f44341fbe8d7f99193b9ead52f0
2019-08-30 10:10:18 -07:00
Aurimas Liutikas
4d1699da48 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-29 17:15:44 -07:00
Aurimas Liutikas
00be951a08 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:14:44 +00:00
Kyeongkab.Nam
9fc219671c TIF: Add content ratings
Put comments for the newly added DTMB, New Zealand
and Thailand rating strings.

Test: manual
Bug: 112835405
Change-Id: Idab6549b8acc4b9eb2904d5b531e28bc01046857
2019-08-26 22:42:06 +00:00
TreeHugger Robot
3f97f28037 Merge "Add OWNERS for media TV" 2019-08-26 19:20:27 +00:00
shubang
fb5cb3c815 Add OWNERS for media TV
Nick is the TLM of media TV.
Adding OWNERS to avoid bugging people from other media teams

Test: n/a
Change-Id: I2c99a7a1ab78c634fc94dfe96b6617b0bde4efdf
2019-08-22 18:54:15 -07:00
Kyunglyul Hyun
23b3aaa464 Media: add MediaRouter2.getRoutes()
As with this CL, media apps can get the list of available routes using
MediaRouter2.getRoutes() or MediaRouter2.Callback.onRouteListChanged().

For that MediaRouterService notifies MediaRouter2 of providerinfos.

This CL also clarifies provider info notification logic.

1) When a new client or a new manager is registered, it will be
notified.
2) When a provider info is updated, it will be notified.

onRouteListChanged will be called for a newly registerd callback.

Fixed a bug that MediaRoute2ProviderProxy didn't report state update
when the provider is disonnected.

Test: atest mediaroutertest
Change-Id: I50f5c3cabce80e7fb0a1b5596883c35911d6f122
2019-08-22 17:25:07 +09:00
TreeHugger Robot
69c1135405 Merge "Revert "Metadata: recycle Parcel"" 2019-08-21 19:45:27 +00:00
Wei Jia
79ca007329 Revert "Metadata: recycle Parcel"
This reverts commit e5a12e0ddb.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I24a4c274a3bc0d68d3c63ff701967ff3e4057983
2019-08-21 17:00:01 +00:00
Jeff Sharkey
570926daef Merge "Migrate MediaScannerConnection to using call()." 2019-08-20 00:29:26 +00:00
Jeff Sharkey
aac9878b43 Migrate MediaScannerConnection to using call().
As part of getting MediaProvider to compile against supported APIs,
we're moving to the call() method instead of IMediaScannerService.

Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Change-Id: Ie959daa7576214024150faf84b44cdba00119257
2019-08-19 14:14:28 -06:00
Jin Seok Park
de41450fae Merge "Fix ExifInterface#saveAttributes behavior" 2019-08-19 14:46:03 +00:00
Xin Li
80860803a4 DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5713463) into stage-aosp-master
Bug: 134405016
Change-Id: I303c0268e8e454b0f0f460eb286812a50c9add88
2019-08-14 12:04:06 -07:00
Wei Jia
e5a12e0ddb Metadata: recycle Parcel
Test: cts
Bug: 139319531
Change-Id: Ica1a7333fc15869b16b55669c3ba001187670eb7
2019-08-13 16:23:35 -07:00
Kyunglyul Hyun
c7228815bb Merge "Media: Remove @MainThread from MediaRouter2" 2019-08-12 06:10:57 +00:00
TreeHugger Robot
2dacad29c4 Merge "ExifInterface: Add missing ifd format name "IFD"" 2019-08-12 04:05:37 +00:00
Kyunglyul Hyun
d1f0b6e0b3 Media: Remove @MainThread from MediaRouter2
Now it uses mLock to synchronize mCallbackRecords, mControlCategories,
and mClient instead of enforcing main thread.

Also, check concurrency of MediaRouter2 and MediaRouter2Manager.

This CL also removes control category parameter from addCallback(registerCallback)
not to permit two callbacks in an application to have different control categories.

Function names are changed from add/remove callbacks to register/unregister callbacks
to follow the API guideline.

Test: atest mediaroutertest

Change-Id: I40f2bc45f7d108416182b68b4ae23127f8bb2eb4
2019-08-12 12:33:12 +09:00
Kyeongkab.Nam
4e2e511a8b Merge "Fix a lock issue in AudioPortEventHandler" am: 0985eea389 am: 41c9e7092e am: 4b98ce6898 am: bb3c59e776
am: 741db323d9

Change-Id: I81e6ebc76cdc82e0622543bb8972beeae4bf03d1
2019-08-11 19:20:43 -07:00
Kyeongkab.Nam
4b98ce6898 Merge "Fix a lock issue in AudioPortEventHandler" am: 0985eea389
am: 41c9e7092e

Change-Id: I27966dd0d709e66a624ee1fc1b5045132a24385b
2019-08-11 18:49:12 -07:00
Kyeongkab.Nam
41c9e7092e Merge "Fix a lock issue in AudioPortEventHandler"
am: 0985eea389

Change-Id: If2113f4150e35c7aeb1751181dab8aa2ea05dee4
2019-08-11 18:38:44 -07:00
Kyunglyul Hyun
9f3868d3d1 ExifInterface: Add missing ifd format name "IFD"
There has been IFD_FORMAT_IFD = 13 but IFD_FORMAT_NAMES[13]
was not defined, which could throw ArrayIndexOutOfBoundsException.

By providing proper name, we can prevent the exception.

Test: atest exifinterfacetest
Change-Id: Ib11b83a55d54ad2fc6377bb5cc55f6c2fdbe231c
2019-08-12 10:27:18 +09:00
Treehugger Robot
0985eea389 Merge "Fix a lock issue in AudioPortEventHandler" 2019-08-12 01:22:58 +00:00
Jin Seok Park
38bb5081a7 Fix ExifInterface#saveAttributes behavior
cherry-pick from aosp/1015050, aosp/1079822

1. Currently, calling ExifInterface#saveAttributes with StrictMode
   that detects unbuffered I/O throws an exception. Change
   saveJpegAttributes to take BufferedInput/OutputStreams
   as parameters.
2. Change saveAttributes so that when an exception is thrown, the
   original image file is not deleted but restored.
3. Distinguish between two identical exception messages in
   saveAttributes.
4. Add test for checking StrictMode.

Bug: 137139466
Test: Run atest CtsMediaTestCases:android.media.cts.ExifInterfaceTest
Change-Id: I9e4111ec35740198bdbdba0c9b609875b6231474
2019-08-12 10:02:47 +09:00
Kyeongkab.Nam
6dbaaf2d8a Fix a lock issue in AudioPortEventHandler
It used "this" as a lock object to guard mListeners. but "this" is
pointing to mHandler in handler thread.
This causes the IndexOutOfBoundsException.

bug: 138951761
Test: manual
Change-Id: I826c7c68ecff4fc0d39addd3d56bc989e00848bc
2019-08-09 09:30:44 +09:00
Jaewan Kim
95c783e2d2 MediaSessionManager: Use Executor instead of Handler
Bug: 138648566
Test: Build
Change-Id: I89a612cb1408dfb2cc4f624c7e0f8c8a55e0a732
2019-08-05 16:56:49 +09:00
Aurimas Liutikas
74dd35ccb0 Merge "Fix broken Javadoc links in frameworks/base" am: 4a532813df am: fbcbeec03c am: 3bd2895bdd am: c79a232e42
am: f9b868681d

Change-Id: I8fc2530c0f2735d320c1b641642aa3b8dd48b1f7
2019-08-04 02:29:44 -07:00
Aurimas Liutikas
3bd2895bdd Merge "Fix broken Javadoc links in frameworks/base" am: 4a532813df
am: fbcbeec03c

Change-Id: I5caaf35da16d1890bccad4b6296c44f564117d72
2019-08-04 01:25:41 -07:00
Aurimas Liutikas
fbcbeec03c Merge "Fix broken Javadoc links in frameworks/base"
am: 4a532813df

Change-Id: I5a6152fa6baab86dde980af57b84167b154b44c7
2019-08-04 00:49:17 -07:00
Aurimas Liutikas
92ff83bddc Fix broken Javadoc links in frameworks/base
Test: running metalava with syntax check enabled.
Change-Id: I13ec355b591b0ae3cfb5009794b1ed844d27cba8
2019-08-02 15:40:29 -07:00
TreeHugger Robot
096fe3ea33 Merge "Copy flags except MUTE_HAPTIC in setLegacyStreamType." 2019-08-02 17:36:37 +00:00
jiabin
a9b4f094d4 Copy flags except MUTE_HAPTIC in setLegacyStreamType.
FLAG_MUTE_HAPTIC will be set in AudioAttributes.mFlags. But it should
only be controlled by mMuteHapticChannels in AudioAttributes.Builder.
When copying flags in AudioAttributes.Builder, FLAG_MUTE_HAPTIC should
be ignored.

Bug: 138807243
Test: run SoundPoolHapticTest
Change-Id: I21395399746353b947355b89e5dbd379f42f5d20
2019-08-01 15:41:20 -07:00
Mark Goldstein
d5333390d5 Fix minor typo
Bug: 134914150

Test: Docs bash

Exempt-From-Owner-Approval: Docs-only change

Change-Id: I3cf02d169f3fee409cd39b11094ca1cb161d290c
2019-07-22 17:26:16 +00:00
Mark Goldstein
a940560b6e Fix typo: Change setOutFormat to setOutputFormat.
Test: No test needed.

Change-Id: Ib4ca2f770866d3ada481d9aecabd092b03d6e99e

Exempt-From-Owner-Approval: Docs-only change
2019-07-19 17:26:39 +00:00
Kyunglyul Hyun
e23e5ed72b Media : Implement getAvailableRoutes in MediaRouter2Manager
This CL adds capability to media route 2 info, which can be used
to get available routes for each app, which set control categories.

The test for control category is changed to test getAvailableRoutes().

Test: atest mediaroutertest

Change-Id: If93d64f02b4868b5e04b737431291b18a52177de
2019-07-17 17:00:04 +09:00
Eric Laurent
f361061451 audio record: fix getPortId() after release
Some race condition can cause AudioRecordingMonitorImpl to call
getPortId() on the client object after it has been released causing
an exception to be thrown by the JNI.

Test: Use audio Recorder app and check that no exception is thrown
when recording stops

Change-Id: I6cc1aee0a2ccae879e2cb5df7af757f33436d1f3
2019-07-12 17:29:33 -07:00
Kyunglyul Hyun
0987e3d5e4 Merge "Media: Implement Seamless Transfer with a single provider." 2019-07-11 05:38:48 +00:00
Sungsoo Lim
97e2f0897b Merge "Allow to register multiple callbacks in MediaSessionManager" 2019-07-11 04:17:49 +00:00
TreeHugger Robot
dfb94f02fc Merge "Fix ThumbnailUtils thumbnail pts calculation" 2019-07-09 22:53:50 +00:00
Chong Zhang
0da7cdc103 Fix ThumbnailUtils thumbnail pts calculation
bug: 137113185
test: manual test the clip attached in the bug in Download app.
Change-Id: I824cf1a5c5e08b87e7534a4c2287286134838917
2019-07-09 12:20:53 -07:00
Kyunglyul Hyun
a0d47419e3 Media: Implement Seamless Transfer with a single provider.
Seamless transfer for a single provider case and two providers case
should be dealt with in different ways.

For a single provider case, the provider can handle transfer and returns
the result of transfer.

For multiple providers case, the media app handles the transfer.

This CL covers seamless transfer within a single provider.

If a user requests semless transfer in System UI, MR2Manager.selectRoute
should be called and this request is sent to MediaRoute2ProviderService
that can handle seamless transfer internally.

The new test, testSingleProviderSelect() in MediaRouterManagerTest tests the path for
seamless transfer and ensure transfer request is handled by a provider.

From this CL, we use packagename instead of uid to select app for seamless transfer.
This is required to handle unlaunched apps that don't have uid.
It would prevent to use media router 2 in a multi-user case, that will
be supported by another CL.

I also added onUnselectRoute in MediaRoute2ProviderService, which is
essential to notify a provider that a media app stopped casting.

Bug: 136775407
Test: atest mediaroutertest

Change-Id: Ie3d0e988a72eedea6036f465454e661c424a0495
2019-07-09 17:18:52 +09:00
Sungsoo Lim
14ddf75c47 Allow to register multiple callbacks in MediaSessionManager
Bug: 126758528
Test: manually
Change-Id: I613593a88c115a5ac694b8c984f3ae36e9cc1c78
2019-07-09 09:07:15 +09:00
Marco Nelissen
292fdc1c93 Remove libexif usage from libmedia_jni.so
Test: manual, connect with MTP and PTP
Change-Id: I33128db25b8aae60df7854c61fc2a3873a1bced9
(cherry picked from commit f7ec16802c)
(cherry picked from commit efb865ace2)
(cherry picked from commit 5954d210d3)
2019-07-08 05:29:38 +00:00