Fixed preference bug

Version fix
This commit is contained in:
Pupil
2020-02-15 01:59:42 +09:00
parent 5c768d2121
commit 5dea35343b
3 changed files with 3 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ android {
minSdkVersion 16
targetSdkVersion 29
versionCode 42
versionName "4.6-beta2"
versionName "4.6-beta3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true

View File

@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":42,"versionName":"4.6-beta1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":42,"versionName":"4.6-beta3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

View File

@@ -47,7 +47,7 @@ class Pupil : MultiDexApplication() {
val preference = PreferenceManager.getDefaultSharedPreferences(this)
try {
PreferenceManager.getDefaultSharedPreferences(this).getInt("dl_location", 0)
preference.getString("dl_location", null)
} catch (e: Exception) {
preference.edit().remove("dl_location").apply()
}
@@ -58,11 +58,6 @@ class Pupil : MultiDexApplication() {
if (BuildConfig.DEBUG)
FirebaseAnalytics.getInstance(this).setAnalyticsCollectionEnabled(false)
val file = preference.getString("dl_location", null)
if (file?.startsWith("content") == true)
preference.edit().remove("dl_location").apply()
try {
ProviderInstaller.installIfNeeded(this)
} catch (e: GooglePlayServicesRepairableException) {