Native will get destroyed before the Java HTTPRequest and asynchronous
requests might still get answered.
If the request gets canceled, we now clear the reference to the native
code and it will never reach it.
Lock is needed because OkHTTP replies on its own thread, so we need to
guard the access to the variable we use for checking if the Request was
canceled. In the future we could remove the lock and use Runnable when
we move Android main loop to Looper instead of libuv.
Like the other implementations of HTTPRequest on Mapbox GL Native, the
request is destroyed synchronously on ::cancel().
# The first commit's message is:
# This is a combination of 2 commits.
# The first commit's message is:
# This is a combination of 3 commits.
# The first commit's message is:
# This is a combination of 2 commits.
# The first commit's message is:
# This is a combination of 21 commits.
# The first commit's message is:
[android] - Implements Android bindings for offline API
Fixes#3891
# The 2nd commit message will be skipped:
# [android] #3891 - rename OFFLINE_MAX_CACHE_SIZE to DEFAULT_MAX_CACHE_SIZE and adjust value
# The 3rd commit message will be skipped:
# [android] #3891 - makes de documentation more relevant to the current android implementation
# The 4th commit message will be skipped:
# [android] #3891 - rename isRequiredResourceCountIsIndeterminate() to isRequiredResourceCountPrecise()
# The 5th commit message will be skipped:
# [android] #3891 - rename complete() to isComplete()
# The 6th commit message will be skipped:
# [android] #3891 - rename OfflineRegionDefinition to OfflineTilePyramidRegionDefinition and make OfflineRegionDefinition an interface. Docs for corresponding classes updated.
# The 7th commit message will be skipped:
# [android] #3891 - make reason a more idiomatic ErrorReason Android IntDef and remove unnecessary constructor
# The 8th commit message will be skipped:
# [android] #3891 - reuse the calling object instead of creating a new manager
# The 9th commit message will be skipped:
# [android] #3891 - location, location, location
# The 10th commit message will be skipped:
# [android] #3891 - simpler list regions iteration
# The 11th commit message will be skipped:
# [android] #3891 - proper indeterminate -> precise transition
# The 12th commit message will be skipped:
# [android] #3891 - improve description for DEFAULT_MAX_CACHE_SIZE
# The 13th commit message will be skipped:
# [android] #3891 - delete global refs for obj and listCallback
# The 14th commit message will be skipped:
# [android] #3891 - simplify metadata conversion and fix metadata object
# The 15th commit message will be skipped:
# [android] - Implements Android bindings for offline API
# Fixes#3891
# The 16th commit message will be skipped:
# [android] #3891 - avoid exposing the int reason value in the public API
# The 17th commit message will be skipped:
# [android] #3891 - delete global refs for remaining callbacks and observer
# The 18th commit message will be skipped:
# [android] #3891 - remove unused offlineManagerClassConstructorId together with unnecessary private java constructor
# The 19th commit message will be skipped:
# [android] #3891 - remove non-relevant line
# The 20th commit message will be skipped:
# [android] #3891 - handle requiredResourceCountIsIndeterminate -> requiredResourceCountIsPrecise rename
# The 21st commit message will be skipped:
# [android] #3891 - revert map changes to allow rebase
# The 2nd commit message will be skipped:
# [android] #3891 - avoid exposing the int reason value in the public API
# The 2nd commit message will be skipped:
# [android] #3891 - rename complete() to isComplete()
# The 3rd commit message will be skipped:
# [android] #3891 - rename OfflineRegionDefinition to OfflineTilePyramidRegionDefinition and make OfflineRegionDefinition an interface. Docs for corresponding classes updated.
# The 2nd commit message will be skipped:
# [android] #3891 - location, location, location
# The 2nd commit message will be skipped:
# [android] #3891 - improve description for DEFAULT_MAX_CACHE_SIZE
# The 3rd commit message will be skipped:
# [android] #3891 - delete global refs for obj and listCallback
# The 4th commit message will be skipped:
# [android] #3891 - simplify metadata conversion and fix metadata object
# The 5th commit message will be skipped:
# [android] #3891 - delete global refs for remaining callbacks and observer
# The 6th commit message will be skipped:
# [android] #3891 - remove unused offlineManagerClassConstructorId together with unnecessary private java constructor
# The 7th commit message will be skipped:
# [android] #3891 - remove non-relevant line
# The 8th commit message will be skipped:
# [android] #3891 - handle requiredResourceCountIsIndeterminate -> requiredResourceCountIsPrecise rename
There is no such thing as a cancelled response, only cancelled requests. A request that is cancelled does not have its callback called with a Response.
* Use "named constructors": empty, world, hull
* Make the two-argument constructor lenient (i.e., it is a hull operation)
* Add various accessors
* Enforce a single empty representation
The tilt gesture on both iOS and OS X now respects the content insets. On iOS, in user tracking mode, it additionally respects the user dot’s position if it’s aligned to the top or bottom of the view.
This allows the FileSource interface itself to support revalidation. We could (and probably should) now rewrite HTTPContextBase implementations as FileSource implementations.