Skip to content

Commit

Permalink
Fix null in android code
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson committed Jan 22, 2021
1 parent 85bf3be commit da3d21a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Akavache.Core/Platforms/shared/Registrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public void Register(IMutableDependencyResolver resolver, IReadonlyDependencyRes
#if ANDROID

var packageManager = Application.Context.PackageManager;
var applicationLabel = packageManager?.GetApplicationInfo(Application.Context.PackageName, 0)?.LoadLabel(packageManager);
var packageName = Application.Context.PackageName ?? "Unknown Package";
var applicationLabel = packageManager?.GetApplicationInfo(packageName, 0)?.LoadLabel(packageManager);

BlobCache.ApplicationName = applicationLabel ?? "Unknown";

Expand Down

0 comments on commit da3d21a

Please sign in to comment.