From 38d9f326dd6cfa5ab25a2a6f18c89a5acd4b9722 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Wed, 17 Aug 2022 08:15:19 +0200 Subject: [PATCH] Rename SplitInstallerService to SplitInstallService --- ...lerService.aidl => ISplitInstallService.aidl} | 2 +- .../installer/AppLoungeSplitInstaller.kt | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) rename fake-store/src/main/aidl/foundation/e/apps/{ISplitInstallerService.aidl => ISplitInstallService.aidl} (95%) diff --git a/fake-store/src/main/aidl/foundation/e/apps/ISplitInstallerService.aidl b/fake-store/src/main/aidl/foundation/e/apps/ISplitInstallService.aidl similarity index 95% rename from fake-store/src/main/aidl/foundation/e/apps/ISplitInstallerService.aidl rename to fake-store/src/main/aidl/foundation/e/apps/ISplitInstallService.aidl index 9a76869..9a1022d 100644 --- a/fake-store/src/main/aidl/foundation/e/apps/ISplitInstallerService.aidl +++ b/fake-store/src/main/aidl/foundation/e/apps/ISplitInstallService.aidl @@ -17,6 +17,6 @@ package foundation.e.apps; -interface ISplitInstallerService { +interface ISplitInstallService { void installSplitModule(String packageName, String moduleName); } \ No newline at end of file diff --git a/fake-store/src/main/java/com/android/vending/splitinstall/installer/AppLoungeSplitInstaller.kt b/fake-store/src/main/java/com/android/vending/splitinstall/installer/AppLoungeSplitInstaller.kt index d555865..8adf29f 100644 --- a/fake-store/src/main/java/com/android/vending/splitinstall/installer/AppLoungeSplitInstaller.kt +++ b/fake-store/src/main/java/com/android/vending/splitinstall/installer/AppLoungeSplitInstaller.kt @@ -23,7 +23,7 @@ import android.content.Intent import android.content.ServiceConnection import android.os.IBinder import com.android.vending.splitinstall.SplitInstaller -import foundation.e.apps.ISplitInstallerService +import foundation.e.apps.ISplitInstallService class AppLoungeSplitInstaller( private val context: Context @@ -31,15 +31,15 @@ class AppLoungeSplitInstaller( companion object { private val ON_DEMAND_DELIVERY_SERVICE_COMPONENT = - ComponentName("foundation.e.apps", "foundation.e.apps.splitinstall.SplitInstallerService") + ComponentName("foundation.e.apps", "foundation.e.apps.splitinstall.SplitInstallService") } - private var service: ISplitInstallerService? = null + private var service: ISplitInstallService? = null private val moduleList = ArrayList() private val serviceConnection = object : ServiceConnection { override fun onServiceConnected(componentName: ComponentName, binder: IBinder) { - service = ISplitInstallerService.Stub.asInterface(binder) + service = ISplitInstallService.Stub.asInterface(binder) installWaitingModules() } @@ -61,9 +61,11 @@ class AppLoungeSplitInstaller( } override fun install(packageName: String, moduleName: String) { - service.let { - service?.installSplitModule(packageName, moduleName) - } ?: moduleList.add(InstallModule(packageName, moduleName)) + if (service == null) { + moduleList.add(InstallModule(packageName, moduleName)) + } + + service?.installSplitModule(packageName, moduleName) } private fun installWaitingModules() { -- GitLab