Commit Test

This commit is contained in:
hyb1996
2017-04-29 21:23:45 +08:00
parent 6829c0659e
commit 51349356a7
65 changed files with 758 additions and 1751 deletions

View File

@@ -20,7 +20,7 @@ public class ImportIntentActivity extends BaseActivity {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
handleIntent();
handleIntent(getIntent());
} catch (Exception e) {
e.printStackTrace();
Toast.makeText(this, R.string.edit_and_run_handle_intent_error, Toast.LENGTH_LONG).show();
@@ -28,8 +28,12 @@ public class ImportIntentActivity extends BaseActivity {
}
}
private void handleIntent() {
Intent intent = getIntent();
@Override
protected void onNewIntent(Intent intent) {
handleIntent(intent);
}
private void handleIntent(Intent intent) {
final String path = intent.getData().getPath();
if (!TextUtils.isEmpty(path))
MainActivity.importScriptFile(this, path);