- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
35 lines
1.3 KiB
Java
35 lines
1.3 KiB
Java
package com.mbridge.msdk.playercommon.exoplayer2.drm;
|
|
|
|
import android.util.Pair;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.C;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class WidevineUtil {
|
|
public static final String PROPERTY_LICENSE_DURATION_REMAINING = "LicenseDurationRemaining";
|
|
public static final String PROPERTY_PLAYBACK_DURATION_REMAINING = "PlaybackDurationRemaining";
|
|
|
|
private WidevineUtil() {
|
|
}
|
|
|
|
public static Pair<Long, Long> getLicenseDurationRemainingSec(DrmSession<?> drmSession) {
|
|
Map<String, String> queryKeyStatus = drmSession.queryKeyStatus();
|
|
if (queryKeyStatus == null) {
|
|
return null;
|
|
}
|
|
return new Pair<>(Long.valueOf(getDurationRemainingSec(queryKeyStatus, PROPERTY_LICENSE_DURATION_REMAINING)), Long.valueOf(getDurationRemainingSec(queryKeyStatus, PROPERTY_PLAYBACK_DURATION_REMAINING)));
|
|
}
|
|
|
|
private static long getDurationRemainingSec(Map<String, String> map, String str) {
|
|
if (map == null) {
|
|
return C.TIME_UNSET;
|
|
}
|
|
try {
|
|
String str2 = map.get(str);
|
|
return str2 != null ? Long.parseLong(str2) : C.TIME_UNSET;
|
|
} catch (NumberFormatException unused) {
|
|
return C.TIME_UNSET;
|
|
}
|
|
}
|
|
}
|