Skip to content

Commit

Permalink
Fixing a security issue which is banned by google play.
Browse files Browse the repository at this point in the history
  • Loading branch information
BahadirBulduk committed Jul 11, 2017
1 parent 34a23f8 commit 590a6f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions library/build.gradle
Expand Up @@ -2,10 +2,10 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
buildToolsVersion '23.0.3'

defaultConfig {
minSdkVersion 3
minSdkVersion 9
targetSdkVersion 23
consumerProguardFiles 'proguard.txt'
}
Expand Down
Expand Up @@ -97,7 +97,7 @@ public void addCookie(Cookie cookie) {
SharedPreferences.Editor prefsWriter = cookiePrefs.edit();
prefsWriter.putString(COOKIE_NAME_STORE, TextUtils.join(",", cookies.keySet()));
prefsWriter.putString(COOKIE_NAME_PREFIX + name, encodeCookie(new SerializableCookie(cookie)));
prefsWriter.commit();
prefsWriter.apply();
}

@Override
Expand All @@ -108,7 +108,7 @@ public void clear() {
prefsWriter.remove(COOKIE_NAME_PREFIX + name);
}
prefsWriter.remove(COOKIE_NAME_STORE);
prefsWriter.commit();
prefsWriter.apply();

// Clear cookies from local store
cookies.clear();
Expand Down Expand Up @@ -138,7 +138,7 @@ public boolean clearExpired(Date date) {
if (clearedAny) {
prefsWriter.putString(COOKIE_NAME_STORE, TextUtils.join(",", cookies.keySet()));
}
prefsWriter.commit();
prefsWriter.apply();

return clearedAny;
}
Expand Down Expand Up @@ -168,7 +168,7 @@ public void deleteCookie(Cookie cookie) {
cookies.remove(name);
SharedPreferences.Editor prefsWriter = cookiePrefs.edit();
prefsWriter.remove(COOKIE_NAME_PREFIX + name);
prefsWriter.commit();
prefsWriter.apply();
}

/**
Expand Down
6 changes: 3 additions & 3 deletions sample/build.gradle
Expand Up @@ -9,18 +9,18 @@ repositories {

android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
buildToolsVersion '23.0.3'

defaultConfig {
minSdkVersion 3
minSdkVersion 9
targetSdkVersion 23
}

productFlavors {
standard {
}
withLeakCanary {
minSdkVersion 8
minSdkVersion 9
targetSdkVersion 23
}
}
Expand Down

0 comments on commit 590a6f2

Please sign in to comment.