Panagiotis Triantafyllou

new keys

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4.6rc1'
PUBLISH_VERSION = '4.5.4.6rc2'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -191,8 +191,8 @@ public class ContextualActivity extends Activity implements View.OnClickListener
.concat(":")
.concat(mCCMS.getSessionId()));
new Thread(() -> {
if (!Thread.currentThread().isInterrupted()) {
// new Thread(() -> {
// if (!Thread.currentThread().isInterrupted()) {
WarplyManager.submitOrder(new CosmoteSubmitOrderRequest()
.setCommunicationUuid("")
.setUserMsisdn(mSender)
......@@ -219,9 +219,9 @@ public class ContextualActivity extends Activity implements View.OnClickListener
.setValidity(mCCMS.getValidity())
.setTreatmentCode(mCCMS.getTreatmentCode()),
mSubmitCallback);
}
Thread.currentThread().interrupt();
}).start();
// }
// Thread.currentThread().interrupt();
// }).start();
}
private void askActivateDialog() {
......@@ -245,6 +245,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener
analyticsEvent.setParameter("successful", "false");
EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
if (!isFinishing()) {
mAlertDialogErrorActivating = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_error_title)
.setMessage(R.string.cos_dlg_error_subtitle)
......@@ -253,6 +254,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener
})
.show();
}
}
private void successActivatingDialog() {
LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
......@@ -291,17 +293,18 @@ public class ContextualActivity extends Activity implements View.OnClickListener
@Override
public void onSuccess(JSONObject result) {
int status = result.optInt("status", 2);
runOnUiThread(() -> {
// runOnUiThread(() -> {
if (status == 1)
successActivatingDialog();
else
errorActivatingDialog();
});
// });
}
@Override
public void onFailure(int errorCode) {
runOnUiThread(() -> errorActivatingDialog());
// runOnUiThread(() -> errorActivatingDialog());
errorActivatingDialog();
}
};
}
......