@@ -12,23 +12,23 @@ public void onCreate(Bundle savedInstanceState) {
12
12
super .onCreate (savedInstanceState );
13
13
m_MessagReturnCode = -1 ;
14
14
m_MessageReturnValue = "" ;
15
-
15
+
16
16
}
17
17
18
18
@ Override
19
19
public void onDestroy () {
20
20
super .onDestroy ();
21
21
}
22
-
23
-
22
+
23
+
24
24
public void copyAssets () {
25
25
Intent intent = new Intent (this , MinetestAssetCopy .class );
26
26
startActivity (intent );
27
27
}
28
-
28
+
29
29
public void showDialog (String acceptButton , String hint , String current ,
30
30
int editType ) {
31
-
31
+
32
32
Intent intent = new Intent (this , MinetestTextEntry .class );
33
33
Bundle params = new Bundle ();
34
34
params .putString ("acceptButton" , acceptButton );
@@ -40,37 +40,37 @@ public void showDialog(String acceptButton, String hint, String current,
40
40
m_MessageReturnValue = "" ;
41
41
m_MessagReturnCode = -1 ;
42
42
}
43
-
43
+
44
44
public static native void putMessageBoxResult (String text );
45
-
45
+
46
46
/* ugly code to workaround putMessageBoxResult not beeing found */
47
47
public int getDialogState () {
48
48
return m_MessagReturnCode ;
49
49
}
50
-
50
+
51
51
public String getDialogValue () {
52
52
m_MessagReturnCode = -1 ;
53
53
return m_MessageReturnValue ;
54
54
}
55
-
55
+
56
56
public float getDensity () {
57
57
return getResources ().getDisplayMetrics ().density ;
58
58
}
59
-
59
+
60
60
public int getDisplayWidth () {
61
61
return getResources ().getDisplayMetrics ().widthPixels ;
62
62
}
63
-
63
+
64
64
public int getDisplayHeight () {
65
65
return getResources ().getDisplayMetrics ().heightPixels ;
66
66
}
67
-
67
+
68
68
@ Override
69
69
protected void onActivityResult (int requestCode , int resultCode ,
70
70
Intent data ) {
71
71
if (requestCode == 101 ) {
72
72
if (resultCode == RESULT_OK ) {
73
- String text = data .getStringExtra ("text" );
73
+ String text = data .getStringExtra ("text" );
74
74
m_MessagReturnCode = 0 ;
75
75
m_MessageReturnValue = text ;
76
76
}
@@ -79,21 +79,22 @@ protected void onActivityResult(int requestCode, int resultCode,
79
79
}
80
80
}
81
81
}
82
-
82
+
83
83
static {
84
84
System .loadLibrary ("openal" );
85
85
System .loadLibrary ("ogg" );
86
86
System .loadLibrary ("vorbis" );
87
87
System .loadLibrary ("ssl" );
88
88
System .loadLibrary ("crypto" );
89
89
System .loadLibrary ("gmp" );
90
+ System .loadLibrary ("iconv" );
90
91
91
92
// We don't have to load libminetest.so ourselves,
92
93
// but if we do, we get nicer logcat errors when
93
94
// loading fails.
94
95
System .loadLibrary ("minetest" );
95
96
}
96
-
97
+
97
98
private int m_MessagReturnCode ;
98
99
private String m_MessageReturnValue ;
99
100
}
0 commit comments