DTMB is only supported in Tuner HAL 1.1 or higher.
Tuner framework does version check to make sure enought support from HAL
implementation.
Tuner.tune and Tuner.scan with DTMB settings running on Tuner HAL 1.0
implementation would be no-op.
Test: atest android.media.tv.tuner.cts
Bug: 159064654
Change-Id: Ic2f759cc92fee75ae94b72e233fd6c4448359a67
This CL adds the Tuner 1.1 extended frontend setting options into
Tuner Java system APIs.
Including the following settings:
General Frontend Settings: Spectral Inversion, End Frequency
Dvbt Settings: plp rotation, extended transmission mode
Dvbs Settings: scan type.
Test: make
Bug: 158818695
Change-Id: I0d80f244ad29a73458e66ee012c48b9dbde356be
These APIs are only supported in Tuner 1.1 or higher
Test: atest android.media.tv.tuner.cts
Bug: 158818696
Change-Id: I1df5b8b908455d47dbe183070456b15116b75cb7
This can help Tuner java/cts get the information of the Tuner HAL
implementation version and notify the client on the availability of
the APIs in different versions or test with different expected result.
Users can all access getTunerVersion to get the information.
Test: atest android.media.tv.tuner.cts
Bug: 158816517
Bug: 164449999
Change-Id: I0b6e4c226e696ca7f94dff7d2c9a59f57af7e13a
Please see the Tuner HAL 1.1 design doc here:
go/android_tuner_hal_1.1
In this CL, the Tuner framework and JNI start to use the
@1.1::IFilter.getId64Bit() API and @1.1::IFilterCallback.
Currently the 1.1 IFilterCallback passes two new 1.1 record filter
events: DemuxFilterTsRecordEvent and DemuxFilterMmtpRecordEvent.
Tuner Framework exposes a new API: getId64Bit() which calls
the native getId64Bit. Also Filter java will be using long id
instead of the previous int id.
The FilterCallback interface remains unchanged but the TsRecordEvent
and the MmtpRecordEvent carry more variables to pass the extra info
in version 1.1.
When the HAL implementation is on version 1.0 and calls
onFilterEvent, it still uses the extended TsRecordEvent and
MmtpRecordEvent but the 1.1 field will be set to invalid.
Related HAL interface can be referred here:
hardware/interfaces/tv/tuner/1.1
Test: make -j44 dist, atest android.media.tv.tuner.cts
Bug: b/159058358
Bug: 158816517
Change-Id: I8d52c0b2031eed9c54909e5bf233137c56eeb78f
Allows MediaParser and MediaExtractor clients to know the
encrpytion pattern of the parsed/extracted media. Without
the getter, only MediaCodec can know the pattern, which
impossibilitates the use of app-bundled decoders.
Bug: 158743263
Test: atest CtsMediaTestCases:MediaCodecTest.testCryptoInfoPattern
Change-Id: Iaf77c8ecafad093cfa434a9ac31314895a44e78f
Following changes are included:
- Added @IntRange for getBitmapDimensionLimit()
- Used Integer.MAX_VALUE for 'no scaling was applied'
- Accordingly, made the @IntRange start from 1 (previously zero)
Bug: 168215839
Test: Ran CTS
Change-Id: Ia7687545aa778425357c31e32738c1a25794086c
* changes:
Upgrade AndroidFrameworkBinderIdentity to fatal.
Tighten up Binder.clearCallingIdentity() usage.
Tighten up Binder.clearCallingIdentity() usage.
Tighten up Binder.clearCallingIdentity() usage.
This is a third CL in a chain that adjusts existing malformed code
to follow AndroidFrameworkBinderIdentity best-practices.
Specifically, if a thread clears an identity they need to restore it
to avoid obscure security vulnerabilities. In addition, the relevant
"try" block must start immediately after the identity is cleared to
ensure that its restored if/when any exceptions are thrown.
Bug: 155703208
Test: make
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I74cb958b68d55a647547aae21baff6ddc364859b
The recently added AndroidFrameworkBinderIdentity Error Prone checker
examines code to ensure that any cleared identities are restored to
avoid obscure security vulnerabilities.
This change is a purely mechanical refactoring that adds the "final"
keyword to the cleared identity to ensure that it's not accidentally
modified before eventually being cleared. Here's the exact command
used to generate this CL:
$ find . -name "*.java" -exec sed -Ei \
's/ (long \w+ = .+?clearCallingIdentity)/ final \1/' \
{} \;
Bug: 155703208
Test: make
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I832c9d70c3dfcd8d669cf71939d97837becc973a
The client submits a RecognitionRequest via MusicRecognitionManager. System server opens an audio stream based on the request and sends it to a MusicRecognitionService (which is exposed by a system app). The result is passed back through system server to the original caller.
Test: tracked in b/169662646
Bug: 169403302
Change-Id: I4c7fd9d9d72ddd5678867fd037cab6198bff2c2d
When test the monkey, the mCursor is not null and the mCursor is Closed.
So that the mCursor cannot call the method of moveToPosition. Otherwise
it will lead to StaleDataException.
In order to prevent the android.database.StaleDataException and IllegalStateException,
use the try catch to deal with the StaleDataException and IllegalStateException.
Test:Perform the monkey test, and See if this android.database.StaleDataException will happen again when call the method of android.media.RingtoneManager#getRingtoneUri.
Bug: 169292273
Change-Id: I577c41c6a4b0025ce562a2dc495a6f28b103cfaa
There are currently two APIs with the same name:
dispatchMediaKeyEventAsSystemService(KeyEvent), and
dispatchMediaKeyEventAsSystemService(KeyEvent, MediaSession.Token),
but their internal implementations and return types do not overlap.
Instead rename the second API to
dispatchMediaKeyEventToSessionAsSystemService(...) to avoid
associating the two APIs.
The same logic is applied to dispatchVolumeKeyEventAsSystemService.
Bug: 166262380
Test: build
Change-Id: I20f7c6d4dd97eff6625307cf9bbc14ff824c3286
Provide a public alternative for @UnsupportedAppUsage method.
Bug: 161331118
Test: build successful
Change-Id: I69626b8665a1173e29cff4680f82c7fc99c045ac
This CL replaces the copy constructor
MediaMetadata(MediaMetadata source, int maxBitmapSize)
with the new public method Builder#setBitmapDimensionLimit().
Also added a getter getBitmapDimensionLimit().
Bug: 168215839
Test: m update-api -j; Ran MediaMetdataTest
Change-Id: I6844fcf01c4ee98c99bd0dc880b96f73989dbd3c
When test the monkey, the mUri is existed to be null pointer high probability.
In order to prevent a null pointer exception, added a judgment condition that the mUri is not null or empty.
Test:Perform the monkey test,and See if this NullPointerException will happen again when call the method of android.media.Ringtone#play.
Bug: 169292270
Change-Id: I7907f0a376d67bb0a0f50ea155e2aa2f4552b1de
This allows headless media applications to access the location if they
have the permission and is needed for AAOS apps in particular.
Bug: 169242810
Bug: 156904507
Test: manual with AAOS Media app
Change-Id: I1196718638fba336a815809578f643814545baf4