Panagiotis Triantafyllou

sm pass sdk reverts

...@@ -5,7 +5,7 @@ import android.content.res.Configuration; ...@@ -5,7 +5,7 @@ import android.content.res.Configuration;
5 5
6 import ly.warp.sdk.receivers.WarplyBeaconsApplication; 6 import ly.warp.sdk.receivers.WarplyBeaconsApplication;
7 7
8 -public class WarplyAndroidSDKApplication extends /*WarplyBeaconsApplication*/ Application { 8 +public class WarplyAndroidSDKApplication extends WarplyBeaconsApplication {
9 9
10 // =========================================================== 10 // ===========================================================
11 // Constants 11 // Constants
......
...@@ -33,7 +33,7 @@ public class SplashActivity extends BaseActivity { ...@@ -33,7 +33,7 @@ public class SplashActivity extends BaseActivity {
33 super.onCreate(savedInstanceState); 33 super.onCreate(savedInstanceState);
34 setContentView(R.layout.activity_splash); 34 setContentView(R.layout.activity_splash);
35 35
36 - mWarplyInitializer = Warply.getWarplyInitializer(this, new WarplyReadyCallback() { 36 + mWarplyInitializer = Warply.getInitializer(this, new WarplyReadyCallback() {
37 @Override 37 @Override
38 public void onWarplyReady() { 38 public void onWarplyReady() {
39 if (WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) { 39 if (WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) {
...@@ -58,7 +58,7 @@ public class SplashActivity extends BaseActivity { ...@@ -58,7 +58,7 @@ public class SplashActivity extends BaseActivity {
58 @Override 58 @Override
59 protected void onResume() { 59 protected void onResume() {
60 super.onResume(); 60 super.onResume();
61 -// mWarplyInitializer.initWithPermissions(this); 61 + mWarplyInitializer.initWithPermissions(this);
62 } 62 }
63 63
64 private void checkForAppUpdate() { 64 private void checkForAppUpdate() {
......
...@@ -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.5.4r40' 5 + PUBLISH_VERSION = '4.5.5.4r41'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -237,13 +237,13 @@ ...@@ -237,13 +237,13 @@
237 <!-- </intent-filter>--> 237 <!-- </intent-filter>-->
238 <!-- </receiver>--> 238 <!-- </receiver>-->
239 239
240 -<!-- <receiver--> 240 + <receiver
241 -<!-- android:name=".receivers.BluetoothStateChangeReceiver"--> 241 + android:name=".receivers.BluetoothStateChangeReceiver"
242 -<!-- android:exported="false">--> 242 + android:exported="false">
243 -<!-- <intent-filter>--> 243 + <intent-filter>
244 -<!-- <action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />--> 244 + <action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
245 -<!-- </intent-filter>--> 245 + </intent-filter>
246 -<!-- </receiver>--> 246 + </receiver>
247 247
248 <receiver 248 <receiver
249 android:name=".receivers.WarplyInAppNotificationReceiver" 249 android:name=".receivers.WarplyInAppNotificationReceiver"
......
...@@ -137,19 +137,6 @@ public enum Warply { ...@@ -137,19 +137,6 @@ public enum Warply {
137 }); 137 });
138 } 138 }
139 139
140 - public static WarplyInitializer getWarplyInitializer(Context context, WarplyReadyCallback callback) {
141 - return new WarplyInitializer(context, true, callback, new WarplyInitializer.WarplyInitCallback() {
142 -
143 - @Override
144 - public void onInit(Context context) {
145 - if (context != null) {
146 - INSTANCE.mContext = context.getApplicationContext();
147 - }
148 - initInternal(context);
149 - }
150 - });
151 - }
152 -
153 private static void initInternal(Context context) { 140 private static void initInternal(Context context) {
154 if (/*isInitialized()*/ context == null) { 141 if (/*isInitialized()*/ context == null) {
155 INSTANCE.check(); 142 INSTANCE.check();
...@@ -1993,7 +1980,7 @@ public enum Warply { ...@@ -1993,7 +1980,7 @@ public enum Warply {
1993 @Override 1980 @Override
1994 public void onServerPreferencesReceived() { 1981 public void onServerPreferencesReceived() {
1995 // changeLocationSettings(true); 1982 // changeLocationSettings(true);
1996 -// initBeaconsApplicationIfNeed(); 1983 + initBeaconsApplicationIfNeed();
1997 WarplyUserManager.rewriteTags(); 1984 WarplyUserManager.rewriteTags();
1998 } 1985 }
1999 }; 1986 };
......
...@@ -7,6 +7,4 @@ public interface WarplyReadyCallback { ...@@ -7,6 +7,4 @@ public interface WarplyReadyCallback {
7 void onWarplyInitTimeOut(); 7 void onWarplyInitTimeOut();
8 8
9 void onWarplyPermissionsDenied(); 9 void onWarplyPermissionsDenied();
10 -
11 - default void onWarplyInitialized() {};
12 } 10 }
......
...@@ -66,24 +66,6 @@ public class WarplyInitializer extends Thread /*implements ActivityCompat.OnRequ ...@@ -66,24 +66,6 @@ public class WarplyInitializer extends Thread /*implements ActivityCompat.OnRequ
66 stopThreadLock.set(true); 66 stopThreadLock.set(true);
67 } 67 }
68 68
69 - public WarplyInitializer(Context context, boolean isInternal, WarplyReadyCallback readyCallback, WarplyInitCallback initCallback) {
70 -
71 -// this.mPermissionsResultRequested = false;
72 - this.mContext = context;
73 - this.mReadyCallback = readyCallback;
74 - this.mInitCallback = initCallback;
75 -
76 - if (mMainThreadHandler == null) {
77 - mMainThreadHandler = new Handler(Looper.getMainLooper());
78 - }
79 -
80 - if (stopThreadLock == null) {
81 - stopThreadLock = new AtomicBoolean(true);
82 - }
83 - stopThreadLock.set(true);
84 - init();
85 - }
86 -
87 // =========================================================== 69 // ===========================================================
88 // Methods for/from SuperClass/Interfaces 70 // Methods for/from SuperClass/Interfaces
89 // =========================================================== 71 // ===========================================================
...@@ -179,39 +161,14 @@ public class WarplyInitializer extends Thread /*implements ActivityCompat.OnRequ ...@@ -179,39 +161,14 @@ public class WarplyInitializer extends Thread /*implements ActivityCompat.OnRequ
179 161
180 public synchronized void init() { 162 public synchronized void init() {
181 stopThreadLock.set(true); 163 stopThreadLock.set(true);
182 - 164 + mInitCallback.onInit(mContext);
183 - /* New code */ 165 + try {
184 - if (Warply.INSTANCE.mContext != null) { 166 + super.start(); // call run()
185 - if (mReadyCallback != null) { 167 + } catch (IllegalThreadStateException e) {
186 - mMainThreadHandler.post(new Runnable() { 168 + if (WarpConstants.DEBUG) {
187 - @Override 169 + e.printStackTrace();
188 - public void run() {
189 - mReadyCallback.onWarplyInitialized();
190 - }
191 - });
192 - }
193 - } else {
194 - mInitCallback.onInit(mContext);
195 - try {
196 - super.start(); // call run()
197 - } catch (IllegalThreadStateException e) {
198 - if (WarpConstants.DEBUG) {
199 - e.printStackTrace();
200 - }
201 } 170 }
202 } 171 }
203 - /* New code */
204 -
205 - /* Old code */
206 -// mInitCallback.onInit(mContext);
207 -// try {
208 -// super.start(); // call run()
209 -// } catch (IllegalThreadStateException e) {
210 -// if (WarpConstants.DEBUG) {
211 -// e.printStackTrace();
212 -// }
213 -// }
214 - /* Old code */
215 } 172 }
216 173
217 public synchronized void initWithPermissions(Activity activity) { 174 public synchronized void initWithPermissions(Activity activity) {
......