mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-06-12 21:27:38 +02:00
feat(YouTube - GmsCore support): Show troubleshooting in app text if the user recently changed their account details (#4879)
This commit is contained in:

committed by
GitHub

parent
1d5c6c9351
commit
ab4bdc8a25
@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user