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:
committed by
Łukasz Paczos
parent
35bcb7c072
commit
ca60095071
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user