mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-31 05:23:28 +01:00 
			
		
		
		
	Correctly report and auto-delete bad APKs (#1251)
This commit is contained in:
		| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Obrni regularni izraz", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Želite li ukloniti aplikaciju?", | ||||
|         "other": "Želite li ukloniti aplikacije?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Invertovat regulární výraz", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Odstranit Apku?", | ||||
|         "other": "Odstranit Apky?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Regulären Ausdruck  invertieren", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "App entfernen?", | ||||
|         "other": "Apps entfernen?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Invert regular expression", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Remove App?", | ||||
|         "other": "Remove Apps?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Invertir expresión regular", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "¿Eliminar Aplicación?", | ||||
|         "other": "¿Eliminar Aplicaciones?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "معکوس کردن عبارت منظم", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "برنامه حذف شود؟", | ||||
|         "other": "برنامه ها حذف شوند؟" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Inverser l'expression régulière", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Supprimer l'application ?", | ||||
|         "other": "Supprimer les applications ?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Invertált reguláris kifejezés", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Eltávolítja az alkalmazást?", | ||||
|         "other": "Eltávolítja az alkalmazást?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Inverti espressione regolare", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Rimuovere l'app?", | ||||
|         "other": "Rimuovere le app?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "正規表現を反転", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "アプリを削除しますか?", | ||||
|         "other": "アプリを削除しますか?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Reguliere expressie omkeren", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "App verwijderen?", | ||||
|         "other": "Apps verwijderen?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Odwróć wyrażenie regularne", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Usunąć aplikację?", | ||||
|         "few": "Usunąć aplikacje?", | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Inverter expressão regular", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Remover aplicativo?", | ||||
|         "other": "Remover aplicativos?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Инвертировать регулярное выражение", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Удалить приложение?", | ||||
|         "other": "Удалить приложения?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Invertera reguljärt uttryck", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Ta Bort App?", | ||||
|         "other": "Ta Bort Appar?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Normal ifadeyi ters çevir", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Uygulamayı Kaldır?", | ||||
|         "other": "Uygulamaları Kaldır?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "Đảo ngược biểu thức chính quy", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "Gỡ ứng dụng?", | ||||
|         "other": "Gỡ ứng dụng?" | ||||
|   | ||||
| @@ -300,6 +300,7 @@ | ||||
|     "invertRegEx": "反转正则表达式", | ||||
|     "note": "Note", | ||||
|     "selfHostedNote": "The \"{}\" dropdown can be used to reach self-hosted/custom instances of any source.", | ||||
|     "badDownload": "The APK could not be parsed (incompatible or partial download)", | ||||
|     "removeAppQuestion": { | ||||
|         "one": "是否删除应用?", | ||||
|         "other": "是否删除应用?" | ||||
|   | ||||
| @@ -532,9 +532,18 @@ class AppsProvider with ChangeNotifier { | ||||
|       {bool needsBGWorkaround = false}) async { | ||||
|     var newInfo = | ||||
|         await pm.getPackageArchiveInfo(archiveFilePath: file.file.path); | ||||
|     if (newInfo == null) { | ||||
|       try { | ||||
|         file.file.deleteSync(recursive: true); | ||||
|       } catch (e) { | ||||
|         // | ||||
|       } finally { | ||||
|         throw ObtainiumError(tr('badDownload')); | ||||
|       } | ||||
|     } | ||||
|     PackageInfo? appInfo = await getInstalledInfo(apps[file.appId]!.app.id); | ||||
|     if (appInfo != null && | ||||
|         newInfo!.versionCode! < appInfo.versionCode! && | ||||
|         newInfo.versionCode! < appInfo.versionCode! && | ||||
|         !(await canDowngradeApps())) { | ||||
|       throw DowngradeError(); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user