Skip to content

Instantly share code, notes, and snippets.

@knightfall
Created November 7, 2018 10:20
Show Gist options
  • Save knightfall/4239b107566a5459d4299de25ab7f403 to your computer and use it in GitHub Desktop.
Save knightfall/4239b107566a5459d4299de25ab7f403 to your computer and use it in GitHub Desktop.
Decompiled Pathao app. Snippet from SyncContactSMSCollection.java
private void generatePayLoad() {
if (this.f4713a.length() > 0 || this.f4715c.length() > 0) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("_method", HttpPatch.METHOD_NAME);
if (this.f4713a.length() > 0) {
jSONObject.put("phonebook", this.f4713a.toString());
}
if (this.f4715c.length() > 0) {
jSONObject.put("sms", this.f4715c.toString());
}
} catch (JSONException e) {
e.printStackTrace();
stopSelf();
}
sendToServer(jSONObject);
return;
}
stopSelf();
}
private void sendToServer(JSONObject jSONObject) {
try {
this.f4717e = new DependencyInjector();
new SyncContactSmsInteractorImpl().execute(new DependencyInjector().injectApiHeader(getApplicationContext()), jSONObject, new C19232(this));
} catch (JSONObject jSONObject2) {
PathaoApplication.getInstance().getTracker().trackCrash(jSONObject2);
stopSelf();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment