From 7bf63e732de4fd5bfbeb2fa1625d0a7758bb2361 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 18 Feb 2020 13:44:09 +0100 Subject: [PATCH] Remove dead-code readDvbString --- .../exoplayer2/metadata/dvbsi/AitDecoder.java | 59 ------------------- 1 file changed, 59 deletions(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/metadata/dvbsi/AitDecoder.java b/library/core/src/main/java/com/google/android/exoplayer2/metadata/dvbsi/AitDecoder.java index 249ae0ce2f..33fe6bf865 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/metadata/dvbsi/AitDecoder.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/metadata/dvbsi/AitDecoder.java @@ -133,63 +133,4 @@ public class AitDecoder implements MetadataDecoder { return new Metadata(aits); } - static final String dvbCharset[] = { - "ISO-8859-15", - "ISO-8859-5", - "ISO-8859-6", - "ISO-8859-7", - "ISO-8859-8", - "ISO-8859-9", - null, - "ISO-8859-11", - null, - "ISO-8859-13", - null, - "ISO-8859-15", - null, - null, - null, - null, - //0x10 - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - }; - - static String readDvbString(ParsableByteArray data, int length) { - if(length == 0) return null; - int charsetSelect = data.peekUnsignedByte(); - if(charsetSelect >= 0x20) - return data.readString(length, Charset.forName("ISO-8859-15")); - data.skipBytes(1); - if(charsetSelect == 0x1f) { - data.skipBytes(length - 1); - return null; - } - if(charsetSelect != 0x10) - return data.readString(length-1, Charset.forName(dvbCharset[charsetSelect])); - if(length == 2) { - data.skipBytes(1); - return null; - } - charsetSelect = data.readUnsignedShort(); - if(charsetSelect > 1 && charsetSelect < 0x10) { - String charsetName = "ISO-8859-" + charsetSelect; - return data.readString(length-3, Charset.forName(charsetName)); - } - return null; - } }