diff --git a/fake-store/src/main/java/com/android/vending/SplitInstallService.kt b/fake-store/src/main/java/com/android/vending/SplitInstallService.kt index c5524ed2e1eefa575d1c91d7fd850a109cc83ec1..3d209c72d4c826c0e83bf3668041cc06b7ed9f16 100644 --- a/fake-store/src/main/java/com/android/vending/SplitInstallService.kt +++ b/fake-store/src/main/java/com/android/vending/SplitInstallService.kt @@ -68,7 +68,16 @@ class SplitInstallService : Service() { callback: ISplitInstallServiceCallback ) { for (element in list) { - mSplitInstaller.install(packageName, element.get("module_name").toString()) + val apk = element.getString("module_name") ?: element.getString("language") + apk?.let { + mSplitInstaller.install(packageName, apk) + } ?: logBundleError(element) + } + } + + private fun logBundleError(bundle: Bundle) { + for (entry in bundle.keySet()) { + Log.e(TAG, "Unknown bundle entry: $entry. Value is ${bundle.get(entry)}") } }