Panagiotis Triantafyllou

new keys

...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2 2
3 ext { 3 ext {
4 PUBLISH_GROUP_ID = 'ly.warp' 4 PUBLISH_GROUP_ID = 'ly.warp'
5 - PUBLISH_VERSION = '4.5.4.6rc1' 5 + PUBLISH_VERSION = '4.5.4.6rc2'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -191,8 +191,8 @@ public class ContextualActivity extends Activity implements View.OnClickListener ...@@ -191,8 +191,8 @@ public class ContextualActivity extends Activity implements View.OnClickListener
191 .concat(":") 191 .concat(":")
192 .concat(mCCMS.getSessionId())); 192 .concat(mCCMS.getSessionId()));
193 193
194 - new Thread(() -> { 194 +// new Thread(() -> {
195 - if (!Thread.currentThread().isInterrupted()) { 195 +// if (!Thread.currentThread().isInterrupted()) {
196 WarplyManager.submitOrder(new CosmoteSubmitOrderRequest() 196 WarplyManager.submitOrder(new CosmoteSubmitOrderRequest()
197 .setCommunicationUuid("") 197 .setCommunicationUuid("")
198 .setUserMsisdn(mSender) 198 .setUserMsisdn(mSender)
...@@ -219,9 +219,9 @@ public class ContextualActivity extends Activity implements View.OnClickListener ...@@ -219,9 +219,9 @@ public class ContextualActivity extends Activity implements View.OnClickListener
219 .setValidity(mCCMS.getValidity()) 219 .setValidity(mCCMS.getValidity())
220 .setTreatmentCode(mCCMS.getTreatmentCode()), 220 .setTreatmentCode(mCCMS.getTreatmentCode()),
221 mSubmitCallback); 221 mSubmitCallback);
222 - } 222 +// }
223 - Thread.currentThread().interrupt(); 223 +// Thread.currentThread().interrupt();
224 - }).start(); 224 +// }).start();
225 } 225 }
226 226
227 private void askActivateDialog() { 227 private void askActivateDialog() {
...@@ -245,6 +245,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener ...@@ -245,6 +245,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener
245 analyticsEvent.setParameter("successful", "false"); 245 analyticsEvent.setParameter("successful", "false");
246 EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); 246 EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
247 247
248 + if (!isFinishing()) {
248 mAlertDialogErrorActivating = new AlertDialog.Builder(this) 249 mAlertDialogErrorActivating = new AlertDialog.Builder(this)
249 .setTitle(R.string.cos_dlg_error_title) 250 .setTitle(R.string.cos_dlg_error_title)
250 .setMessage(R.string.cos_dlg_error_subtitle) 251 .setMessage(R.string.cos_dlg_error_subtitle)
...@@ -253,6 +254,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener ...@@ -253,6 +254,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener
253 }) 254 })
254 .show(); 255 .show();
255 } 256 }
257 + }
256 258
257 private void successActivatingDialog() { 259 private void successActivatingDialog() {
258 LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); 260 LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
...@@ -291,17 +293,18 @@ public class ContextualActivity extends Activity implements View.OnClickListener ...@@ -291,17 +293,18 @@ public class ContextualActivity extends Activity implements View.OnClickListener
291 @Override 293 @Override
292 public void onSuccess(JSONObject result) { 294 public void onSuccess(JSONObject result) {
293 int status = result.optInt("status", 2); 295 int status = result.optInt("status", 2);
294 - runOnUiThread(() -> { 296 +// runOnUiThread(() -> {
295 if (status == 1) 297 if (status == 1)
296 successActivatingDialog(); 298 successActivatingDialog();
297 else 299 else
298 errorActivatingDialog(); 300 errorActivatingDialog();
299 - }); 301 +// });
300 } 302 }
301 303
302 @Override 304 @Override
303 public void onFailure(int errorCode) { 305 public void onFailure(int errorCode) {
304 - runOnUiThread(() -> errorActivatingDialog()); 306 +// runOnUiThread(() -> errorActivatingDialog());
307 + errorActivatingDialog();
305 } 308 }
306 }; 309 };
307 } 310 }
......