Only save the server token if it's not null, also use an ID of 1.
Ensured that we clear out the session related vars (customer, token,
accounts, policies, etc...) regardless of whether the user logs out from
the server successfully or not. Once logged in we reload the user's
accident report possibly getting one stored in the db. Also, made
setupEventListeners method that sets up the listeners purposefully
instead of setting up events in the constructor.
Made setup listeners method instead of initailizing listeners in the
constructors. Also added getNumberOf[Photos, Witnesses,
ThirdPartyDrivers] methods and an addWitness method.
Changed around where we say setServerIdObtained to be true, there was a
bug with that causing linking of the wrong images. Also implemented
requestFailed so we can know when our images don't upload because of a
network error.
Made some changes here to accomodate test images stored on the card or
local store. Made adjustments so phones without SD cards won't fail the
tests. Added a check to make sure that reloadAccidentReport method works
and that the session vars are cleared properly after logout.
Added some more comments, made the Cancel button consume click and
modified the updateProgress method so it will print out special messages
if the upload failed or if it's retrying and so on. Also removed the
photo from the accident report if the user presses cancel. Added
hasPhoto and getPhoto method that returns the photo given the category.
Update progress if the request fails.
Added a set and get for timeBetweenFailedImageUploads so we can change
it.
Stopped trying to set the APN. Made some changes in the network core
that seem to be working nicely.
Added deleteAccidentReports and also called setCustomerId on the report
whenever we return it if the customer is logged in. Also added call to
removeListeners to help dead reports to stop listening to events.
Added removeEventListeners and let 200KB account for the total in the
submission of reports.
Pop the loading risk screen if the user cancels it.
Changed the default path to camera pictures.
removeEventListeners was refactored to discard.
Added a discard method, cancelPhotos method and implemented the cancel
method. Remove calls cancel.
Discard method removes event listeners and cancels photos. Also resets
local variables.
Added CONSUME_CLICK to login button.
Added some more comments, remove unneeded code. Added the test to test
failure of image uploads... this needs some more work though.
Committing merge of AIB delegate, GKCOStartAccidentReport and ProxyTest