Panagiotis Triantafyllou

sm pass sdk reverts

......@@ -5,7 +5,7 @@ import android.content.res.Configuration;
import ly.warp.sdk.receivers.WarplyBeaconsApplication;
public class WarplyAndroidSDKApplication extends /*WarplyBeaconsApplication*/ Application {
public class WarplyAndroidSDKApplication extends WarplyBeaconsApplication {
// ===========================================================
// Constants
......
......@@ -33,7 +33,7 @@ public class SplashActivity extends BaseActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
mWarplyInitializer = Warply.getWarplyInitializer(this, new WarplyReadyCallback() {
mWarplyInitializer = Warply.getInitializer(this, new WarplyReadyCallback() {
@Override
public void onWarplyReady() {
if (WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) {
......@@ -58,7 +58,7 @@ public class SplashActivity extends BaseActivity {
@Override
protected void onResume() {
super.onResume();
// mWarplyInitializer.initWithPermissions(this);
mWarplyInitializer.initWithPermissions(this);
}
private void checkForAppUpdate() {
......
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.5.4r40'
PUBLISH_VERSION = '4.5.5.4r41'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -237,13 +237,13 @@
<!-- </intent-filter>-->
<!-- </receiver>-->
<!-- <receiver-->
<!-- android:name=".receivers.BluetoothStateChangeReceiver"-->
<!-- android:exported="false">-->
<!-- <intent-filter>-->
<!-- <action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />-->
<!-- </intent-filter>-->
<!-- </receiver>-->
<receiver
android:name=".receivers.BluetoothStateChangeReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
</intent-filter>
</receiver>
<receiver
android:name=".receivers.WarplyInAppNotificationReceiver"
......
......@@ -137,19 +137,6 @@ public enum Warply {
});
}
public static WarplyInitializer getWarplyInitializer(Context context, WarplyReadyCallback callback) {
return new WarplyInitializer(context, true, callback, new WarplyInitializer.WarplyInitCallback() {
@Override
public void onInit(Context context) {
if (context != null) {
INSTANCE.mContext = context.getApplicationContext();
}
initInternal(context);
}
});
}
private static void initInternal(Context context) {
if (/*isInitialized()*/ context == null) {
INSTANCE.check();
......@@ -1993,7 +1980,7 @@ public enum Warply {
@Override
public void onServerPreferencesReceived() {
// changeLocationSettings(true);
// initBeaconsApplicationIfNeed();
initBeaconsApplicationIfNeed();
WarplyUserManager.rewriteTags();
}
};
......
......@@ -7,6 +7,4 @@ public interface WarplyReadyCallback {
void onWarplyInitTimeOut();
void onWarplyPermissionsDenied();
default void onWarplyInitialized() {};
}
......
......@@ -66,24 +66,6 @@ public class WarplyInitializer extends Thread /*implements ActivityCompat.OnRequ
stopThreadLock.set(true);
}
public WarplyInitializer(Context context, boolean isInternal, WarplyReadyCallback readyCallback, WarplyInitCallback initCallback) {
// this.mPermissionsResultRequested = false;
this.mContext = context;
this.mReadyCallback = readyCallback;
this.mInitCallback = initCallback;
if (mMainThreadHandler == null) {
mMainThreadHandler = new Handler(Looper.getMainLooper());
}
if (stopThreadLock == null) {
stopThreadLock = new AtomicBoolean(true);
}
stopThreadLock.set(true);
init();
}
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
......@@ -179,18 +161,6 @@ public class WarplyInitializer extends Thread /*implements ActivityCompat.OnRequ
public synchronized void init() {
stopThreadLock.set(true);
/* New code */
if (Warply.INSTANCE.mContext != null) {
if (mReadyCallback != null) {
mMainThreadHandler.post(new Runnable() {
@Override
public void run() {
mReadyCallback.onWarplyInitialized();
}
});
}
} else {
mInitCallback.onInit(mContext);
try {
super.start(); // call run()
......@@ -200,19 +170,6 @@ public class WarplyInitializer extends Thread /*implements ActivityCompat.OnRequ
}
}
}
/* New code */
/* Old code */
// mInitCallback.onInit(mContext);
// try {
// super.start(); // call run()
// } catch (IllegalThreadStateException e) {
// if (WarpConstants.DEBUG) {
// e.printStackTrace();
// }
// }
/* Old code */
}
public synchronized void initWithPermissions(Activity activity) {
mContext = activity;
......