Skip to content

Commit

Permalink
added Tiramasu support with API check for older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Malandruccolo committed May 13, 2024
1 parent cb17313 commit a6941ab
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@ class FlutterRequestAgentProvider {

private void processGameAndNewsTemplateVersions(Context context) {
try {
ApplicationInfo info =
context
.getApplicationContext()
.getPackageManager()
.getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA);
ApplicationInfo info;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.TIRAMISU) {
info = context
.getApplicationContext()
.getPackageManager()
.getApplicationInfo(context.getPackageName(), PackageManager.ApplicationInfoFlags.of(PackageManager.GET_META_DATA));
} else {
info = context
.getApplicationContext()
.getPackageManager()
.getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA);
}
Bundle metaData = info.metaData;
if (metaData != null) {
gameTemplateVersion = info.metaData.getString(GAME_VERSION_KEY);
Expand Down

0 comments on commit a6941ab

Please sign in to comment.