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

Reinitialize token dependent components when a new one is provided #15081

Merged
merged 2 commits into from
Jul 11, 2019

Conversation

LukasPaczos
Copy link
Member

Closes #15063.

Changes in this PR:

  • Throw a configuration exception when Mapbox services are accessed with an invalid access token, which previously resulted in a caught NPE and a blank map (Initializing Mapbox with a null or an invalid access token - unclear error #15063).
  • Recreate telemetry service when a new, valid access token is supplied. From what I can see, we'd be sending telemetry events with a wrong token otherwise. If an invalid one/null is provided, telemetry will be stopped.
  • Allow setting a null access token in the runtime, just like we allow during initialization.

@LukasPaczos LukasPaczos added the Android Mapbox Maps SDK for Android label Jul 9, 2019
@LukasPaczos LukasPaczos added this to the release-picklejuice milestone Jul 9, 2019
@LukasPaczos LukasPaczos force-pushed the lp-token-and-accounts-manager-15063 branch from a7e39ce to 4003011 Compare July 9, 2019 11:37
Copy link
Member

@tobrun tobrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you for cleaning this up and adding tests.
Will defer the review to @alfwatt as this also involves telemetry.

@LukasPaczos LukasPaczos merged commit 4348169 into master Jul 11, 2019
@LukasPaczos LukasPaczos deleted the lp-token-and-accounts-manager-15063 branch July 11, 2019 09:02
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.

Initializing Mapbox with a null or an invalid access token - unclear error
2 participants