File tree Expand file tree Collapse file tree 6 files changed +20
-0
lines changed
Expand file tree Collapse file tree 6 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ package com.rosan.installer.data.app.model.exception
2+
3+ class InstallFailedHyperOSIsolationViolation : Exception {
4+ constructor () : super ()
5+
6+ constructor (message: String? ) : super (message)
7+ }
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import com.rosan.installer.data.app.model.exception.InstallFailedContainerErrorE
1010import com.rosan.installer.data.app.model.exception.InstallFailedCpuAbiIncompatibleException
1111import com.rosan.installer.data.app.model.exception.InstallFailedDexOptException
1212import com.rosan.installer.data.app.model.exception.InstallFailedDuplicatePackageException
13+ import com.rosan.installer.data.app.model.exception.InstallFailedHyperOSIsolationViolation
1314import com.rosan.installer.data.app.model.exception.InstallFailedInsufficientStorageException
1415import com.rosan.installer.data.app.model.exception.InstallFailedInvalidAPKException
1516import com.rosan.installer.data.app.model.exception.InstallFailedInvalidInstallLocationException
@@ -86,6 +87,8 @@ class PackageManagerUtil {
8687
8788 const val INSTALL_FAILED_REJECTED_BY_BUILDTYPE = - 3001
8889
90+ const val INSTALL_FAILED_HYPEROS_ISOLATION_VIOLATION = - 1000
91+
8992 fun installResultVerify (
9093 context : Context ,
9194 receiver : IBinderInstallerRepoImpl .LocalIntentReceiver
@@ -169,6 +172,10 @@ class PackageManagerUtil {
169172 ecpMsg
170173 )
171174
175+ INSTALL_FAILED_HYPEROS_ISOLATION_VIOLATION -> InstallFailedHyperOSIsolationViolation (
176+ ecpMsg
177+ )
178+
172179 else -> IllegalStateException (ecpMsg)
173180 }
174181 }
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import com.rosan.installer.data.app.model.exception.InstallFailedContainerErrorE
1010import com.rosan.installer.data.app.model.exception.InstallFailedCpuAbiIncompatibleException
1111import com.rosan.installer.data.app.model.exception.InstallFailedDexOptException
1212import com.rosan.installer.data.app.model.exception.InstallFailedDuplicatePackageException
13+ import com.rosan.installer.data.app.model.exception.InstallFailedHyperOSIsolationViolation
1314import com.rosan.installer.data.app.model.exception.InstallFailedInsufficientStorageException
1415import com.rosan.installer.data.app.model.exception.InstallFailedInvalidAPKException
1516import com.rosan.installer.data.app.model.exception.InstallFailedInvalidInstallLocationException
@@ -72,6 +73,7 @@ private fun Throwable.getStringResourceId(): Int {
7273 is InstallFailedUidChangedException -> R .string.exception_install_failed_uid_changed
7374 is InstallFailedVersionDowngradeException -> R .string.exception_install_failed_version_downgrade
7475 is InstallFailedRejectedByBuildTypeException -> R .string.exception_install_failed_rejected_by_build_type
76+ is InstallFailedHyperOSIsolationViolation -> R .string.exception_install_failed_hyperos_isolation_violation
7577 is ShizukuNotWorkException -> R .string.exception_shizuku_not_work
7678 is DhizukuNotWorkException -> R .string.exception_dhizuku_not_work
7779 is RootNotWorkException -> R .string.exception_root_not_work
Original file line number Diff line number Diff line change 175175 <string name =" new_version_prefix" >新</string >
176176 <string name =" install_choice" >安装包选择</string >
177177 <string name =" installer_error_reason" >错误原因</string >
178+ <string name =" exception_install_failed_hyperos_isolation_violation" >HyperOS安装系统app需要声明有效安装者!</string >
178179</resources >
Original file line number Diff line number Diff line change 174174 <string name =" new_version_prefix" >新</string >
175175 <string name =" install_choice" >安裝包選擇</string >
176176 <string name =" installer_error_reason" >錯誤原因</string >
177+ <string name =" exception_install_failed_hyperos_isolation_violation" >HyperOS 安裝系統應用程式需要聲明有效的安裝者!</string >
177178</resources >
Original file line number Diff line number Diff line change 171171 <string name =" exception_install_failed_uid_changed" >The UID has changed, please uninstall and try again</string >
172172 <string name =" exception_install_failed_version_downgrade" >Downgrade failed, please uninstall the app and try again</string >
173173 <string name =" exception_install_failed_rejected_by_build_type" >Rejected by system build type</string >
174+ <string name =" exception_install_failed_hyperos_isolation_violation" >Please Add a valid install source for installing system app</string >
174175
175176 <string name =" exception_shizuku_not_work" >Please activate Sui or Shizuku and grant permission</string >
176177 <string name =" exception_dhizuku_not_work" >Please activate Dhizuku and grant permission</string >
179180 <string name =" old_version_prefix" >Current</string >
180181 <string name =" new_version_prefix" >New</string >
181182 <string name =" install_choice" >Select PKG</string >
183+
182184</resources >
You can’t perform that action at this time.
0 commit comments