cookie-information / android-release

0 stars 2 forks source link

v2.0.1 - catch ActivityNotFoundException exceptions #27

Closed HannahShulman closed 10 months ago

HannahShulman commented 10 months ago

JIRA Task

boris-venkov commented 10 months ago

@HannahShulman We get IllegalStateException and not ActivityNotFoundException, so if you do not want to trigger onError in displayConsentsIfNeeded, then you should catch IllegalStateException with an empty catch block and not ActivityNotFoundException. Take a look at the exception stack traces that we got from Matas. Catching IllegalStateException in displayConsents does not, however, make sense because we do not have network calls before listener.launch(null) so the listener can't get unregistered.

Regarding removal of the consent version saving - good! I assume that in all the UIs where a user cam accept a consent we do save the version on accept, right ?

HannahShulman commented 10 months ago

regarding the IllegalStateException, you are right, I do however want to add the ActivityNotFoundException as well as this is the error that is thrown when launch fails.

And yes, whenever a user accepts, it calls the postConsents, (which are posted to the server as well..