OSDN Git Service

Fix for current activity refresh
authorBILLyTheLiTTle <littleprog@gmail.com>
Thu, 27 Feb 2014 21:44:12 +0000 (23:44 +0200)
committerSteve Kondik <shade@chemlab.org>
Sun, 2 Mar 2014 22:57:25 +0000 (22:57 +0000)
Change-Id: Ifae4b4991af2ad8945b7f295e76956d56629aefc

Superuser/src/com/koushikdutta/superuser/PolicyFragmentInternal.java

index e903b4f..6e56673 100644 (file)
@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.Date;
 
 import android.annotation.SuppressLint;
+import android.app.Activity;
 import android.app.AlertDialog;
 import android.content.Context;
 import android.content.DialogInterface;
@@ -179,7 +180,7 @@ public class PolicyFragmentInternal extends ListContentFragmentInternal {
                      * TODO I should find a better way but this is ok
                      * for the moment!
                      */
-                    Intent i = new Intent(getContext(), MainActivity.class);
+                    Intent i = new Intent(getContext(), getActivity().getClass());
                     i.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
                     getContext().startActivity(i);
                     break;