private void buildSync() {
      Activity activity = (Activity) mTileView.getContext();
      if (activity == null) {
        Log.d("TileView", "could not not cast context to activity during preparation");
        return;
      }
      // if the user provided a custom provider, use that, otherwise default to assets
      if (mStreamProvider == null) {
        mStreamProvider = new StreamProviderAssets();
      }
      MemoryCache memoryCache = new MemoryCache(mMemoryCacheSize);
      DiskCache diskCache = getDiskCacheSafely(activity);
      activity.runOnUiThread(() -> {
        mTileView.mStreamProvider = mStreamProvider;
        // use memory cache instance for both memory cache and bitmap pool.
        // maybe allows these to be set in the future
        mTileView.mMemoryCache = memoryCache;
        mTileView.mBitmapPool = memoryCache;
        mTileView.mDiskCache = diskCache;
        mTileView.prepare();
      });
    }
@return True if the single ready pass executes, false otherwise (either because not ready, or already run)
tileview/src/main/java/com/moagrius/tileview/TileView.java