Skip to content

Commit

Permalink
Fix WebAppPlanInterfaceTest failure by initializing ShadowedText (whi…
Browse files Browse the repository at this point in the history
…ch loads assets) lazily
  • Loading branch information
pasniak committed May 3, 2017
1 parent d36d27c commit 5cef320
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/main/java/com/ds/avare/StorageService.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import com.ds.avare.place.Area;
import com.ds.avare.place.Destination;
import com.ds.avare.place.GameTFR;
import com.ds.avare.place.Obstacle;
import com.ds.avare.place.Plan;
import com.ds.avare.position.Movement;
import com.ds.avare.position.Pan;
Expand All @@ -57,7 +58,6 @@
import com.ds.avare.shapes.TFRShape;
import com.ds.avare.shapes.TileMap;
import com.ds.avare.storage.DataSource;
import com.ds.avare.place.Obstacle;
import com.ds.avare.userDefinedWaypoints.UDWMgr;
import com.ds.avare.utils.BitmapHolder;
import com.ds.avare.utils.InfoLines;
Expand Down Expand Up @@ -369,7 +369,7 @@ public void onCreate() {

mInfoLines = new InfoLines(this);

mShadowedText = new ShadowedText(getApplicationContext());
mShadowedText = null;

mDraw = new Draw();
mPixelDraw = new PixelDraw();
Expand Down Expand Up @@ -1254,6 +1254,9 @@ public void setCheckLists(LinkedList<Checklist> list) {
}

public ShadowedText getShadowedText() {
if (mShadowedText==null) {
mShadowedText = new ShadowedText(getApplicationContext());
}
return mShadowedText;
}

Expand Down

0 comments on commit 5cef320

Please sign in to comment.