Skip to content

Commit

Permalink
Fixed pre android 4.4 crash
Browse files Browse the repository at this point in the history
  • Loading branch information
uholeschak committed Jan 24, 2018
1 parent dccfc40 commit 3bca54a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion BmwDeepObd/ExpansionDownloaderActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,16 @@ public static string GetObbFilename(Context context)
packageVersion = packageInfo.VersionCode;
}
string obbFile = null;
Java.IO.File[] obbDirs = context.GetObbDirs();
Java.IO.File[] obbDirs;
// ReSharper disable once ConvertIfStatementToConditionalTernaryExpression
if (Build.VERSION.SdkInt >= BuildVersionCodes.Kitkat)
{
obbDirs = context.GetObbDirs();
}
else
{
obbDirs = new [] { context.ObbDir };
}
foreach (Java.IO.File dir in obbDirs)
{
try
Expand Down

0 comments on commit 3bca54a

Please sign in to comment.