Skip to content

Commit

Permalink
gcmfix v2 is here
Browse files Browse the repository at this point in the history
  • Loading branch information
gdlbo committed Jun 16, 2022
1 parent 87ee01b commit f5c80b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions app/src/main/java/ru/vtosters/lite/audio/gcm/GCMFix.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,15 @@ public static String requestToken() {
Thread.sleep(100);
}
String token = sb.toString();
if (token.equals("EGISTRATION_ERROR")) {
if (token.equals("REGISTRATION_ERROR")) {
return requestToken();
}
rid = 0;
String pub22 = genNewKey();
String sig2 = getSig(pub22);
params.clear();
fillParams(params, sig2, pub22, xappide, Long.parseLong(aid.split(" ")[1].split(":")[0]), true);
doRequest("https://android.clients.google.com/c2dm/register3", "POST", params, aid, new Callback() {
@Override
public void doCallback(String str) {
GCMFix.lambda$requestToken$1(str);
}
});
doRequest("https://android.clients.google.com/c2dm/register3", "POST", params, aid, GCMFix::lambda$requestToken$1);
return token;
} catch (FileNotFoundException e2) {
return requestToken();
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/ru/vtosters/lite/utils/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public static boolean CommentsSort() {
}

public static boolean gcmfix() {
return getBoolValue("gcmfix", true);
return getBoolValue("gcmfix", true) && isValidSignature();
}

public static boolean hasMusicSubscription() {
Expand Down

0 comments on commit f5c80b2

Please sign in to comment.