This PR fixes a bug in the placement of code that was intended to be within a try/catch block. It also improves and simplifies the logic and comments around requesting permissions for specific Android versions. Basically, I ran into a bug that was hard to figure out because the code was difficult to understand. I later learned that newer versions of Android (6.0.1+) no longer need to request permission to write to settings, but this wasn't clear enough in the code.
This PR fixes a bug in the placement of code that was intended to be within a try/catch block. It also improves and simplifies the logic and comments around requesting permissions for specific Android versions. Basically, I ran into a bug that was hard to figure out because the code was difficult to understand. I later learned that newer versions of Android (6.0.1+) no longer need to request permission to write to settings, but this wasn't clear enough in the code.