feat: Ensure installation of stock APK during root installation#126
feat: Ensure installation of stock APK during root installation#126
Conversation
| internal class PackageNameRequiredException internal constructor() : Exception("Package name is required") | ||
| internal class NoRootPermissionException internal constructor() : Exception("No root permission") | ||
| internal class NoRootPermissionException internal constructor() : | ||
| Exception("Root permission is not granted") |
There was a problem hiding this comment.
Isnt no root permission simpler
| val stockApk: Apk, | ||
| ) : InstallerOptions(patchedApk) | ||
|
|
||
| class Apk(file: File, val packageName: String, val versionName: String) : Installer.Apk(file) No newline at end of file |
There was a problem hiding this comment.
Any reason this class is inside the RootInstallerOptions.kt class? Class apk is inside the Installer class, so this class should be inside RootInstaller.kt
There was a problem hiding this comment.
You are right, but since the options were moved out of the Installer class, maybe class APK should move to InstallerOptions instead since thats where it's usage is
There was a problem hiding this comment.
Would be breaking change, refactoring like this can come in another PR, for now put APK in RootInstaller for consistency
| ) | ||
| } | ||
|
|
||
| fun getInstalledVersionName(packageName: String): String = |
There was a problem hiding this comment.
Why were these APIs added here instead of a utils class? Is it because it needs the shell command runner? In the case of a utils class a command runner can be passed to it for this purpose
No description provided.