Bugfixes and extension installation improvements

This commit is contained in:
inorichi
2018-03-02 18:10:10 +01:00
parent a3c03e8ceb
commit 8e50ac67bc
11 changed files with 94 additions and 49 deletions
@@ -201,6 +201,16 @@ class ExtensionManager(
return installExtension(availableExt)
}
/**
* Sets the result of the installation of an extension.
*
* @param downloadId The id of the download.
* @param result Whether the extension was installed or not.
*/
fun setInstallationResult(downloadId: Long, result: Boolean) {
installer.setInstallationResult(downloadId, result)
}
/**
* Uninstalls the extension that matches the given package name.
*
@@ -295,17 +305,14 @@ class ExtensionManager(
override fun onExtensionInstalled(extension: Extension.Installed) {
registerNewExtension(extension.withUpdateCheck())
installer.onApkInstalled(extension.pkgName)
}
override fun onExtensionUpdated(extension: Extension.Installed) {
registerUpdatedExtension(extension.withUpdateCheck())
installer.onApkInstalled(extension.pkgName)
}
override fun onExtensionUntrusted(extension: Extension.Untrusted) {
untrustedExtensions += extension
installer.onApkInstalled(extension.pkgName)
}
override fun onPackageUninstalled(pkgName: String) {