Improve UI send latency

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2017-04-22 16:29:26 -07:00
parent 4d889a45e2
commit cb670d6783
30 changed files with 459 additions and 94 deletions

View File

@@ -66,7 +66,7 @@ public class ThumbnailView extends FrameLayout {
if (attrs != null) {
TypedArray typedArray = context.getTheme().obtainStyledAttributes(attrs, R.styleable.ThumbnailView, 0, 0);
backgroundColorHint = typedArray.getColor(0, Color.BLACK);
backgroundColorHint = typedArray.getColor(R.styleable.ThumbnailView_backgroundColorHint, Color.BLACK);
typedArray.recycle();
}
}
@@ -120,13 +120,22 @@ public class ThumbnailView extends FrameLayout {
return;
}
if (this.slide != null && this.slide.getFastPreflightId() != null &&
this.slide.getFastPreflightId().equals(slide.getFastPreflightId()))
{
Log.w(TAG, "Not re-loading slide for fast preflight: " + slide.getFastPreflightId());
this.slide = slide;
return;
}
if (!isContextValid()) {
Log.w(TAG, "Not loading slide, context is invalid");
return;
}
Log.w(TAG, "loading part with id " + slide.asAttachment().getDataUri()
+ ", progress " + slide.getTransferState());
+ ", progress " + slide.getTransferState() + ", fast preflight id: " +
slide.asAttachment().getFastPreflightId());
this.slide = slide;