From 3487c91ba3c7506d53ba7b3dcdac8020e0e77410 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Fri, 9 Oct 2020 16:03:09 -0300 Subject: [PATCH] Do not re-install apps that require splits The app will be shown as failed during restore and the user will be given the opportunity to re-install it manually via an installed ap store --- .../stevesoltys/seedvault/restore/install/ApkRestore.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/com/stevesoltys/seedvault/restore/install/ApkRestore.kt b/app/src/main/java/com/stevesoltys/seedvault/restore/install/ApkRestore.kt index effad8c5..9c35b88e 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/restore/install/ApkRestore.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/restore/install/ApkRestore.kt @@ -137,6 +137,13 @@ internal class ApkRestore( } } + if (metadata.splits != null) { + // do not install APKs that require splits (for now) + Log.w(TAG, "Not installing $packageName because it requires splits.") + collector.emit(installResult.fail(packageName)) + return + } + // install APK and emit updates from it val result = apkInstaller.install(cachedApk, packageName, metadata.installer, installResult) collector.emit(result)