Loading service/java/foundation/e/splitinstall/service/SplitInstallBinder.kt +4 −7 Original line number Diff line number Diff line /* * Copyright ECORP SAS 2022 * Copyright ECORP SAS 2022-2025 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading Loading @@ -33,12 +33,9 @@ class SplitInstallBinder( } override fun installSplitModule(packageName: String, modulePath: String) { Log.i(TAG, "installing $modulePath") val packageManager = applicationContext.packageManager val packageInstaller = packageManager.packageInstaller val params = PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_INHERIT_EXISTING) .apply { val packageInstaller = applicationContext.packageManager.packageInstaller val params = PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_INHERIT_EXISTING).apply { setAppPackageName(packageName) setDontKillApp(true) } Loading service/java/foundation/e/splitinstall/service/SplitInstallBroadcastReceiver.kt +4 −4 Original line number Diff line number Diff line /* * Copyright ECORP SAS 2022 * Copyright ECORP SAS 2022-2025 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading Loading @@ -45,12 +45,12 @@ class SplitInstallBroadcastReceiver : BroadcastReceiver() { } if (extras.get(PM_INSTALL_EXTRA_STATUS_KEY) != MODULE_INSTALLED_SUCCESS_STATUS) { val statusMessage = extras.get(PM_INSTALL_EXTRA_STATUS_MESSAGE_KEY) val statusMessage = extras.getString(PM_INSTALL_EXTRA_STATUS_MESSAGE_KEY) Log.e(TAG, "Could not install a split apk: $statusMessage") return } val updatedPackage = extras.get(PM_INSTALL_EXTRA_PACKAGE_NAME_KEY) val updatedPackage = extras.getString(PM_INSTALL_EXTRA_PACKAGE_NAME_KEY) Log.i(TAG, "Package updated successfully: $updatedPackage") } } service/java/foundation/e/splitinstall/service/SplitInstallService.kt +1 −12 Original line number Diff line number Diff line /* * Copyright ECORP SAS 2022 * Copyright ECORP SAS 2022-2025 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading @@ -16,21 +16,10 @@ package foundation.e.splitinstall.service import android.app.Notification import android.app.NotificationChannel import android.app.NotificationManager import android.app.Service import android.app.PendingIntent import android.content.Context import android.content.Intent import android.content.pm.PackageInstaller.Session import android.content.pm.PackageInstaller.SessionParams import android.os.Build import android.os.IBinder import android.util.Log import foundation.e.splitinstall.service.R import java.io.File class SplitInstallService : Service() { Loading Loading
service/java/foundation/e/splitinstall/service/SplitInstallBinder.kt +4 −7 Original line number Diff line number Diff line /* * Copyright ECORP SAS 2022 * Copyright ECORP SAS 2022-2025 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading Loading @@ -33,12 +33,9 @@ class SplitInstallBinder( } override fun installSplitModule(packageName: String, modulePath: String) { Log.i(TAG, "installing $modulePath") val packageManager = applicationContext.packageManager val packageInstaller = packageManager.packageInstaller val params = PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_INHERIT_EXISTING) .apply { val packageInstaller = applicationContext.packageManager.packageInstaller val params = PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_INHERIT_EXISTING).apply { setAppPackageName(packageName) setDontKillApp(true) } Loading
service/java/foundation/e/splitinstall/service/SplitInstallBroadcastReceiver.kt +4 −4 Original line number Diff line number Diff line /* * Copyright ECORP SAS 2022 * Copyright ECORP SAS 2022-2025 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading Loading @@ -45,12 +45,12 @@ class SplitInstallBroadcastReceiver : BroadcastReceiver() { } if (extras.get(PM_INSTALL_EXTRA_STATUS_KEY) != MODULE_INSTALLED_SUCCESS_STATUS) { val statusMessage = extras.get(PM_INSTALL_EXTRA_STATUS_MESSAGE_KEY) val statusMessage = extras.getString(PM_INSTALL_EXTRA_STATUS_MESSAGE_KEY) Log.e(TAG, "Could not install a split apk: $statusMessage") return } val updatedPackage = extras.get(PM_INSTALL_EXTRA_PACKAGE_NAME_KEY) val updatedPackage = extras.getString(PM_INSTALL_EXTRA_PACKAGE_NAME_KEY) Log.i(TAG, "Package updated successfully: $updatedPackage") } }
service/java/foundation/e/splitinstall/service/SplitInstallService.kt +1 −12 Original line number Diff line number Diff line /* * Copyright ECORP SAS 2022 * Copyright ECORP SAS 2022-2025 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading @@ -16,21 +16,10 @@ package foundation.e.splitinstall.service import android.app.Notification import android.app.NotificationChannel import android.app.NotificationManager import android.app.Service import android.app.PendingIntent import android.content.Context import android.content.Intent import android.content.pm.PackageInstaller.Session import android.content.pm.PackageInstaller.SessionParams import android.os.Build import android.os.IBinder import android.util.Log import foundation.e.splitinstall.service.R import java.io.File class SplitInstallService : Service() { Loading