Skip to content

Commit

Permalink
Merge pull request #135 from adjust/state_protection
Browse files Browse the repository at this point in the history
State protection
  • Loading branch information
Uglješa Erceg committed Jul 17, 2015
2 parents 2c079dd + 7635a7d commit 371059a
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Adjust/adjust/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "4.0.9"
versionName "4.1.0"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ public void setEnabled(boolean enabled) {
}

this.enabled = enabled;
if (activityState != null) {

if (activityState == null) {
trackSubsessionStart();
} else {
activityState.enabled = enabled;
writeActivityState();
}
Expand Down Expand Up @@ -209,6 +212,10 @@ public void setOfflineMode(boolean offline) {

this.offline = offline;

if (activityState == null) {
trackSubsessionStart();
}

updateStatus(offline,
"Pausing package and attribution handler to put in offline mode",
"Package and attribution handler remain paused because the SDK is disabled",
Expand Down
2 changes: 1 addition & 1 deletion Adjust/adjust/src/main/java/com/adjust/sdk/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface Constants {
String BASE_URL = "https://app.adjust.com";
String SCHEME = "https";
String AUTHORITY = "app.adjust.com";
String CLIENT_SDK = "android4.0.9";
String CLIENT_SDK = "android4.1.0";
String LOGTAG = "Adjust";

String ACTIVITY_STATE_FILENAME = "AdjustIoActivityState";
Expand Down
2 changes: 1 addition & 1 deletion Adjust/example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ dependencies {
// running mvn package
//compile fileTree(dir: '../target', include: ['*.jar'])
// using maven repository
//compile 'com.adjust.sdk:adjust-android:4.0.9'
//compile 'com.adjust.sdk:adjust-android:4.1.0'
}
2 changes: 1 addition & 1 deletion Adjust/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>adjust-android</artifactId>
<groupId>com.adjust.sdk</groupId>
<version>4.0.9</version>
<version>4.1.0</version>
<packaging>jar</packaging>
<name>Adjust Android SDK</name>
<url>https://github.com/adjust/android_sdk</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ public void testDisable() {
config.setLogLevel(LogLevel.ERROR);

// start activity handler with config
ActivityHandler activityHandler = getActivityHandler(config);
ActivityHandler activityHandler = ActivityHandler.getInstance(config);

// check that is true by default
assertUtil.isTrue(activityHandler.isEnabled());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public TestActivityPackage(ActivityPackage activityPackage) {
// default values
appToken = "123456789012";
environment = "sandbox";
clientSdk = "android4.0.9";
clientSdk = "android4.1.0";
suffix = "";
attribution = new AdjustAttribution();
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ compile project(":adjust")
If you are using Maven, add this line instead:

```
compile 'com.adjust.sdk:adjust-android:4.0.9'
compile 'com.adjust.sdk:adjust-android:4.1.0'
```

### 4. Add Google Play Services
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.9
4.1.0
2 changes: 1 addition & 1 deletion doc/migrate.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Migrate your adjust SDK for Android to 4.0.9 from 3.6.2
## Migrate your adjust SDK for Android to 4.1.0 from 3.6.2

### The Application class

Expand Down

0 comments on commit 371059a

Please sign in to comment.