Loading app/build.gradle +2 −2 Original line number Diff line number Diff line Loading @@ -10,8 +10,8 @@ android { applicationId "foundation.e.apps" minSdkVersion 21 targetSdkVersion 27 versionCode 3 versionName "1.1.0" versionCode 4 versionName "1.1.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { Loading app/src/main/java/foundation/e/apps/application/ApplicationActivity.kt +5 −2 Original line number Diff line number Diff line Loading @@ -602,7 +602,10 @@ class ApplicationActivity : override fun onDestroy() { super.onDestroy() if (::application.isInitialized) { application.removeListener(this) application.decrementUses() applicationManagerServiceConnection.unbindService(this) } } } app/src/main/java/foundation/e/apps/application/model/Application.kt +23 −5 Original line number Diff line number Diff line Loading @@ -120,18 +120,36 @@ class Application(val packageName: String, private val applicationManager: Appli fun download(context: Context) { val error = assertFullData(context) if (error == null) { if (isAPKArchCompatible()) { downloader = Downloader(info, fullData!!, this) stateManager.notifyDownloading(downloader!!) downloader!!.download(context) synchronized(blocker) { blocker.wait() } } else { stateManager.notifyError(Error.APK_INCOMPATIBLE) onDownloadComplete(context, DownloadManager.STATUS_FAILED) } } else { stateManager.notifyError(error) onDownloadComplete(context, DownloadManager.STATUS_FAILED) } } private fun isAPKArchCompatible(): Boolean { val apkArchitecture: String? = fullData!!.getLastVersion()?.apkArchitecture return if (apkArchitecture != null) { if (apkArchitecture == "universal") { true } else { android.os.Build.SUPPORTED_ABIS.toList().contains(apkArchitecture) } } else { false } } override fun onDownloadComplete(context: Context, status: Int) { if (status == DownloadManager.STATUS_SUCCESSFUL) { install(context) Loading app/src/main/java/foundation/e/apps/application/model/Version.kt +2 −1 Original line number Diff line number Diff line Loading @@ -31,4 +31,5 @@ class Version(val downloadFlag: String?, val updateName: String, val privacyRating: Int?, val exodusPermissions: ArrayList<String>?, val exodusTrackers: ArrayList<String>?) No newline at end of file val exodusTrackers: ArrayList<String>?, val apkArchitecture: String) No newline at end of file app/src/main/java/foundation/e/apps/application/model/data/FullData.kt +2 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,8 @@ constructor( name, result["exodus_score"] as Int?, getPermissions(result["exodus_perms"] as ArrayList<String>?), getTrackers(result["exodus_trackers"] as ArrayList<LinkedHashMap<String, String>>?)) getTrackers(result["exodus_trackers"] as ArrayList<LinkedHashMap<String, String>>?), result["architecture"] as String) } } Loading Loading
app/build.gradle +2 −2 Original line number Diff line number Diff line Loading @@ -10,8 +10,8 @@ android { applicationId "foundation.e.apps" minSdkVersion 21 targetSdkVersion 27 versionCode 3 versionName "1.1.0" versionCode 4 versionName "1.1.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { Loading
app/src/main/java/foundation/e/apps/application/ApplicationActivity.kt +5 −2 Original line number Diff line number Diff line Loading @@ -602,7 +602,10 @@ class ApplicationActivity : override fun onDestroy() { super.onDestroy() if (::application.isInitialized) { application.removeListener(this) application.decrementUses() applicationManagerServiceConnection.unbindService(this) } } }
app/src/main/java/foundation/e/apps/application/model/Application.kt +23 −5 Original line number Diff line number Diff line Loading @@ -120,18 +120,36 @@ class Application(val packageName: String, private val applicationManager: Appli fun download(context: Context) { val error = assertFullData(context) if (error == null) { if (isAPKArchCompatible()) { downloader = Downloader(info, fullData!!, this) stateManager.notifyDownloading(downloader!!) downloader!!.download(context) synchronized(blocker) { blocker.wait() } } else { stateManager.notifyError(Error.APK_INCOMPATIBLE) onDownloadComplete(context, DownloadManager.STATUS_FAILED) } } else { stateManager.notifyError(error) onDownloadComplete(context, DownloadManager.STATUS_FAILED) } } private fun isAPKArchCompatible(): Boolean { val apkArchitecture: String? = fullData!!.getLastVersion()?.apkArchitecture return if (apkArchitecture != null) { if (apkArchitecture == "universal") { true } else { android.os.Build.SUPPORTED_ABIS.toList().contains(apkArchitecture) } } else { false } } override fun onDownloadComplete(context: Context, status: Int) { if (status == DownloadManager.STATUS_SUCCESSFUL) { install(context) Loading
app/src/main/java/foundation/e/apps/application/model/Version.kt +2 −1 Original line number Diff line number Diff line Loading @@ -31,4 +31,5 @@ class Version(val downloadFlag: String?, val updateName: String, val privacyRating: Int?, val exodusPermissions: ArrayList<String>?, val exodusTrackers: ArrayList<String>?) No newline at end of file val exodusTrackers: ArrayList<String>?, val apkArchitecture: String) No newline at end of file
app/src/main/java/foundation/e/apps/application/model/data/FullData.kt +2 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,8 @@ constructor( name, result["exodus_score"] as Int?, getPermissions(result["exodus_perms"] as ArrayList<String>?), getTrackers(result["exodus_trackers"] as ArrayList<LinkedHashMap<String, String>>?)) getTrackers(result["exodus_trackers"] as ArrayList<LinkedHashMap<String, String>>?), result["architecture"] as String) } } Loading