Nick is the TLM of media TV.
Adding OWNERS to avoid bugging people from other media teams
Test: n/a
Change-Id: I2c99a7a1ab78c634fc94dfe96b6617b0bde4efdf
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
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)
Test: manual, connect with MTP and PTP
Change-Id: I33128db25b8aae60df7854c61fc2a3873a1bced9
(cherry picked from commit f7ec16802c)
(cherry picked from commit efb865ace2)
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
information added
So they are being moved back to the greylist for Q.
Test: Treehugger
Bug: 136102585
Change-Id: I6518440a7b0de8292ad05b4df9f0f9580d18b2a5
Member variable of mVideoActiveFormatDescription is not compared
on equals API. The variable should be compared on the equals API.
Test: build
Change-Id: Ib8fde63afb0504140f34ebd695f4524db9c74748
With this, MediaRouter2Manager.Callback.onRouteSelected will be called properly.
This CL also adds provider id to MediaRoute2Info to distinguish routes
with the same id from different providers.
Test: atest mediaroutertest
Change-Id: If353a4decad489576a39b1a93c7d99c7fe238abe