Skip to content

Commit 49bda7f

Browse files
committedOct 24, 2015
Android: statically load iconv library
Fixes #3291 Thanks to @arpruss for reporting the bug, and suggesting the fix. Also, remove trailing whitespaces.
1 parent e46fa22 commit 49bda7f

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed
 

Diff for: ‎build/android/src/net/minetest/minetest/MtNativeActivity.java

+16-15
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ public void onCreate(Bundle savedInstanceState) {
1212
super.onCreate(savedInstanceState);
1313
m_MessagReturnCode = -1;
1414
m_MessageReturnValue = "";
15-
15+
1616
}
1717

1818
@Override
1919
public void onDestroy() {
2020
super.onDestroy();
2121
}
22-
23-
22+
23+
2424
public void copyAssets() {
2525
Intent intent = new Intent(this, MinetestAssetCopy.class);
2626
startActivity(intent);
2727
}
28-
28+
2929
public void showDialog(String acceptButton, String hint, String current,
3030
int editType) {
31-
31+
3232
Intent intent = new Intent(this, MinetestTextEntry.class);
3333
Bundle params = new Bundle();
3434
params.putString("acceptButton", acceptButton);
@@ -40,37 +40,37 @@ public void showDialog(String acceptButton, String hint, String current,
4040
m_MessageReturnValue = "";
4141
m_MessagReturnCode = -1;
4242
}
43-
43+
4444
public static native void putMessageBoxResult(String text);
45-
45+
4646
/* ugly code to workaround putMessageBoxResult not beeing found */
4747
public int getDialogState() {
4848
return m_MessagReturnCode;
4949
}
50-
50+
5151
public String getDialogValue() {
5252
m_MessagReturnCode = -1;
5353
return m_MessageReturnValue;
5454
}
55-
55+
5656
public float getDensity() {
5757
return getResources().getDisplayMetrics().density;
5858
}
59-
59+
6060
public int getDisplayWidth() {
6161
return getResources().getDisplayMetrics().widthPixels;
6262
}
63-
63+
6464
public int getDisplayHeight() {
6565
return getResources().getDisplayMetrics().heightPixels;
6666
}
67-
67+
6868
@Override
6969
protected void onActivityResult(int requestCode, int resultCode,
7070
Intent data) {
7171
if (requestCode == 101) {
7272
if (resultCode == RESULT_OK) {
73-
String text = data.getStringExtra("text");
73+
String text = data.getStringExtra("text");
7474
m_MessagReturnCode = 0;
7575
m_MessageReturnValue = text;
7676
}
@@ -79,21 +79,22 @@ protected void onActivityResult(int requestCode, int resultCode,
7979
}
8080
}
8181
}
82-
82+
8383
static {
8484
System.loadLibrary("openal");
8585
System.loadLibrary("ogg");
8686
System.loadLibrary("vorbis");
8787
System.loadLibrary("ssl");
8888
System.loadLibrary("crypto");
8989
System.loadLibrary("gmp");
90+
System.loadLibrary("iconv");
9091

9192
// We don't have to load libminetest.so ourselves,
9293
// but if we do, we get nicer logcat errors when
9394
// loading fails.
9495
System.loadLibrary("minetest");
9596
}
96-
97+
9798
private int m_MessagReturnCode;
9899
private String m_MessageReturnValue;
99100
}

0 commit comments

Comments
 (0)