Added getter for the field isComponentInitialized

This change is meanly because of https://github.com/mapbox/mapbox-gl-native/pull/14068 which is now throwing an exception when the component is not activated. This getter should help users to identify if the component is not activated yet to prevent usage and therefore exceptions.
This commit is contained in:
Alexander Eggers
2019-03-29 11:44:58 +11:00
committed by Łukasz Paczos
parent 35bcb7c072
commit ca60095071

View File

@@ -1509,4 +1509,13 @@ public final class LocationComponent {
throw new LocationComponentNotInitializedException();
}
}
}
/**
* Returns whether the location component is activated.
*
* @return true if the component is activated, false otherwise
*/
public boolean isLocationComponentActivated() {
return isComponentInitialized;
}
}