Skip to content

Commit 4ee73b4

Browse files
committed
cleanup
1 parent ea767ed commit 4ee73b4

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

google-play-store/release_note.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
# 1.1.5
3+
- SDL supported
4+
- Build native activity
5+
6+
7+
# 1.1.4
8+
- Supported format code (C/C++)
9+
- Improve show error when compile failed
10+
- Support custom compiler options
11+
- Compiler log

sdlplugin/install.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
adb uninstall com.duy.c.cpp.compiler.sdl
2-
adb install -r ./build/outputs/apk/arch_arm7/release/app-arch_arm7-release.apk
3-
adb shell am start -n "com.duy.c.cpp.compiler.sdl/com.duy.c.cpp.compiler.ui.InstallActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
1+
adb uninstall com.duy.c.cpp.compiler.sdlplugin
2+
adb install -r ./build/outputs/apk/release/sdlplugin-release.apk
3+
adb shell am start -n "com.duy.c.cpp.compiler.sdlplugin/com.duy.c.cpp.compiler.sdlplugin.sdlpluginActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

sdlplugin/src/main/java/com/duy/c/cpp/compiler/sdlplugin/sdlpluginActivity.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ public class sdlpluginActivity extends SDLActivity {
3535

3636
@Override
3737
protected void onCreate(Bundle savedInstanceState) {
38-
Log.v(TAG, "onCreate()");
3938
super.onCreate(savedInstanceState);
39+
Log.d(TAG, "onCreate()");
40+
4041
if (isPermissionGranted()) {
4142
initUI();
4243
} else {
@@ -104,19 +105,23 @@ private void showAboutDialog() {
104105
@Override
105106
public void onClick(DialogInterface dialog, int which) {
106107
dialog.cancel();
107-
finish();
108108
}
109109
});
110110
if (!isAppInstalled("com.duy.c.cpp.compiler")) {
111111
builder.setPositiveButton(R.string.install_cpp_nide, new DialogInterface.OnClickListener() {
112112
@Override
113113
public void onClick(DialogInterface dialog, int which) {
114-
dialog.cancel();
115114
gotoPlayStore("com.duy.c.cpp.compiler");
116-
finish();
115+
dialog.cancel();
117116
}
118117
});
119118
}
119+
builder.setOnCancelListener(new DialogInterface.OnCancelListener() {
120+
@Override
121+
public void onCancel(DialogInterface dialog) {
122+
System.exit(RESULT_OK);
123+
}
124+
});
120125
builder.create().show();
121126
}
122127

sdlplugin/src/main/java/org/libsdl/app/SDLActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
/**
4242
* SDL Activity
4343
*/
44-
@SuppressWarnings("unused")
44+
@SuppressWarnings("all")
4545
public class SDLActivity extends AppCompatActivity {
4646
protected static final int COMMAND_USER = 0x8000;
4747
// Messages from the SDLMain thread
@@ -273,10 +273,10 @@ protected void onCreate(Bundle savedInstanceState) {
273273
mSingleton = this;
274274

275275
if (!mIsPaused) {
276-
if (getIntent().getExtras() == null) {
276+
if (getIntent().getExtras() == null || !getIntent().hasExtra("sdlmain")) {
277277
return;
278278
} else {
279-
String sdlmain = getIntent().getExtras().getString("sdlmain");
279+
String sdlmain = getIntent().getStringExtra("sdlmain");
280280
Log.e(TAG, "sdlmain is " + sdlmain);
281281

282282
String libDir = getCacheDir().getParentFile().getAbsolutePath() + "/mylib";

0 commit comments

Comments
 (0)