feat(YouTube - GmsCore support): Show troubleshooting in app text if the user recently changed their account details (#4879)

This commit is contained in:
LisoUseInAIKyrios
2025-04-29 13:36:29 +04:00
committed by GitHub
parent 1d5c6c9351
commit ab4bdc8a25
6 changed files with 143 additions and 4 deletions

View File

@ -0,0 +1,28 @@
package app.revanced.extension.youtube.patches;
import static app.revanced.extension.shared.StringRef.sf;
import app.revanced.extension.shared.Logger;
import app.revanced.extension.shared.Utils;
@SuppressWarnings("unused")
public class AccountCredentialsInvalidTextPatch {
/**
* Injection point.
*/
public static String getOfflineNetworkErrorString(String original) {
try {
if (Utils.isNetworkConnected()) {
Logger.printDebug(() -> "Network appears to be online, but app is showing offline error");
return '\n' + sf("microg_offline_account_login_error").toString();
}
Logger.printDebug(() -> "Network is offline");
} catch (Exception ex) {
Logger.printException(() -> "getOfflineNetworkErrorString failure", ex);
}
return original;
}
}