mirror of
https://github.com/androidx/media.git
synced 2025-05-07 23:50:44 +08:00
Fix streaming license renew error
When the first streaming license request response provided to mediaDrm it might return an empty array instead of null. This was set to offlineLicenseKeySetId which made the work like there is a valid offline license. Simplified the code and made it to set offlineLicenseKeySetId only if there is sensible data in keySetId. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=144843144
This commit is contained in:
parent
51f96374d4
commit
4b957cce47
@ -564,9 +564,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> implements DrmSe
|
||||
}
|
||||
} else {
|
||||
byte[] keySetId = mediaDrm.provideKeyResponse(sessionId, (byte[]) response);
|
||||
if (offlineLicenseKeySetId != null && (keySetId == null || keySetId.length == 0)) {
|
||||
// This means that the keySetId is unchanged.
|
||||
} else {
|
||||
if (keySetId != null && keySetId.length != 0) {
|
||||
offlineLicenseKeySetId = keySetId;
|
||||
}
|
||||
state = STATE_OPENED_WITH_KEYS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user