rdoeffinger / Dictionary

"QuickDic" offline Dictionary App for Android. Provided downloadable dictionaries are based on Wiktionaries but can also be created from other sources (see DictionaryPC). Remember to use --recursive when cloning! Fork of project that used to be hosted at code.google.com/p/quickdic-dictionary.
Apache License 2.0
322 stars 69 forks source link

Issue #141, catch security exception when the Internet permission is denied #142

Closed Wintandre closed 3 years ago

Wintandre commented 3 years ago

Uses the existing AlertDialog to prompt the user with the download failure. In the case of the SecurityException getting caught, this dialog is displayed irrespective of the 'cancel' parameter. This ensure that the app starts OK and the user is prompted about the lack of Internet Permission for the app.

Missing: translations to supported languages for "Internet Permission denied".

rdoeffinger commented 3 years ago

Thanks! Afraid I've not seen that behaviour on my devices, but unfortunately everything around DownloadManager seems to be different between devices... The added import atomic seems unnecessary and unused? Do you mind updating your pull request? Otherwise I can merge it and remove it afterwards as well.

Wintandre commented 3 years ago

I'm new to github and have only limited experience with git itself. I've pushed the change to remove the import, but wasn't sure whether to squash the commits or anything else, so I've left it as is. If there's anything more that I can do, just let me know.

Thanks for keeping the project alive.

rdoeffinger commented 3 years ago

That works, thanks, merged. Just FYI ideal workflow would involve a squash, specifically

However it's important to have a branch that is only for the pull request because force pushing has 2 consequences

Wintandre commented 3 years ago

Thanks for the workflow info @rdoeffinger. Saved for future reference.