docs: private void refresh() {
          if (!refreshCheckStart()) {
              return;
          }
          final TileStates tileStates = mTilesOverlay.getTileStates();
          do {
              mTilesOverlay.drawTiles(null, mProjection, mProjection.getZoomLevel(), mViewPort);
              boolean ready = true;
              if (mIncludeFlags != 0 && mIncludeFlags != INCLUDE_FLAGS_ALL) {
                  if (ready && (mIncludeFlags & INCLUDE_FLAG_UPTODATE) == 0 && tileStates.getUpToDate() != 0) {
                      ready = false;
                  }
                  if (ready && (mIncludeFlags & INCLUDE_FLAG_EXPIRED) == 0 && tileStates.getExpired() != 0) {
                      ready = false;
                  }
                  if (ready && (mIncludeFlags & INCLUDE_FLAG_SCALED) == 0 && tileStates.getScaled() != 0) {
                      ready = false;
                  }
                  if (ready && (mIncludeFlags & INCLUDE_FLAG_NOTFOUND) == 0 && tileStates.getNotFound() != 0) {
                      ready = false;
                  }
              }
              if (ready) {
                  if (mStatus == Status.CANVAS_OK || mStatus == Status.PAINTING) {
                      return;
                  }
                  if (!refreshCheckFinish()) {
                      return;
                  }
                  mStatus = Status.PAINTING;
                  if (mIsDetached) {
                      return;
                  }
                  draw();
                  mStatus = Status.CANVAS_OK;
                  final MapSnapshotable mapSnapshotable = mMapSnapshotable;
                  if (mapSnapshotable != null) {
                      mapSnapshotable.callback(MapSnapshot.this);
                  }
              }
          } while(refreshCheckEnd());
      }