Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 847eebe

Browse files
author
Langston Smith
authored
[android] Cherry-pick changes for release-picklejuice v8.2.1 patch release (#15275)
* [android] updated android changelog for 8.2.1 patch release (#15272) * [android] save location animation timestamp only when fed
1 parent 7fd429d commit 847eebe

File tree

2 files changed

+61
-20
lines changed

2 files changed

+61
-20
lines changed

platform/android/CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,47 @@ Mapbox welcomes participation and contributions from everyone. If you'd like to
44

55
## master
66

7+
## 8.3.0-alpha.1 - July 31, 2019
8+
[Changes](https://github.com/mapbox/mapbox-gl-native/compare/android-v8.2.0...android-v8.3.0-alpha.1) since [Mapbox Maps SDK for Android v8.2.0](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.2.0):
9+
10+
### Features
11+
- Do not include CJK ideographs in the offline packs by default. This decreases overall offline download size but changes appereance by a default set local glyph generation [#14269](https://github.com/mapbox/mapbox-gl-native/pull/14269)
12+
- Update target SDK to 28, update support library and fix gradle warnings [#15135](https://github.com/mapbox/mapbox-gl-native/pull/15135)
13+
- Introduce VertexVector::extend() and use it in placement code [#15194](https://github.com/mapbox/mapbox-gl-native/pull/15194)
14+
15+
### Bug fixes
16+
- Save location animation timestamp only when fed. Fixes an issue where external camera updates impacted location animation duration[#15265](https://github.com/mapbox/mapbox-gl-native/pull/15265)
17+
- Fixed flickering on style change for the same tile set [#15127](https://github.com/mapbox/mapbox-gl-native/pull/15127)
18+
- Fix location render/camera modes being reinitialized even when the new mode is the same [#15266](https://github.com/mapbox/mapbox-gl-native/pull/15266)
19+
- Ensure default local ideographs font family is not overwrote. Fix a bug that prevented local CJK glyphs generation. The local generation is now enabled by default and the font family used for generation is set to "sans-serif. [#15253](https://github.com/mapbox/mapbox-gl-native/pull/15253)
20+
- Fix int overflow issue in GridIndex [#15245](https://github.com/mapbox/mapbox-gl-native/pull/15245)
21+
- Align gesture animation reason for onCameraMoveStarted [#15218](https://github.com/mapbox/mapbox-gl-native/pull/15218)
22+
- Remove layers first when clearing the style, fixes unnecessary log dumps [#15191](https://github.com/mapbox/mapbox-gl-native/pull/15191)
23+
- Remove unused field from icon buffer [#15189](https://github.com/mapbox/mapbox-gl-native/pull/15189)
24+
25+
### Performance improvements
26+
- Release quad data after vertex buffers are created [#15189](https://github.com/mapbox/mapbox-gl-native/pull/15189)
27+
- Decrease size of SymbolBucket [#15178](https://github.com/mapbox/mapbox-gl-native/pull/15178)
28+
- Avoid geometry collections copying [#15201](https://github.com/mapbox/mapbox-gl-native/pull/15201)
29+
30+
## 8.2.1 - July 31, 2019
31+
[Changes](https://github.com/mapbox/mapbox-gl-native/compare/android-v8.2.0...android-v8.2.1) since [Mapbox Maps SDK for Android v8.2.0](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.2.0):
32+
33+
### Bug fixes
34+
- Save location animation timestamp only when fed [#15265](https://github.com/mapbox/mapbox-gl-native/pull/15265)
35+
36+
## 8.1.1 - July 26, 2019
37+
[Changes](https://github.com/mapbox/mapbox-gl-native/compare/android-v8.1.0...android-v8.1.1) since [Mapbox Maps SDK for Android v8.1.0](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.1.0):
38+
39+
### Bug fixes
40+
- Fixed rendering layers after fill-extrusion regression caused by optimization of fill-extrusion rendering [#15065](https://github.com/mapbox/mapbox-gl-native/pull/15065)
41+
- Fixed a map update bug caused by the render tiles and the render passes getting unsynchronized [#15092](https://github.com/mapbox/mapbox-gl-native/pull/15092)
42+
- Fixed collision with content insets [#15130](https://github.com/mapbox/mapbox-gl-native/pull/15130)
43+
- Fixed a custom geometry source bug caused by using the outdated tiles after style update [#15112](https://github.com/mapbox/mapbox-gl-native/pull/15112)
44+
- Allow map panning after quick zoom is disabled but a phantom gesture is executed [#15093](https://github.com/mapbox/mapbox-gl-native/pull/15093)
45+
- Ensure location shadow's gradient radius is greater than 0 [#15099](https://github.com/mapbox/mapbox-gl-native/pull/15099)
46+
- Ensure that move detector is enabled if double-tap is interrupted [#15103](https://github.com/mapbox/mapbox-gl-native/pull/15103)
47+
748
## 8.2.0 - July 24, 2019
849
[Changes](https://github.com/mapbox/mapbox-gl-native/compare/android-v8.2.0-beta.1...android-v8.2.0) since [Mapbox Maps SDK for Android v8.2.0-beta.1](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.2.0-beta.1):
950

platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationAnimatorCoordinator.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,23 @@ void feedNewLocation(@NonNull Location newLocation, @NonNull CameraPosition curr
9494

9595
boolean snap = immediateAnimation(projection, previousCameraLatLng, targetLatLng)
9696
|| immediateAnimation(projection, previousLayerLatLng, targetLatLng);
97-
playAnimators(
98-
snap ? 0 : getAnimationDuration(),
97+
98+
long animationDuration = 0;
99+
if (!snap) {
100+
long previousUpdateTimeStamp = locationUpdateTimestamp;
101+
locationUpdateTimestamp = SystemClock.elapsedRealtime();
102+
103+
if (previousUpdateTimeStamp == 0) {
104+
animationDuration = 0;
105+
} else {
106+
animationDuration = (long) ((locationUpdateTimestamp - previousUpdateTimeStamp) * durationMultiplier)
107+
/* make animation slightly longer with durationMultiplier, defaults to 1.1f */;
108+
}
109+
110+
animationDuration = Math.min(animationDuration, MAX_ANIMATION_DURATION_MS);
111+
}
112+
113+
playAnimators(animationDuration,
99114
ANIMATOR_LAYER_LATLNG,
100115
ANIMATOR_LAYER_GPS_BEARING,
101116
ANIMATOR_CAMERA_LATLNG,
@@ -259,23 +274,6 @@ private void createNewCameraAdapterAnimator(@MapboxAnimator.Type int animatorTyp
259274
}
260275
}
261276

262-
private long getAnimationDuration() {
263-
long previousUpdateTimeStamp = locationUpdateTimestamp;
264-
locationUpdateTimestamp = SystemClock.elapsedRealtime();
265-
266-
long animationDuration;
267-
if (previousUpdateTimeStamp == 0) {
268-
animationDuration = 0;
269-
} else {
270-
animationDuration = (long) ((locationUpdateTimestamp - previousUpdateTimeStamp) * durationMultiplier)
271-
/* make animation slightly longer with durationMultiplier, defaults to 1.1f */;
272-
}
273-
274-
animationDuration = Math.min(animationDuration, MAX_ANIMATION_DURATION_MS);
275-
276-
return animationDuration;
277-
}
278-
279277
private float checkGpsNorth(boolean isGpsNorth, float targetCameraBearing) {
280278
if (isGpsNorth) {
281279
targetCameraBearing = 0;
@@ -362,7 +360,9 @@ void resetAllLayerAnimations() {
362360
float currentGpsBearingTarget = gpsBearingAnimator.getTarget();
363361
createNewFloatAnimator(ANIMATOR_LAYER_GPS_BEARING, currentGpsBearing, currentGpsBearingTarget);
364362

365-
playAnimators(getAnimationDuration(), ANIMATOR_LAYER_LATLNG, ANIMATOR_LAYER_GPS_BEARING);
363+
long duration = latLngAnimator.getDuration() - latLngAnimator.getCurrentPlayTime();
364+
365+
playAnimators(duration, ANIMATOR_LAYER_LATLNG, ANIMATOR_LAYER_GPS_BEARING);
366366
}
367367

368368
if (compassBearingAnimator != null) {

0 commit comments

Comments
 (0)