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

various fixes

This commit is contained in:
X1nto 2020-06-22 19:17:58 +04:00
parent b809039e1f
commit dbcb60d6a3
3 changed files with 14 additions and 22 deletions

File diff suppressed because one or more lines are too long

View file

@ -14,7 +14,6 @@ class AppUninstallerService: Service() {
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
when (intent?.getIntExtra(PackageInstaller.EXTRA_STATUS, -999)) {
PackageInstaller.STATUS_PENDING_USER_ACTION -> {
Toast.makeText(this, "Installing...", Toast.LENGTH_SHORT).show()
Log.d(AppInstallerService.TAG, "Requesting user confirmation for installation")
val confirmationIntent = intent.getParcelableExtra<Intent>(Intent.EXTRA_INTENT)
confirmationIntent?.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
@ -32,6 +31,7 @@ class AppUninstallerService: Service() {
Log.d("VMpm", "Failed to uninstall ${PackageInstaller.EXTRA_PACKAGE_NAME}")
}
}
stopSelf()
return START_NOT_STICKY
}

View file

@ -59,9 +59,9 @@ class MainActivity : Main() {
if (intent.getStringExtra("package") == "split")
launchVanced(this@MainActivity)
else
installAlertBuilder(getString(R.string.microg_installed), this@MainActivity)
regularPackageInstalled(getString(R.string.microg_installed), this@MainActivity)
}
INSTALL_FAILED -> regularPackageInstalled(intent.getStringExtra("errorMsg") as String, this@MainActivity)
INSTALL_FAILED -> installAlertBuilder(intent.getStringExtra("errorMsg") as String, this@MainActivity)
APP_UNINSTALLED -> restartActivity()
APP_NOT_UNINSTALLED -> installAlertBuilder(getString(R.string.failed_uninstall) + intent.getStringExtra("pkgName"), this@MainActivity)
}