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

[android] - post camera updates to the end of the message queue #7000

Merged
merged 1 commit into from
Nov 14, 2016

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Nov 10, 2016

Targets release branch, extracted from #6532.

This PR allows to call new animations directly from the onFinish from another. Prior this fix one camera update cancelled the other because it was still resolving his onFinish event. Side effect, this mostly solves #6769 (definitive solution in #6999).

Review @ivovandongen

@tobrun tobrun added Android Mapbox Maps SDK for Android ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold labels Nov 10, 2016
@tobrun tobrun added this to the android-v4.2.0 milestone Nov 10, 2016
@mention-bot
Copy link

@tobrun, thanks for your PR! By analyzing the history of the files in this pull request, we identified @clydebarrow, @cammace and @ivovandongen to be potential reviewers.

@tobrun
Copy link
Member Author

tobrun commented Nov 10, 2016

In 1938de2 I removed the camera related unit tests. These don't work with runnables, fwiw in #6803 targetting master I removed the unit tests as well in favour of a instrumentation tests.

@tobrun tobrun added ✓ ready for review and removed ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold labels Nov 10, 2016
@tobrun tobrun self-assigned this Nov 11, 2016
@ivovandongen
Copy link
Contributor

@tobrun Running UI tests on this locally, I get a failure on com.mapbox.mapboxsdk.testapp.activity.gen.annotation.MarkerViewActivityTest#testSanity:

11-11 16:14:16.195 24081-24081/com.mapbox.mapboxsdk.testapp A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodV called with pending exception java.lang.NullPointerException: Attempt to read from field 'double com.mapbox.mapboxsdk.camera.CameraPosition.tilt' on a null object reference
11-11 16:14:16.195 24081-24081/com.mapbox.mapboxsdk.testapp A/art: art/runtime/java_vm_ext.cc:470] (Throwable with no stack trace)
11-11 16:14:16.195 24081-24081/com.mapbox.mapboxsdk.testapp A/art: art/runtime/java_vm_ext.cc:470]     in call to CallVoidMethodV
11-11 16:14:16.195 24081-24081/com.mapbox.mapboxsdk.testapp A/art: art/runtime/java_vm_ext.cc:470]     from void android.os.MessageQueue.nativePollOnce(long, int)
11-11 16:14:16.195 24081-24081/com.mapbox.mapboxsdk.testapp A/art: art/runtime/java_vm_ext.cc:470] "main" prio=5 tid=1 Runnable
11-11 16:14:16.195 24081-24081/com.mapbox.mapboxsdk.testapp A/art: art/runtime/java_vm_ext.cc:470]   | group="main" sCount=0 dsCount=0 obj=0x755ad000 self=0xe7085400
11-11 16:14:16.195 24081-24081/com.mapbox.mapboxsdk.testapp A/art: art/runtime/java_vm_ext.cc:470]   | sysTid=24081 nice=0 cgrp=default sched=0/0 handle=0xe9c98534
11-11 16:14:16.195 24081-24081/com.mapbox.mapboxsdk.testapp A/art: art/runtime/java_vm_ext.cc:470]   | state=R schedstat=( 4828028062 787604601 5778 ) utm=303 stm=178 core=0 HZ=100
11-11 16:14:16.195 24081-24081/com.mapbox.mapboxsdk.testapp A/art: art/runtime/java_vm_ext.cc:470]   | stack=0xff566000-0xff568000 stackSize=8MB
...

@tobrun
Copy link
Member Author

tobrun commented Nov 14, 2016

That was a valid bug, fixed it up in d941cde.

@tobrun tobrun force-pushed the tobrun-runnable-camera-update branch from d941cde to 3266562 Compare November 14, 2016 12:55
@tobrun tobrun merged commit 50748f4 into release-android-v4.2.0 Nov 14, 2016
@tobrun tobrun deleted the tobrun-runnable-camera-update branch November 14, 2016 13:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants