Skip to content

Commit

Permalink
Fix parent activity problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dániel Zolnai committed Nov 8, 2016
1 parent ec9097d commit 6ba82fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package de.blinkt.openvpn.activities;

import android.app.Activity;
import android.os.Bundle;
import android.view.MenuItem;

Expand Down
10 changes: 3 additions & 7 deletions main/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ListFragment;
import android.app.TaskStackBuilder;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
Expand All @@ -24,6 +25,7 @@
import android.os.Message;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.v4.app.NavUtils;
import android.text.SpannableString;
import android.text.format.DateFormat;
import android.text.style.ImageSpan;
Expand Down Expand Up @@ -445,14 +447,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
} 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(getActivity(), MainActivity.class);
parentActivityIntent.addFlags(
Intent.FLAG_ACTIVITY_CLEAR_TOP |
Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(parentActivityIntent);
getActivity().finish();
NavUtils.navigateUpFromSameTask(getActivity());
return true;

}
return super.onOptionsItemSelected(item);

Expand Down

0 comments on commit 6ba82fd

Please sign in to comment.