-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] Upload complete broadcast #686
Conversation
…ome code/re-using CERTTRANS, queing requests
…andle the transition more cleanly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, except for one un-intent-ional thing to fix.
getApplicationContext().unbindService(state.serviceConnection); | ||
final Context c = getApplicationContext(); | ||
if (null != c) { | ||
getApplicationContext().unbindService(state.serviceConnection); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed changing to reference c
.map(UploadReseponse.UploadTransaction::getTransId) | ||
.collect(Collectors.toList()); | ||
if (transIds.size() > 0) { | ||
intent.putExtra("transIds", transIds.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we care about doing this toString() more than once?
i suppose these are not frequent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's sillier than that- the client doesn't currently support multiple CSVs/archive upload - so transIds will always be a single-item list. Just doing this to correctly process the API response should we start supporting multi-archive. Cleaning up.
Implementing #683 - sending a broadcast intent on upload success or failure.
These are (respectively)
net.wigle.wigleandroid.UPLOAD_COMPLETE
andnet.wigle.wigleandroid.UPLOAD_FAILED
.As a part of this change, I've also moved the
OkFileUploader
core call contents to WiGLEApiManager, our API implementation class. This necessitated numerous changes and begged certain cleanups, including:Some of the changes here may benefit from further refactoring, but this change set is getting large, and further changes (e.g. combining our various progress interaction implementations) would increase risk.