Remove @NotNull annotation

This eliminates our dependency on the IntelliJ annotations .jar file,
improving portability between ADT/AS/Ant/Gradle.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
SendDumpFragment: Update contact info

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

Introduce a new VPNLog class owned by the VpnService, not by the UI.
Write a simple, mostly-stateless ListAdapter based on BaseAdapter to
access the underlying VPNLog object.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Remove old logging code and other unused functions

This effectively deletes most of OpenVPN.java.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
OpenVpnService: Clean up more unused code

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
LogWindow: Don't leak the back-button AlertDialog

Screen rotations or navigation to another activity would generate a
backtrace in logcat.  Track whether the dialog is still active when
the activity gets stopped, and if it is, dismiss it.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
OpenVpnService: Fix a bunch of service lifecycle corner cases

Make sure the service knows when the thread terminates.  Save mUUID to
disk if the service and all bound activities are destroyed, in case they
get resurrected later without navigating through MainActivity.  Stop the
service if the VPN thread exits, EXCEPT if we have a new connection queued
up.  Add rudimentary logging so the connection termination reason is
obvious from logcat.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
ProfileManager: Fix a misspelled method name

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
LogWindow: Fix "send log" feature

This broke during the LogWindow rewrite.  Adapted from the code we're
using in AFWall.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
OpenConnectManagementThread: Fix memory and fd leak

It is necessary to call destroy() to tear down the library instance
after each session ends.

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