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 committed by Chirayu Desai
parent 643247b600
commit 3487c91ba3

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)