revert method name

This commit is contained in:
Jays2Kings 2021-07-03 00:28:14 -04:00
parent 6ba677f9a4
commit a751f0b396
2 changed files with 4 additions and 4 deletions

View File

@ -261,7 +261,7 @@ class ExtensionManager(
* @param downloadId The id of the download.
* @param result Whether the extension was installed or not.
*/
fun cancelInstallation(downloadId: Long, result: Boolean) {
fun setInstallationResult(downloadId: Long, result: Boolean) {
installer.setInstallationResult(downloadId, result)
}

View File

@ -79,18 +79,18 @@ class ExtensionInstallActivity : Activity() {
finish()
}
PackageInstaller.STATUS_SUCCESS -> {
extensionManager.cancelInstallation(downloadId, true)
extensionManager.setInstallationResult(downloadId, true)
finish()
}
PackageInstaller.STATUS_FAILURE, PackageInstaller.STATUS_FAILURE_ABORTED, PackageInstaller.STATUS_FAILURE_BLOCKED, PackageInstaller.STATUS_FAILURE_CONFLICT, PackageInstaller.STATUS_FAILURE_INCOMPATIBLE, PackageInstaller.STATUS_FAILURE_INVALID, PackageInstaller.STATUS_FAILURE_STORAGE -> {
extensionManager.cancelInstallation(downloadId, false)
extensionManager.setInstallationResult(downloadId, false)
if (status != PackageInstaller.STATUS_FAILURE_ABORTED) {
toast(R.string.could_not_install_extension)
}
finish()
}
else -> {
extensionManager.cancelInstallation(downloadId, false)
extensionManager.setInstallationResult(downloadId, false)
finish()
}
}