Showing
2 changed files
with
12 additions
and
8 deletions
... | @@ -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.6rc6' | 5 | + PUBLISH_VERSION = '4.5.4.6rc7' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ... | ... |
... | @@ -35,6 +35,7 @@ import android.content.pm.PackageInfo; | ... | @@ -35,6 +35,7 @@ import android.content.pm.PackageInfo; |
35 | import android.content.pm.PackageManager.NameNotFoundException; | 35 | import android.content.pm.PackageManager.NameNotFoundException; |
36 | import android.database.Cursor; | 36 | import android.database.Cursor; |
37 | import android.net.Uri; | 37 | import android.net.Uri; |
38 | +import android.text.TextUtils; | ||
38 | import android.util.Log; | 39 | import android.util.Log; |
39 | 40 | ||
40 | import androidx.appcompat.app.AlertDialog; | 41 | import androidx.appcompat.app.AlertDialog; |
... | @@ -158,18 +159,21 @@ public enum Warply { | ... | @@ -158,18 +159,21 @@ public enum Warply { |
158 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); | 159 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); |
159 | // return; | 160 | // return; |
160 | } | 161 | } |
161 | - if (mContext.get() == null) { | 162 | + if (mContext != null && mContext.get() == null) { |
162 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); | 163 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); |
163 | // return; | 164 | // return; |
164 | } | 165 | } |
165 | - String apiKey = WarplyProperty.getAppUuid(mContext.get()); | 166 | + |
166 | - if (apiKey == null) { | 167 | + if (mContext != null && mContext.get() != null) { |
167 | - WarpUtils.log("Warply application UUID has not been set in the Manifest"); | 168 | + String apiKey = WarplyProperty.getAppUuid(mContext.get()); |
169 | + if (TextUtils.isEmpty(apiKey)) { | ||
170 | + WarpUtils.log("Warply application UUID has not been set in the Manifest"); | ||
168 | // return; | 171 | // return; |
169 | - } | 172 | + } |
170 | - if ((apiKey.length() != 32) && (apiKey.length() != 36)) { | 173 | + if (!TextUtils.isEmpty(apiKey) && (apiKey.length() != 32) && (apiKey.length() != 36)) { |
171 | - WarpUtils.log("Warply application UUID has not been set correclty in the Manifest, key got: " + apiKey); | 174 | + WarpUtils.log("Warply application UUID has not been set correclty in the Manifest, key got: " + apiKey); |
172 | // return; | 175 | // return; |
176 | + } | ||
173 | } | 177 | } |
174 | } | 178 | } |
175 | 179 | ... | ... |
-
Please register or login to post a comment