From d0d604955480414e9d35e47d101e8cb1ecc717a1 Mon Sep 17 00:00:00 2001 From: Peter Osterlund Date: Tue, 7 Apr 2020 19:55:24 +0200 Subject: [PATCH] Split line to try to understand crash reports --- .../src/main/java/org/petero/droidfish/PieceSet.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DroidFishApp/src/main/java/org/petero/droidfish/PieceSet.java b/DroidFishApp/src/main/java/org/petero/droidfish/PieceSet.java index b03c263..acc2517 100644 --- a/DroidFishApp/src/main/java/org/petero/droidfish/PieceSet.java +++ b/DroidFishApp/src/main/java/org/petero/droidfish/PieceSet.java @@ -18,7 +18,9 @@ package org.petero.droidfish; +import android.content.Context; import android.content.SharedPreferences; +import android.content.res.AssetManager; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; @@ -155,7 +157,9 @@ public class PieceSet { String set = availPieceSets.contains(cachedPieceSet) ? cachedPieceSet : defaultPieceSet; String name = "pieces/" + set + ".zip"; - InputStream is = DroidFishApp.getContext().getAssets().open(name); + Context ctx = DroidFishApp.getContext(); + AssetManager assets = ctx.getAssets(); + InputStream is = assets.open(name); return new ZipInputStream(is); }