File tree Expand file tree Collapse file tree 9 files changed +21
-8
lines changed
src/main/java/com/adjust/sdk
test/src/androidTest/java/com/adjust/sdk/test Expand file tree Collapse file tree 9 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ android {
88 minSdkVersion 9
99 targetSdkVersion 21
1010 versionCode 1
11- versionName " 4.1.0 "
11+ versionName " 4.1.1 "
1212 }
1313}
1414
Original file line number Diff line number Diff line change @@ -507,6 +507,8 @@ private void processSession() {
507507 }
508508
509509 private void checkAttributionState () {
510+ if (!checkActivityState (activityState )) { return ; }
511+
510512 // if it's a new session
511513 if (activityState .subsessionCount <= 1 ) {
512514 return ;
@@ -530,6 +532,7 @@ private void endInternal() {
530532 }
531533
532534 private void trackEventInternal (AdjustEvent event ) {
535+ if (!checkActivityState (activityState )) return ;
533536 if (!isEnabled ()) return ;
534537 if (!checkEvent (event )) return ;
535538
@@ -710,6 +713,8 @@ private void launchDeeplinkMain(String deeplink) {
710713 }
711714
712715 private boolean updateActivityState (long now ) {
716+ if (!checkActivityState (activityState )) { return false ; }
717+
713718 long lastInterval = now - activityState .lastActivity ;
714719 // ignore late updates
715720 if (lastInterval > SESSION_INTERVAL ) {
@@ -799,6 +804,14 @@ private boolean checkEvent(AdjustEvent event) {
799804 return true ;
800805 }
801806
807+ private boolean checkActivityState (ActivityState activityState ) {
808+ if (activityState == null ) {
809+ logger .error ("Missing activity state." );
810+ return false ;
811+ }
812+ return true ;
813+ }
814+
802815 private boolean paused () {
803816 return offline || !isEnabled ();
804817 }
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public interface Constants {
2727 String BASE_URL = "https://app.adjust.com" ;
2828 String SCHEME = "https" ;
2929 String AUTHORITY = "app.adjust.com" ;
30- String CLIENT_SDK = "android4.1.0 " ;
30+ String CLIENT_SDK = "android4.1.1 " ;
3131 String LOGTAG = "Adjust" ;
3232
3333 String ACTIVITY_STATE_FILENAME = "AdjustIoActivityState" ;
Original file line number Diff line number Diff line change @@ -28,5 +28,5 @@ dependencies {
2828 // running mvn package
2929 // compile fileTree(dir: '../target', include: ['*.jar'])
3030 // using maven repository
31- // compile 'com.adjust.sdk:adjust-android:4.1.0 '
31+ // compile 'com.adjust.sdk:adjust-android:4.1.1 '
3232}
Original file line number Diff line number Diff line change 55 <modelVersion >4.0.0</modelVersion >
66 <artifactId >adjust-android</artifactId >
77 <groupId >com.adjust.sdk</groupId >
8- <version >4.1.0 </version >
8+ <version >4.1.1 </version >
99 <packaging >jar</packaging >
1010 <name >Adjust Android SDK</name >
1111 <url >https://github.com/adjust/android_sdk</url >
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public TestActivityPackage(ActivityPackage activityPackage) {
4747 // default values
4848 appToken = "123456789012" ;
4949 environment = "sandbox" ;
50- clientSdk = "android4.1.0 " ;
50+ clientSdk = "android4.1.1 " ;
5151 suffix = "" ;
5252 attribution = new AdjustAttribution ();
5353 }
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ compile project(":adjust")
5252If you are using Maven, add this line instead:
5353
5454```
55- compile 'com.adjust.sdk:adjust-android:4.1.0 '
55+ compile 'com.adjust.sdk:adjust-android:4.1.1 '
5656```
5757
5858### 4. Add Google Play Services
Original file line number Diff line number Diff line change 1- 4.1.0
1+ 4.1.1
Original file line number Diff line number Diff line change 1- ## Migrate your adjust SDK for Android to 4.1.0 from 3.6.2
1+ ## Migrate your adjust SDK for Android to 4.1.1 from 3.6.2
22
33### The Application class
44
You can’t perform that action at this time.
0 commit comments