Skip to content

Commit 826f20d

Browse files
oceanjulesSheenaChhabra
authored andcommitted
Remove a redundant TODO in Util
PiperOrigin-RevId: 601820851 (cherry picked from commit eb3173a)
1 parent 4560611 commit 826f20d

File tree

2 files changed

+2
-4
lines changed
  • libraries/common/src

2 files changed

+2
-4
lines changed

‎libraries/common/src/main/java/androidx/media3/common/util/Util.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3338,11 +3338,10 @@ public static boolean tableExists(SQLiteDatabase database, String tableName) {
33383338
* <p>For example: android.media.MediaCodec.error_1 or android.media.MediaDrm.error_neg_2.
33393339
*
33403340
* @param diagnosticsInfo A string from which to parse the error code.
3341-
* @return The parser error code, or 0 if an error code could not be parsed.
3341+
* @return The parsed error code, or 0 if an error code could not be parsed.
33423342
*/
33433343
@UnstableApi
33443344
public static int getErrorCodeFromPlatformDiagnosticsInfo(@Nullable String diagnosticsInfo) {
3345-
// TODO (internal b/192337376): Change 0 for ERROR_UNKNOWN once available.
33463345
if (diagnosticsInfo == null) {
33473346
return 0;
33483347
}
@@ -3354,7 +3353,7 @@ public static int getErrorCodeFromPlatformDiagnosticsInfo(@Nullable String diagn
33543353
String digitsSection = strings[length - 1];
33553354
boolean isNegative = length >= 3 && "neg".equals(strings[length - 2]);
33563355
try {
3357-
int errorCode = Integer.parseInt(Assertions.checkNotNull(digitsSection));
3356+
int errorCode = Integer.parseInt(checkNotNull(digitsSection));
33583357
return isNegative ? -errorCode : errorCode;
33593358
} catch (NumberFormatException e) {
33603359
return 0;

‎libraries/common/src/test/java/androidx/media3/common/util/UtilTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,6 @@ public void getErrorCodeFromPlatformDiagnosticsInfo_withValidInput_returnsExpect
12581258

12591259
@Test
12601260
public void getErrorCodeFromPlatformDiagnosticsInfo_withInvalidInput_returnsZero() {
1261-
// TODO (internal b/192337376): Change 0 for ERROR_UNKNOWN once available.
12621261
assertThat(Util.getErrorCodeFromPlatformDiagnosticsInfo("")).isEqualTo(0);
12631262
assertThat(Util.getErrorCodeFromPlatformDiagnosticsInfo("android.media.MediaDrm.empty"))
12641263
.isEqualTo(0);

0 commit comments

Comments
 (0)