From 5dea35343be5da5d2d47b8d7092d9a57a20a98b1 Mon Sep 17 00:00:00 2001 From: Pupil Date: Sat, 15 Feb 2020 01:59:42 +0900 Subject: [PATCH] Fixed preference bug Version fix --- app/build.gradle | 2 +- app/release/output.json | 2 +- app/src/main/java/xyz/quaver/pupil/Pupil.kt | 7 +------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 55a0df93..ee89e59f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 diff --git a/app/release/output.json b/app/release/output.json index d176db0a..6d4690c1 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -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":{}}] \ No newline at end of file +[{"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":{}}] \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/Pupil.kt b/app/src/main/java/xyz/quaver/pupil/Pupil.kt index a5512f9c..3d88be27 100644 --- a/app/src/main/java/xyz/quaver/pupil/Pupil.kt +++ b/app/src/main/java/xyz/quaver/pupil/Pupil.kt @@ -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) {