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
This commit is contained in:
Torsten Grote 2020-10-09 16:03:09 -03:00
parent 28dd799f9c
commit b25af713e5
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF

View file

@ -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)