Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f73b95cf authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Fix install of language specific split apk

We were not able to download language specific split apks so far
because they were stored with the "language" key within the
bundle.
parent 4f7380a8
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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)}")
            }
        }