Skip to content

Commit

Permalink
Cherry pick PR #3291: Add missing Locale when using String.format (#3295
Browse files Browse the repository at this point in the history
)

Refer to the original PR: #3291

b/341201258

Co-authored-by: Garo Bournoutian <gbournou@google.com>
  • Loading branch information
cobalt-github-releaser-bot and gbournou committed May 18, 2024
1 parent 3a44725 commit 000f0ad
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public AudioTrackBridge(
sampleTypeString = "ENCODING_E_AC3";
break;
default:
Log.i(TAG, String.format("Unknown AudioFormat %d.", sampleType));
Log.i(TAG, String.format(Locale.US, "Unknown AudioFormat %d.", sampleType));
break;
}
}
Expand Down Expand Up @@ -237,7 +237,7 @@ private void play() {
try {
audioTrack.play();
} catch (IllegalStateException e) {
Log.e(TAG, String.format("Unable to play audio track, error: %s", e.toString()));
Log.e(TAG, String.format(Locale.US, "Unable to play audio track, error: %s", e.toString()));
}
}

Expand All @@ -252,7 +252,7 @@ private void pause() {
try {
audioTrack.pause();
} catch (IllegalStateException e) {
Log.e(TAG, String.format("Unable to pause audio track, error: %s", e.toString()));
Log.e(TAG, String.format(Locale.US, "Unable to pause audio track, error: %s", e.toString()));
}
}

Expand All @@ -267,7 +267,7 @@ private void stop() {
try {
audioTrack.stop();
} catch (IllegalStateException e) {
Log.e(TAG, String.format("Unable to stop audio track, error: %s", e.toString()));
Log.e(TAG, String.format(Locale.US, "Unable to stop audio track, error: %s", e.toString()));
}
}

Expand Down

0 comments on commit 000f0ad

Please sign in to comment.