[android] fix layer ownership

This commit is contained in:
Ivo van Dongen
2016-11-10 12:07:25 +01:00
committed by Ivo van Dongen
parent 7d2f18b5ed
commit 3a4a27c95f
14 changed files with 45 additions and 148 deletions

View File

@@ -104,12 +104,8 @@ public class RuntimeStyleTests {
mapboxMap.addLayer(layer);
assertNotNull(mapboxMap.getLayer("building"));
try {
layer.setProperties(PropertyFactory.visibility(Property.VISIBLE));
assertTrue("Never reached as the reference is invalid after adding", false);
} catch (Exception e) {
//Expected, reference is no longer valid
}
//Assure the reference still works
layer.setProperties(PropertyFactory.visibility(Property.VISIBLE));
}
}