cleaned ConfigureTransProxy workflow, implemented override for back button
This commit is contained in:
parent
ea384f95f6
commit
f29a49439e
|
@ -20,6 +20,8 @@ import android.content.SharedPreferences.Editor;
|
|||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
|
@ -119,7 +121,7 @@ public class ConfigureTransProxy extends Activity implements TorConstants {
|
|||
back.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
public void onClick(View v) {
|
||||
|
||||
finish();
|
||||
startActivityForResult(new Intent(ConfigureTransProxy.this, Permissions.class), 1);
|
||||
}
|
||||
});
|
||||
|
@ -127,7 +129,7 @@ public class ConfigureTransProxy extends Activity implements TorConstants {
|
|||
next.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
public void onClick(View v) {
|
||||
|
||||
finish();
|
||||
startActivityForResult(new Intent(ConfigureTransProxy.this, TipsAndTricks.class), 1);
|
||||
|
||||
}
|
||||
|
@ -142,11 +144,8 @@ public class ConfigureTransProxy extends Activity implements TorConstants {
|
|||
{
|
||||
|
||||
public void onClick(View v) {
|
||||
|
||||
context.startActivity(new Intent(context, AppManager.class));
|
||||
|
||||
|
||||
|
||||
finish();
|
||||
context.startActivity(new Intent(context, AppManager.class));
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -239,4 +238,17 @@ public class ConfigureTransProxy extends Activity implements TorConstants {
|
|||
super.onSaveInstanceState(outState);
|
||||
|
||||
}
|
||||
|
||||
//Code to override the back button!
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
Log.d("myTag", "IT HAS BEEN CLICKED :O"+keyCode+" "+event);
|
||||
if(keyCode == KeyEvent.KEYCODE_BACK){
|
||||
finish();
|
||||
startActivityForResult(new Intent(getBaseContext(), Permissions.class), 1);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue