refresh icons on uninstall

This commit is contained in:
tibbi
2022-09-19 18:44:30 +02:00
parent d3bdfbf1af
commit ed9fc728ee
6 changed files with 105 additions and 74 deletions

View File

@ -11,6 +11,7 @@ import android.widget.PopupMenu
import com.simplemobiletools.commons.extensions.getPopupMenuTheme
import com.simplemobiletools.commons.extensions.showErrorToast
import com.simplemobiletools.launcher.R
import com.simplemobiletools.launcher.helpers.UNINSTALL_APP_REQUEST_CODE
fun Activity.launchApp(packageName: String) {
val launchIntent = packageManager.getLaunchIntentForPackage(packageName)
@ -31,7 +32,7 @@ fun Activity.launchAppInfo(packageName: String) {
fun Activity.uninstallApp(packageName: String) {
Intent(Intent.ACTION_DELETE).apply {
data = Uri.fromParts("package", packageName, null)
startActivity(this)
startActivityForResult(this, UNINSTALL_APP_REQUEST_CODE)
}
}