forked from geode-sdk/android-launcher
good one
This commit is contained in:
1 file changed
+4
-1
@@ -44,7 +44,8 @@ import java.net.UnknownHostException
|
|||||||
|
|
||||||
fun clearDownloadedApks(context: Context) {
|
fun clearDownloadedApks(context: Context) {
|
||||||
// technically we should be using the activity results but it was too inconsistent for my liking
|
// technically we should be using the activity results but it was too inconsistent for my liking
|
||||||
val performCleanup = PreferenceUtils.get(context).getBoolean(PreferenceUtils.Key.CLEANUP_APKS)
|
val preferenceUtils = PreferenceUtils.get(context)
|
||||||
|
val performCleanup = preferenceUtils.getBoolean(PreferenceUtils.Key.CLEANUP_APKS)
|
||||||
if (!performCleanup) {
|
if (!performCleanup) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -57,6 +58,8 @@ fun clearDownloadedApks(context: Context) {
|
|||||||
}?.forEach {
|
}?.forEach {
|
||||||
it.delete()
|
it.delete()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
preferenceUtils.setBoolean(PreferenceUtils.Key.CLEANUP_APKS, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun generateInstallIntent(uri: Uri): Intent {
|
fun generateInstallIntent(uri: Uri): Intent {
|
||||||
|
|||||||
Reference in new issue
Block a user