0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-10 12:55:06 +00:00

removed signature check for root vanced

This commit is contained in:
Xinto 2020-10-01 17:02:05 +04:00
parent d5bf4b0a80
commit add5992657
2 changed files with 2 additions and 4 deletions

View file

@ -12,6 +12,7 @@ import com.beust.klaxon.JsonObject
import com.vanced.manager.BuildConfig.ENABLE_SIGNATURE_CHECK
import com.vanced.manager.R
import com.vanced.manager.utils.AppUtils.managerPkg
import com.vanced.manager.utils.AppUtils.vancedRootPkg
import com.vanced.manager.utils.PackageHelper.isPackageInstalled
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@ -54,7 +55,7 @@ open class DataModel(
val pm = context.packageManager
return if (toCheck) {
if (ENABLE_SIGNATURE_CHECK) {
if (doSignaturesMatch(managerPkg, pkg))
if (doSignaturesMatch(managerPkg, pkg) || appPkg == vancedRootPkg)
pm.getPackageInfo(pkg, 0).versionName.removeSuffix("-vanced")
else
pm.getPackageInfo(pkg, 0).versionName.removeSuffix("-vanced") + " (${context.getString(R.string.unofficial)})"

View file

@ -91,9 +91,6 @@ open class HomeFragment : Fragment() {
if (!viewModel.vanced.get()?.isOfficial?.get()!!)
showUnofficialAppInstalledDialog(getString(R.string.vanced), vancedPkg, requireActivity())
if (!viewModel.vancedRoot.get()?.isOfficial?.get()!!)
showUnofficialAppInstalledDialog(getString(R.string.vanced), vancedRootPkg, requireActivity())
if (!viewModel.music.get()?.isOfficial?.get()!!)
showUnofficialAppInstalledDialog(getString(R.string.music), musicPkg, requireActivity())