|
@@ -7,15 +7,18 @@ import android.app.ProgressDialog;
|
|
|
import android.content.Context;
|
|
|
import android.content.DialogInterface;
|
|
|
import android.content.Intent;
|
|
|
+import android.content.res.Configuration;
|
|
|
import android.os.AsyncTask;
|
|
|
import android.os.Bundle;
|
|
|
import android.os.Environment;
|
|
|
import android.text.TextUtils;
|
|
|
import android.util.Log;
|
|
|
import android.view.View;
|
|
|
+import android.view.WindowManager;
|
|
|
import android.widget.Button;
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
+import androidx.annotation.NonNull;
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
|
|
import com.xugame.gameconsole.emulator.EmulatorType;
|
|
@@ -31,12 +34,13 @@ import java.io.IOException;
|
|
|
import java.io.InputStream;
|
|
|
|
|
|
public class TextCopyFileActivity extends Activity {
|
|
|
- private static final String TAG = "TextCopyFileActivity";
|
|
|
+ private static final String TAG = "TextCopyFileActivityTAG";
|
|
|
private Button btn1, btn2, btn3;
|
|
|
private Context mContext;
|
|
|
|
|
|
@Override
|
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
|
+ DebugUtil.i("EMULATORTAG","Copy ac onCreate");
|
|
|
super.onCreate(savedInstanceState);
|
|
|
setContentView(R.layout.textcopp_layout);
|
|
|
this.mContext = this;
|
|
@@ -55,8 +59,35 @@ public class TextCopyFileActivity extends Activity {
|
|
|
init();
|
|
|
DebugUtil.i(TAG,""+this.getFilesDir().getParent()+"/assets");
|
|
|
}
|
|
|
- private void copyAssets(){
|
|
|
|
|
|
+ @Override
|
|
|
+ protected void onResume() {
|
|
|
+ DebugUtil.i("EMULATORTAG","Copy ac onResume");
|
|
|
+ super.onResume();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onPause() {
|
|
|
+ DebugUtil.i("EMULATORTAG","Copy ac onPause");
|
|
|
+ super.onPause();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onStop() {
|
|
|
+ DebugUtil.i("EMULATORTAG","Copy ac onStop");
|
|
|
+ super.onStop();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onDestroy() {
|
|
|
+ DebugUtil.i("EMULATORTAG","Copy ac onDestroy");
|
|
|
+ super.onDestroy();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onRestart() {
|
|
|
+ DebugUtil.i("EMULATORTAG","Copy ac onRestart");
|
|
|
+ super.onRestart();
|
|
|
}
|
|
|
|
|
|
//创建监听权限的接口对象
|
|
@@ -111,6 +142,7 @@ public class TextCopyFileActivity extends Activity {
|
|
|
File file = new File(corepath);
|
|
|
if (file.exists()) {
|
|
|
Intent intent = new Intent(this, MainActivity.class);
|
|
|
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
intent.putExtra("romPath", rompath);
|
|
|
intent.putExtra("corePath", corepath);
|
|
|
startActivity(intent);
|
|
@@ -221,4 +253,40 @@ public class TextCopyFileActivity extends Activity {
|
|
|
mProgressDialog.show();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
|
|
+ DebugUtil.i(TAG,"onConfigurationChanged"+newConfig.toString());
|
|
|
+ super.onConfigurationChanged(newConfig);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onAttachedToWindow() {
|
|
|
+ DebugUtil.i(TAG,"onAttachedToWindow");
|
|
|
+ super.onAttachedToWindow();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onNewIntent(Intent intent) {
|
|
|
+ DebugUtil.i(TAG,"onNewIntent");
|
|
|
+ super.onNewIntent(intent);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onLowMemory() {
|
|
|
+ DebugUtil.i(TAG,"onLowMemory");
|
|
|
+ super.onLowMemory();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onWindowAttributesChanged(WindowManager.LayoutParams params) {
|
|
|
+ DebugUtil.i(TAG,"onWindowAttributesChanged");
|
|
|
+ super.onWindowAttributesChanged(params);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onStateNotSaved() {
|
|
|
+ DebugUtil.i(TAG,"onStateNotSaved");
|
|
|
+ super.onStateNotSaved();
|
|
|
+ }
|
|
|
+
|
|
|
}
|