jorgesilva/TeclaAccess — pull request #76 by rishabhjain08 (2012-04-11 23:28:36+00:00)
Title: Solved issue #26 Confirmation should be asked for references which can disconnect Tecla Shield

Solves issue #26.
Made use of inputaccesslib and ensured that the confirmation dialog box appears only when the shield is connected(connection status tracked by updating the mShieldConnected variable).
Also there were only 3 preferences which could have resulted in disconnection of shield(persistent keyboard, auto hide timeout and connect shield) keeping in mind the cyclic nature of the problem since changing one preference can cause a change in another and thus resulting in a chain action.
I then moved their code inside the button clicked listener. Also since the code required for making the required dialog box was not much and each dialog box required its own OnClickListener() I created an AlertDialog box as and when required instead of creating a layout or a function for that purpose and calling it.