Skip to content

Commit 9a5a59b

Browse files
refactor
1 parent c141747 commit 9a5a59b

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

extensions/music/src/main/java/app/revanced/extension/music/settings/preference/MusicPreferenceFragment.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import app.revanced.extension.shared.GmsCoreSupport;
99
import app.revanced.extension.shared.Logger;
1010
import app.revanced.extension.shared.Utils;
11+
import app.revanced.extension.shared.settings.BaseSettings;
1112
import app.revanced.extension.shared.settings.preference.ToolbarPreferenceFragment;
1213

1314
/**
@@ -35,12 +36,12 @@ protected void initialize() {
3536
// Clunky work around until preferences are custom classes that manage themselves.
3637
// Custom branding only works with non-root install. But the preferences must be
3738
// added during patched because of difficulties detecting during patching if it's
38-
// a root install. So instead the non-functional preferences are removed during runtime
39-
// if the app is mount (root) installation.
39+
// a root install. So instead the non-functional preferences are removed during
40+
// runtime if the app is mount (root) installation.
4041
if (GmsCoreSupport.isPackageNameOriginal()) {
4142
removePreferences(
42-
"revanced_custom_branding_name",
43-
"revanced_custom_branding_icon");
43+
BaseSettings.CUSTOM_BRANDING_ICON.key,
44+
BaseSettings.CUSTOM_BRANDING_NAME.key);
4445
}
4546
} catch (Exception ex) {
4647
Logger.printException(() -> "initialize failure", ex);

extensions/shared/library/src/main/java/app/revanced/extension/shared/patches/CustomBrandingPatch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static void setNotificationIcon(Notification.Builder builder) {
7878
try {
7979
if (notificationSmallIcon != 0) {
8080
builder.setSmallIcon(notificationSmallIcon)
81-
.setColor(0x00000000); // Remove YT red tint.
81+
.setColor(Color.TRANSPARENT); // Remove YT red tint.
8282
}
8383
} catch (Exception ex) {
8484
Logger.printException(() -> "setNotificationIcon failure", ex);

extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/preference/YouTubePreferenceFragment.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import app.revanced.extension.shared.GmsCoreSupport;
88
import app.revanced.extension.shared.Logger;
99
import app.revanced.extension.shared.Utils;
10+
import app.revanced.extension.shared.settings.BaseSettings;
1011
import app.revanced.extension.shared.settings.preference.ToolbarPreferenceFragment;
1112
import app.revanced.extension.youtube.settings.YouTubeActivityHook;
1213

@@ -35,12 +36,12 @@ protected void initialize() {
3536
// Clunky work around until preferences are custom classes that manage themselves.
3637
// Custom branding only works with non-root install. But the preferences must be
3738
// added during patched because of difficulties detecting during patching if it's
38-
// a root install. So instead the non-functional preferences are removed during runtime
39-
// if the app is mount (root) installation.
39+
// a root install. So instead the non-functional preferences are removed during
40+
// runtime if the app is mount (root) installation.
4041
if (GmsCoreSupport.isPackageNameOriginal()) {
4142
removePreferences(
42-
"revanced_custom_branding_name",
43-
"revanced_custom_branding_icon");
43+
BaseSettings.CUSTOM_BRANDING_ICON.key,
44+
BaseSettings.CUSTOM_BRANDING_NAME.key);
4445
}
4546
} catch (Exception ex) {
4647
Logger.printException(() -> "initialize failure", ex);

0 commit comments

Comments
 (0)