diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-02-09 17:06:59 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-02-09 17:06:59 +0100 |
commit | 06e132493b6877078f0130cffb6c39a0d3ca2bf2 (patch) | |
tree | 6bbe0eeb0642275fb0b6b4a4b6fb2b0abde4cd61 /src/de/blinkt/openvpn/LogWindow.java | |
parent | d6c35a95905c276a5241bdbf3a01ca89c3c9fd31 (diff) | |
parent | c89414179f77982751064a5709122913c3ffd6c4 (diff) |
Merge with default branch
--HG--
branch : ovpn3
Diffstat (limited to 'src/de/blinkt/openvpn/LogWindow.java')
-rw-r--r-- | src/de/blinkt/openvpn/LogWindow.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/LogWindow.java b/src/de/blinkt/openvpn/LogWindow.java index 69d1f859..4d2047f8 100644 --- a/src/de/blinkt/openvpn/LogWindow.java +++ b/src/de/blinkt/openvpn/LogWindow.java @@ -262,9 +262,18 @@ public class LogWindow extends ListActivity implements StateListener { Toast.makeText(this, R.string.log_no_last_vpn, Toast.LENGTH_LONG).show(); } + } else if(item.getItemId() == android.R.id.home) { + // This is called when the Home (Up) button is pressed + // in the Action Bar. + Intent parentActivityIntent = new Intent(this, MainActivity.class); + parentActivityIntent.addFlags( + Intent.FLAG_ACTIVITY_CLEAR_TOP | + Intent.FLAG_ACTIVITY_NEW_TASK); + startActivity(parentActivityIntent); + finish(); + return true; } - return super.onOptionsItemSelected(item); } @@ -350,7 +359,8 @@ public class LogWindow extends ListActivity implements StateListener { lv.setAdapter(ladapter); mSpeedView = (TextView) findViewById(R.id.speed); - + getActionBar().setDisplayHomeAsUpEnabled(true); + Intent intent = new Intent(getBaseContext(), OpenVpnService.class); intent.setAction(OpenVpnService.START_SERVICE); |