blob: 771cd902feeff9d2eea1b764d03717dfa31bb3f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
package de.blinkt.openvpn;
import java.util.List;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.widget.Button;
public class VPNPreferences extends PreferenceActivity {
private String mProfileUUID;
private BasicSettings mBS;
public void setmBS(BasicSettings mBS) {
this.mBS = mBS;
}
public VPNPreferences() {
super();
}
protected void onPause() {
super.onPause();
if(mBS!=null)
mBS.savePreferences();
}
@Override
protected void onStop() {
super.onStop();
};
@Override
protected void onCreate(Bundle savedInstanceState) {
// profileUUID
mProfileUUID = getIntent().getStringExtra(getPackageName() + ".profileUUID");
super.onCreate(savedInstanceState);
/* if (hasHeaders()) {
Button button = new Button(this);
button.setText("Save");
setListFooter(button);
} */
}
@Override
public void onBuildHeaders(List<Header> target) {
loadHeadersFromResource(R.xml.vpn_headers, target);
for (Header header : target) {
if(header.fragmentArguments==null)
header.fragmentArguments = new Bundle();
header.fragmentArguments.putString(getPackageName() + ".profileUUID",mProfileUUID);
}
}
@Override
public void onBackPressed() {
setResult(RESULT_OK, getIntent());
super.onBackPressed();
}
}
|