Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
LisoUseInAIKyrios committed Dec 14, 2024
1 parent 240c597 commit 04409db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class ChangeDefaultAudioLanguagePatch {
/**
* Injection point.
*/
public static boolean isAudioStreamAsDefault(boolean isDefault, String audioTrackId, String audioTrackDisplayName) {
public static boolean isDefaultAudioStream(boolean isDefault, String audioTrackId, String audioTrackDisplayName) {
try {
if (audioTrackId.isEmpty()) {
// Older app targets can have empty audio tracks and these might be placeholders.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ private const val EXTENSION_CLASS_DESCRIPTOR =

@Suppress("unused")
val changeDefaultAudioLanguagePatch = bytecodePatch(
name = "Change default audio track",
description = "Adds an option to set a video default audio language .",
name = "Change default audio language",
description = "Adds an option to set a default audio language.",
) {
dependsOn(
sharedExtensionPatch,
Expand Down Expand Up @@ -133,8 +133,9 @@ val changeDefaultAudioLanguagePatch = bytecodePatch(
invoke-virtual { p0 }, $audioTrackDisplayNameMethod
move-result-object v2
invoke-static { p1, v1, v2 }, $EXTENSION_CLASS_DESCRIPTOR->isAudioStreamAsDefault(ZLjava/lang/String;Ljava/lang/String;)Z
invoke-static { p1, v1, v2 }, $EXTENSION_CLASS_DESCRIPTOR->isDefaultAudioStream(ZLjava/lang/String;Ljava/lang/String;)Z
move-result v3
invoke-static { v3 }, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v0
iput-object v0, p0, $helperMethodClass->$helperFieldName:Ljava/lang/Boolean;
Expand Down

0 comments on commit 04409db

Please sign in to comment.