You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
976 B
39 lines
976 B
4 years ago
|
package org.purplei2p.i2pd;
|
||
|
|
||
|
import android.app.ActionBar;
|
||
|
import android.content.Intent;
|
||
|
import android.os.Bundle;
|
||
|
import android.app.Activity;
|
||
|
import android.view.View;
|
||
|
import android.widget.Button;
|
||
|
|
||
|
public class I2PDPermsExplanationActivity extends Activity {
|
||
|
|
||
|
@Override
|
||
|
protected void onCreate(Bundle savedInstanceState) {
|
||
|
super.onCreate(savedInstanceState);
|
||
|
setContentView(R.layout.activity_perms_explanation);
|
||
|
ActionBar actionBar = getActionBar();
|
||
|
if(actionBar!=null)actionBar.setHomeButtonEnabled(false);
|
||
|
Button button_ok = (Button) findViewById(R.id.button_ok);
|
||
|
button_ok.setOnClickListener(new View.OnClickListener() {
|
||
|
@Override
|
||
|
public void onClick(View view) {
|
||
|
returnFromActivity();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
private void returnFromActivity() {
|
||
|
Intent data = new Intent();
|
||
|
Activity parent = getParent();
|
||
|
if (parent == null) {
|
||
|
setResult(Activity.RESULT_OK, data);
|
||
|
} else {
|
||
|
parent.setResult(Activity.RESULT_OK, data);
|
||
|
}
|
||
|
finish();
|
||
|
}
|
||
|
|
||
|
}
|