Bug: 138376314
Test: Cannot find PNG file with Exif chunk but manually checked that
the chunks were being read correctly
Change-Id: Ifa54a4bb9bfde7ea02d82821a5a3b2b4cb5a8f71
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
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
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
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
Put comments for the newly added DTMB, New Zealand
and Thailand rating strings.
Test: manual
Bug: 112835405
Change-Id: Idab6549b8acc4b9eb2904d5b531e28bc01046857
Nick is the TLM of media TV.
Adding OWNERS to avoid bugging people from other media teams
Test: n/a
Change-Id: I2c99a7a1ab78c634fc94dfe96b6617b0bde4efdf
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
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
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
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
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
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
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
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
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
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
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)