OpenConnectManagementThread: Fix regression on CSD fixup

Commit a543c06cf428 (Allow use of x86 Linux CSD wrapper scripts) added
logic to check for e.g. "#!/bin/sh" at the start of the script, and
prepend "#!/system/bin/sh" if the interpreter was missing.  In a
subsequent commit, d08793cfcb (Copy certs into individual files), this
logic was inadvertently bypassed; stored CSD scripts would be used as-is
instead of rewritten to add the corrected interpreter line.

So, for any stored file for which isExecutable == true, we will copy
the contents to a temporary file and change the interpreter if necessary.
Handling of actual certs (not CSD scripts) should be unaffected.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
CommonMenu: Add "cause" data

This helps distinguish from other direct calls to
ErrorReporter.handleException() that may be added in the future.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
acra: Add CUSTOM_DATA fields for hacker packages

In the crash reports, document the existence of any root/Xposed/...
packages that may affect the OS behavior or unexpectedly block operations.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
GrantPermissionsActivity: Catch exceptions caused by ROM bugs

Several ACRA crash reports have shown failures calling APIs that should
never fail: VpnService.prepare() or starting the intent returned by
prepare().  Display a more informative message to the user so they do not
think the application is buggy.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
MainActivity: Don't call remove() on fragments that haven't been added

ICS may throw an NPE in this case.  Numerous crash reports from
4.0.1 - 4.0.4 devices have been seen.  The exact condition that triggers
removal of the non-added fragment is unclear; the most likely culprit
is a race between onTabSelected(), onTabUnselected(), and replace().

JB+ appears to be unaffected; $AOSP/frameworks/base commit acdfbcca6f91
added null checks that turn remove() into a no-op when appropriate.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Update changelog and bump version to 1.01-final (1019)

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