mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-30 21:13:28 +01:00 
			
		
		
		
	No longer blocking App ID changes in updates
This commit is contained in:
		| @@ -4,7 +4,6 @@ | |||||||
|     "noVersionFound": "Release-Version nicht ermittelbar", |     "noVersionFound": "Release-Version nicht ermittelbar", | ||||||
|     "urlMatchesNoSource": "URL stimmt mit keiner bekannten Quelle überein", |     "urlMatchesNoSource": "URL stimmt mit keiner bekannten Quelle überein", | ||||||
|     "cantInstallOlderVersion": "Installation einer älteren App-Version nicht möglich", |     "cantInstallOlderVersion": "Installation einer älteren App-Version nicht möglich", | ||||||
|     "appIdMismatch": "Die heruntergeladene Paket-ID stimmt nicht mit der vorhandenen App-ID überein", |  | ||||||
|     "functionNotImplemented": "Diese Klasse hat diese Funktion nicht implementiert", |     "functionNotImplemented": "Diese Klasse hat diese Funktion nicht implementiert", | ||||||
|     "placeholder": "Platzhalter", |     "placeholder": "Platzhalter", | ||||||
|     "someErrors": "Es traten einige Fehler auf", |     "someErrors": "Es traten einige Fehler auf", | ||||||
|   | |||||||
| @@ -4,7 +4,6 @@ | |||||||
|     "noVersionFound": "Could not determine release version", |     "noVersionFound": "Could not determine release version", | ||||||
|     "urlMatchesNoSource": "URL does not match a known source", |     "urlMatchesNoSource": "URL does not match a known source", | ||||||
|     "cantInstallOlderVersion": "Cannot install an older version of an App", |     "cantInstallOlderVersion": "Cannot install an older version of an App", | ||||||
|     "appIdMismatch": "Downloaded package ID does not match existing App ID", |  | ||||||
|     "functionNotImplemented": "This class has not implemented this function", |     "functionNotImplemented": "This class has not implemented this function", | ||||||
|     "placeholder": "Placeholder", |     "placeholder": "Placeholder", | ||||||
|     "someErrors": "Some Errors Occurred", |     "someErrors": "Some Errors Occurred", | ||||||
|   | |||||||
| @@ -4,7 +4,6 @@ | |||||||
|     "noVersionFound": "Nem sikerült meghatározni a kiadás verzióját", |     "noVersionFound": "Nem sikerült meghatározni a kiadás verzióját", | ||||||
|     "urlMatchesNoSource": "Az URL nem egyezik ismert forrással", |     "urlMatchesNoSource": "Az URL nem egyezik ismert forrással", | ||||||
|     "cantInstallOlderVersion": "Nem telepíthető egy app régebbi verziója", |     "cantInstallOlderVersion": "Nem telepíthető egy app régebbi verziója", | ||||||
|     "appIdMismatch": "A letöltött csomagazonosító nem egyezik a meglévő app azonosítóval", |  | ||||||
|     "functionNotImplemented": "Ez az osztály nem valósította meg ezt a függvényt", |     "functionNotImplemented": "Ez az osztály nem valósította meg ezt a függvényt", | ||||||
|     "placeholder": "Helykitöltő", |     "placeholder": "Helykitöltő", | ||||||
|     "someErrors": "Néhány hiba történt", |     "someErrors": "Néhány hiba történt", | ||||||
|   | |||||||
| @@ -4,7 +4,6 @@ | |||||||
|     "noVersionFound": "Impossibile determinare la versione della release", |     "noVersionFound": "Impossibile determinare la versione della release", | ||||||
|     "urlMatchesNoSource": "L'URL non corrisponde ad alcuna fonte conosciuta", |     "urlMatchesNoSource": "L'URL non corrisponde ad alcuna fonte conosciuta", | ||||||
|     "cantInstallOlderVersion": "Impossibile installare una versione precedente di un'App", |     "cantInstallOlderVersion": "Impossibile installare una versione precedente di un'App", | ||||||
|     "appIdMismatch": "L'ID del pacchetto scaricato non corrisponde all'ID dell'App esistente", |  | ||||||
|     "functionNotImplemented": "Questa classe non ha implementato questa funzione", |     "functionNotImplemented": "Questa classe non ha implementato questa funzione", | ||||||
|     "placeholder": "Segnaposto", |     "placeholder": "Segnaposto", | ||||||
|     "someErrors": "Si sono verificati degli errori", |     "someErrors": "Si sono verificati degli errori", | ||||||
|   | |||||||
| @@ -4,7 +4,6 @@ | |||||||
|     "noVersionFound": "リリースバージョンを特定できませんでした", |     "noVersionFound": "リリースバージョンを特定できませんでした", | ||||||
|     "urlMatchesNoSource": "URLが既知のソースと一致しません", |     "urlMatchesNoSource": "URLが既知のソースと一致しません", | ||||||
|     "cantInstallOlderVersion": "旧バージョンのアプリをインストールできません", |     "cantInstallOlderVersion": "旧バージョンのアプリをインストールできません", | ||||||
|     "appIdMismatch": "ダウンロードしたパッケージのIDが既存のApp IDと一致しません", |  | ||||||
|     "functionNotImplemented": "このクラスはこの機能を実装していません", |     "functionNotImplemented": "このクラスはこの機能を実装していません", | ||||||
|     "placeholder": "プレースホルダー", |     "placeholder": "プレースホルダー", | ||||||
|     "someErrors": "何らかのエラーが発生しました", |     "someErrors": "何らかのエラーが発生しました", | ||||||
|   | |||||||
| @@ -4,7 +4,6 @@ | |||||||
|     "noVersionFound": "无法确定更新版本", |     "noVersionFound": "无法确定更新版本", | ||||||
|     "urlMatchesNoSource": "URL 与已知来源不符", |     "urlMatchesNoSource": "URL 与已知来源不符", | ||||||
|     "cantInstallOlderVersion": "无法安装旧版应用程序", |     "cantInstallOlderVersion": "无法安装旧版应用程序", | ||||||
|     "appIdMismatch": "下载的软件包名与现有的应用程序包名不一致", |  | ||||||
|     "functionNotImplemented": "该类没有实现此功能", |     "functionNotImplemented": "该类没有实现此功能", | ||||||
|     "placeholder": "占位符", |     "placeholder": "占位符", | ||||||
|     "someErrors": "出现了一些错误", |     "someErrors": "出现了一些错误", | ||||||
|   | |||||||
| @@ -44,10 +44,6 @@ class DowngradeError extends ObtainiumError { | |||||||
|   DowngradeError() : super(tr('cantInstallOlderVersion')); |   DowngradeError() : super(tr('cantInstallOlderVersion')); | ||||||
| } | } | ||||||
|  |  | ||||||
| class IDChangedError extends ObtainiumError { |  | ||||||
|   IDChangedError() : super(tr('appIdMismatch')); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| class NotImplementedError extends ObtainiumError { | class NotImplementedError extends ObtainiumError { | ||||||
|   NotImplementedError() : super(tr('functionNotImplemented')); |   NotImplementedError() : super(tr('functionNotImplemented')); | ||||||
| } | } | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart'; | |||||||
| // ignore: implementation_imports | // ignore: implementation_imports | ||||||
| import 'package:easy_localization/src/localization.dart'; | import 'package:easy_localization/src/localization.dart'; | ||||||
|  |  | ||||||
| const String currentVersion = '0.10.7'; | const String currentVersion = '0.10.8'; | ||||||
| const String currentReleaseTag = | const String currentReleaseTag = | ||||||
|     'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES |     'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES | ||||||
|  |  | ||||||
|   | |||||||
| @@ -347,6 +347,8 @@ class _AppPageState extends State<AppPage> { | |||||||
|                                             if (res.isNotEmpty && mounted) { |                                             if (res.isNotEmpty && mounted) { | ||||||
|                                               Navigator.of(context).pop(); |                                               Navigator.of(context).pop(); | ||||||
|                                             } |                                             } | ||||||
|  |                                           }).catchError((e) { | ||||||
|  |                                             showError(e, context); | ||||||
|                                           }); |                                           }); | ||||||
|                                         }).catchError((e) { |                                         }).catchError((e) { | ||||||
|                                           showError(e, context); |                                           showError(e, context); | ||||||
|   | |||||||
| @@ -179,12 +179,9 @@ class AppsProvider with ChangeNotifier { | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
|     // If the APK package ID is different from the App ID, it is either new (using a placeholder ID) or the ID has changed |     // If the APK package ID is different from the App ID, it is either new (using a placeholder ID) or the ID has changed | ||||||
|     // The former case should be handled (give the App its real ID), the latter is a security issue |     // In either case, the app should be given the new ID | ||||||
|     var newInfo = await PackageArchiveInfo.fromPath(downloadedFile.path); |     var newInfo = await PackageArchiveInfo.fromPath(downloadedFile.path); | ||||||
|     if (app.id != newInfo.packageName) { |     if (app.id != newInfo.packageName) { | ||||||
|       if (apps[app.id] != null && !SourceProvider().isTempId(app.id)) { |  | ||||||
|         throw IDChangedError(); |  | ||||||
|       } |  | ||||||
|       var originalAppId = app.id; |       var originalAppId = app.id; | ||||||
|       app.id = newInfo.packageName; |       app.id = newInfo.packageName; | ||||||
|       downloadedFile = downloadedFile.renameSync( |       downloadedFile = downloadedFile.renameSync( | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev | |||||||
| # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html | ||||||
| # In Windows, build-name is used as the major, minor, and patch parts | # In Windows, build-name is used as the major, minor, and patch parts | ||||||
| # of the product and file versions while build-number is used as the build suffix. | # of the product and file versions while build-number is used as the build suffix. | ||||||
| version: 0.10.7+113 # When changing this, update the tag in main() accordingly | version: 0.10.8+114 # When changing this, update the tag in main() accordingly | ||||||
|  |  | ||||||
| environment: | environment: | ||||||
|   sdk: '>=2.18.2 <3.0.0' |   sdk: '>=2.18.2 <3.0.0' | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user