AssetExtractor: Add new readStringFromFile() method

This leverages the same buffered reader code used to extract an asset
into a string.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
TokenImportActivity: Disable [[INLINE]] so we can read imported files directly

If TokenImportActivity gets invoked from another app to import an sdtid
file, we will need to read the content from a file:///foo/bar URI.  So
let's restructure the code so that common functions can be used for
both intent handling and for processing the FileSelect result.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
TokenImportActivity: Process sdtid files

Add a file association with *.sdtid and allow them to be imported manually
from the VPN profile editor.  These may require a password but never
require entering a devid.

As is the case with passworded CTF strings, the token will be converted
into an unpassworded CTF string and stored in the profile.  We will not
store the whole XML file.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
TokenImportActivity: Add missing copyright header

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
TokenImportActivity: Add missing @Override

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
faq: Update sdtid instructions

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Add yellow alert icon

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
First attempt at a SecurID Diagnostic screen

This shows the current tokencode plus some information about the token.
If multiple VPN profiles use SecurID tokens, each one can be checked
independently.

It will probably wind up in its own app someday...

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
stoken: Update library to pick up getInfo() call

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Sync stoken binaries with new sources

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
TokenDiagFragment: Clean up PIN handling

Cache PIN (in memory only) in case the activity/fragment gets redrawn.
Add a "New PIN" button to let the user change their mind.  Sanity-check
the PIN input prior to enabling the OK button.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
TokenDiagFragment: Show problematic values in bold+red

Initially we will show "Using PIN: No" in red, since it means that the
tokencode is incorrect.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Use mStoken.getInfo() to fill in token details

Display the serial number and expiration date.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
TokenDiagFragment: Strip off unnecessary text from "Current time"

Sometimes this can display "GMT +00:00" which just wastes space.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
faq: Update "skip all login prompts" entry

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
VPNProfileList: Use FragCache to retain ADD dialog state

This doesn't put the EditText cursor in the right place, but otherwise it
seems to do the right thing on screen rotation and task switch.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
VPNProfileList: Split generic dropdown menu items into CommonMenu.java

Allow Settings/SecurID/About/... to be reused from other fragments or
activities.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Add CommonMenu to StatusFragment and to LogFragment

"Settings" is missing in both cases, as we assume the connection is up
so none of the settings should be modified.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
FeedbackFragment: Initial commit

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
VPNProfileList: Fix "add VPN" dialog popping up after adding VPN

The following sequence of events was observed:

1) User clicks "Add" to create a new profile

2) User enters the profile name and clicks "OK"

3) onClick creates a new ConnectionEditorActivity

4) VPNProfileList.onPause() is called

5) onPause() saves the dialog state in FragCache, then dismisses it

6) When the activity is resumed, it incorrectly restores the dialog

So, let's dismiss the dialog from the onClick handler so that by the
time we reach onPause(), it is gone and FragCache will record its absence.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>