Relocate the entire logging process to prevent any issues
This commit is contained in:
parent
97fb628797
commit
a6407a52b4
|
@ -323,19 +323,6 @@
|
|||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/debug_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="8"
|
||||
android:text="@string/menu_debug" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center_vertical" >
|
||||
|
|
|
@ -35,10 +35,7 @@
|
|||
<string name="games_listing">Tilgængelige Dreamcast spil</string>
|
||||
|
||||
<string name="report_issue">Tidligere nedbrud detekteret</string>
|
||||
<string name="platform">Kopierer logcat indhold til clipboardet\nIndsæt venligst i fejlrapporten</string>
|
||||
<string name="log_saved">Log gemt i \"System Path\"</string>
|
||||
<string name="bios_config">Konfiguration fejlede!</string>
|
||||
<string name="menu_debug">Indsend fejllogger</string>
|
||||
|
||||
<string name="customize_touch_controls">Tilpas touch knapper</string>
|
||||
<string name="launch_editor">Opstarts editor</string>
|
||||
|
@ -67,10 +64,6 @@
|
|||
|
||||
<string name="about_text">reicast er en Dreamcast emulator</string>
|
||||
<string name="revision_text">Version: %1$s [%2$s]</string>
|
||||
<string name="app_site">Hjemmeside: http://reicast.com</string>
|
||||
<string name="beta_site">Betaer: http://reicast.loungekatt.com</string>
|
||||
<string name="git_api">https://api.github.com/repos/reicast/reicast-emulator/commits</string>
|
||||
<string name="git_issues">https://github.com/reicast/reicast-emulator/issues/</string>
|
||||
|
||||
<string-array name="controllers">
|
||||
<item>Controller A</item>
|
||||
|
|
|
@ -69,9 +69,5 @@
|
|||
|
||||
<string name="textOn">Ein</string>
|
||||
<string name="textOff">Aus</string>
|
||||
|
||||
<string name="platform">Kopieren logcat Inhalt in die Zwischenablage kopieren\nBitte fügen Sie in der Ausgabe Bericht</string>
|
||||
|
||||
<string name="menu_debug">Senden Debug-Protokolle</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
<resources>
|
||||
|
||||
<string name="menu_settings">Settings</string>
|
||||
<string name="system_path">System Path (location of the data folder with dc_boot.bin/dc_flash.bin inside)</string>
|
||||
<string name="browser_path">Default System Path</string>
|
||||
<string name="games_path">Storage Path (location of .gdi, .chd or .cdi images)</string>
|
||||
<string name="game_path">Default Game Storage</string>
|
||||
|
||||
<string name="boot_bios">Boot Dreamcast Bios</string>
|
||||
<string name="missing_bios">BIOS Missing. The Dreamcast BIOS is required for this emulator to work. Place the BIOS file in %1$s/data/dc_boot.bin</string>
|
||||
<string name="missing_flash">Flash Missing. The Dreamcast Flash is required for this emulator to work. Place the Flash file in %1$s/data/dc_flash.bin</string>
|
||||
<string name="require_bios">You have to provide the BIOS</string>
|
||||
|
||||
<string name="folder_bios">BOOT BIOS</string>
|
||||
<string name="folder_select">SELECT CURRENT FOLDER</string>
|
||||
|
||||
<string name="select_dynarec">Dynarec Options</string>
|
||||
<string name="select_unstable">Unstable Optimisations</string>
|
||||
<string name="select_region">DC Region</string>
|
||||
<string name="select_limitfps">Limit FPS</string>
|
||||
<string name="select_mipmaps">Use Mipmaps (fix for old SGX540)</string>
|
||||
<string name="select_stretch">Widescreen Mode</string>
|
||||
<string name="set_frameskip">Frameskip Value</string>
|
||||
<string name="select_render">PVR Rendering (does nothing for now)</string>
|
||||
<string name="default_disk">Set Default Disk</string>
|
||||
|
||||
<string name="games_listing">Available Dreamcast Games</string>
|
||||
|
||||
<string name="customize_touch_controls">Customize Touch Controls</string>
|
||||
<string name="launch_editor">Launch Editor</string>
|
||||
<string name="touch_vibration">Touch Vibration</string>
|
||||
<string name="controller_a">Controller A</string>
|
||||
<string name="controller_b">Controller B</string>
|
||||
<string name="controller_c">Controller C</string>
|
||||
<string name="controller_d">Controller D</string>
|
||||
<string name="controller_not_connected">Controller Not Connected</string>
|
||||
<string name="controller_none_selected">No Controller Selected</string>
|
||||
<string name="select">Select</string>
|
||||
<string name="remove">Remove</string>
|
||||
<string name="select_controller_title">Select Controller</string>
|
||||
<string name="select_controller_message">Press any button on the controller %1$s to assign to port</string>
|
||||
<string name="controller_already_in_use">This controller is already in use!</string>
|
||||
<string name="modified_layout">Enable Custom Key Layout</string>
|
||||
<string name="controller_compat">Enable Compatibility Mode</string>
|
||||
|
||||
<string name="customize_physical_controls">Customize Physical Controls</string>
|
||||
<string name="map_keycode_title">Modify Controller</string>
|
||||
<string name="map_keycode_message">Press the new controller button for %1$s</string>
|
||||
|
||||
<string name="moga_pro_connect">MOGA Pro Connected!</string>
|
||||
<string name="moga_connect">MOGA Connected!</string>
|
||||
|
||||
<string name="about_text">reicast is a dreamcast emulator</string>
|
||||
<string name="revision_text">Version: %1$s [%2$s]</string>
|
||||
|
||||
<string-array name="controllers">
|
||||
<item>Controller A</item>
|
||||
<item>Controller B</item>
|
||||
<item>Controller C</item>
|
||||
<item>Controller D</item>
|
||||
</string-array>
|
||||
|
||||
<string name="browser">Browser</string>
|
||||
<string name="settings">Settings</string>
|
||||
<string name="paths">Paths</string>
|
||||
<string name="input">Input</string>
|
||||
<string name="about">About</string>
|
||||
<string name="rateme">Rate Me</string>
|
||||
|
||||
<string name="textOn">ON</string>
|
||||
<string name="textOff">OFF</string>
|
||||
|
||||
<string name="menu_debug">Save Error Logs</string>
|
||||
|
||||
</resources>
|
|
@ -69,8 +69,4 @@
|
|||
<string name="textOn">EN</string>
|
||||
<string name="textOff">OFF</string>
|
||||
|
||||
<string name="platform">Contenido Copiado Logcat al portapapeles\nPor favor, pegue en el informe de problema</string>
|
||||
|
||||
<string name="menu_debug">Enviar registros de errores</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -61,10 +61,7 @@
|
|||
|
||||
<string name="about_text">reicast est un émulateur dreamcast</string>
|
||||
<string name="revision_text">Version: %1$s [%2$s]</string>
|
||||
<string name="app_site">Site web officiel: http://reicast.com</string>
|
||||
<string name="beta_site">Bétas: http://reicast.loungekatt.com</string>
|
||||
<string name="git_api">https://api.github.com/repos/NoblesseOblige/reicast-emulator/commits</string>
|
||||
|
||||
|
||||
<string-array name="controllers">
|
||||
<item>Manette A</item>
|
||||
<item>Manette B</item>
|
||||
|
@ -81,9 +78,5 @@
|
|||
|
||||
<string name="textOn">ACTIF</string>
|
||||
<string name="textOff">DESACT.</string>
|
||||
|
||||
<string name="platform">Le contenu du logcat a été copié dans le presse-papiers\nVeuillez coller le rapport d\'émission</string>
|
||||
|
||||
<string name="menu_debug">Soumettre le log d\'erreurs</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -70,8 +70,4 @@
|
|||
<string name="textOn">上の</string>
|
||||
<string name="textOff">オフ</string>
|
||||
|
||||
<string name="platform">クリップボードにコピーするlogcatをコンテンツ\n問題報告書に貼り付けてください</string>
|
||||
|
||||
<string name="menu_debug">デバッグログを提出</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<resources>
|
||||
|
||||
<string name="app_name">reicast</string>
|
||||
<string name="menu_settings">설정</string>
|
||||
<string name="system_path">시스템 경로 (dc_boot.bin / dc_flash.bin 내부와 데이터 폴더의 위치)</string>
|
||||
<string name="browser_path">기본 시스템 경로</string>
|
||||
|
@ -55,9 +54,6 @@
|
|||
|
||||
<string name="about_text">reicast는 드림 캐스트 에뮬레이터</string>
|
||||
<string name="revision_text">버전: %1$s [%2$s]</string>
|
||||
<string name="app_site">홈페이지: http://reicast.com</string>
|
||||
<string name="beta_site">베타: http://reicast.loungekatt.com</string>
|
||||
<string name="git_api">https://api.github.com/repos/reicast/reicast-emulator/commits</string>
|
||||
|
||||
<string-array name="controllers">
|
||||
<item>제어 장치 A</item>
|
||||
|
@ -66,12 +62,6 @@
|
|||
<item>제어 장치 D</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="images">
|
||||
<item>cdi</item>
|
||||
<item>chd</item>
|
||||
<item>gdi</item>
|
||||
</string-array>
|
||||
|
||||
<string name="browser">브라우저</string>
|
||||
<string name="settings">설정</string>
|
||||
<string name="paths">경로</string>
|
||||
|
@ -81,9 +71,5 @@
|
|||
|
||||
<string name="textOn">ON</string>
|
||||
<string name="textOff">OFF</string>
|
||||
|
||||
<string name="platform">클립 보드에 복사 logcat 내용\n문제 보고서에 붙여 넣기</string>
|
||||
|
||||
<string name="menu_debug">디버그 로그를 제출</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -71,6 +71,4 @@
|
|||
<string name="textOn">WŁ</string>
|
||||
<string name="textOff">WYŁ</string>
|
||||
|
||||
<string name="menu_debug">Zapisz logi błędów</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -35,10 +35,8 @@
|
|||
<string name="games_listing">Jogos disponíveis</string>
|
||||
|
||||
<string name="report_issue">Falha Anterior Detectada</string>
|
||||
<string name="platform">Conteúdo do logcat copiado para a área de transferência\n Por favor, cole no relatório de erros.</string>
|
||||
<string name="log_saved">Log salvo no \"Diretório do sistema\"</string>
|
||||
<string name="bios_config">Falha ao Configurar!</string>
|
||||
<string name="menu_debug">Enviar Log de Erros</string>
|
||||
|
||||
<string name="customize_touch_controls">Configurar controles de toque na tela</string>
|
||||
<string name="launch_editor">Iniciar editor</string>
|
||||
|
|
|
@ -60,9 +60,6 @@
|
|||
|
||||
<string name="about_text">DREAMCAST эмулятор "REICAST"</string>
|
||||
<string name="revision_text">Версия: %1$s [%2$s]</string>
|
||||
<string name="app_site">Сайт: http://reicast.com</string>
|
||||
<string name="beta_site">Бета версии: http://reicast.loungekatt.com</string>
|
||||
<string name="git_api">https://api.github.com/repos/reicast/reicast-emulator/commits</string>
|
||||
|
||||
<string-array name="controllers">
|
||||
<item>Контроллер A</item>
|
||||
|
@ -84,8 +81,5 @@
|
|||
<string name="report_issue">Обнаружен предыдущий краш</string>
|
||||
<string name="log_saved">Логи сохранены в %1$s</string>
|
||||
<string name="bios_config">Ошибка конфигурации!</string>
|
||||
<string name="platform">Логи скопированы в буфер обмена.\nВставьте их в репорт.</string>
|
||||
|
||||
<string name="menu_debug">Отправить журнал ошибок</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
<resources>
|
||||
|
||||
<string name="menu_settings">Settings</string>
|
||||
<string name="system_path">System Path (location of the data folder with dc_boot.bin/dc_flash.bin inside)</string>
|
||||
<string name="browser_path">Default System Path</string>
|
||||
<string name="games_path">Storage Path (location of .gdi, .chd or .cdi images)</string>
|
||||
<string name="game_path">Default Game Storage</string>
|
||||
|
||||
<string name="boot_bios">Boot Dreamcast Bios</string>
|
||||
<string name="missing_bios">BIOS Missing. The Dreamcast BIOS is required for this emulator to work. Place the BIOS file in %1$s/data/dc_boot.bin</string>
|
||||
<string name="missing_flash">Flash Missing. The Dreamcast Flash is required for this emulator to work. Place the Flash file in %1$s/data/dc_flash.bin</string>
|
||||
<string name="require_bios">You have to provide the BIOS</string>
|
||||
|
||||
<string name="folder_bios">BOOT BIOS</string>
|
||||
<string name="folder_select">SELECT CURRENT FOLDER</string>
|
||||
|
||||
<string name="select_dynarec">Dynarec Options</string>
|
||||
<string name="select_unstable">Unstable Optimisations</string>
|
||||
<string name="select_region">DC Region</string>
|
||||
<string name="select_limitfps">Limit FPS</string>
|
||||
<string name="select_mipmaps">Use Mipmaps (fix for old SGX540)</string>
|
||||
<string name="select_stretch">Widescreen Mode</string>
|
||||
<string name="set_frameskip">Frameskip Value</string>
|
||||
<string name="select_render">PVR Rendering (does nothing for now)</string>
|
||||
<string name="default_disk">Set Default Disk</string>
|
||||
|
||||
<string name="games_listing">Available Dreamcast Games</string>
|
||||
|
||||
<string name="customize_touch_controls">Customize Touch Controls</string>
|
||||
<string name="launch_editor">Launch Editor</string>
|
||||
<string name="touch_vibration">Touch Vibration</string>
|
||||
<string name="controller_a">Controller A</string>
|
||||
<string name="controller_b">Controller B</string>
|
||||
<string name="controller_c">Controller C</string>
|
||||
<string name="controller_d">Controller D</string>
|
||||
<string name="controller_not_connected">Controller Not Connected</string>
|
||||
<string name="controller_none_selected">No Controller Selected</string>
|
||||
<string name="select">Select</string>
|
||||
<string name="remove">Remove</string>
|
||||
<string name="select_controller_title">Select Controller</string>
|
||||
<string name="select_controller_message">Press any button on the controller %1$s to assign to port</string>
|
||||
<string name="controller_already_in_use">This controller is already in use!</string>
|
||||
<string name="modified_layout">Enable Custom Key Layout</string>
|
||||
<string name="controller_compat">Enable Compatibility Mode</string>
|
||||
|
||||
<string name="customize_physical_controls">Customize Physical Controls</string>
|
||||
<string name="map_keycode_title">Modify Controller</string>
|
||||
<string name="map_keycode_message">Press the new controller button for %1$s</string>
|
||||
|
||||
<string name="moga_pro_connect">MOGA Pro Connected!</string>
|
||||
<string name="moga_connect">MOGA Connected!</string>
|
||||
|
||||
<string name="about_text">reicast is a dreamcast emulator</string>
|
||||
<string name="revision_text">Version: %1$s [%2$s]</string>
|
||||
|
||||
<string-array name="controllers">
|
||||
<item>Controller A</item>
|
||||
<item>Controller B</item>
|
||||
<item>Controller C</item>
|
||||
<item>Controller D</item>
|
||||
</string-array>
|
||||
|
||||
<string name="browser">Browser</string>
|
||||
<string name="settings">Settings</string>
|
||||
<string name="paths">Paths</string>
|
||||
<string name="input">Input</string>
|
||||
<string name="about">About</string>
|
||||
<string name="rateme">Rate Me</string>
|
||||
|
||||
<string name="textOn">ON</string>
|
||||
<string name="textOff">OFF</string>
|
||||
|
||||
<string name="menu_debug">Save Error Logs</string>
|
||||
|
||||
</resources>
|
|
@ -51,10 +51,6 @@
|
|||
<string name="moga_connect">MOGA已连接</string>
|
||||
<string name="about_text">reicast是一款dreamcast模拟器</string>
|
||||
<string name="revision_text">版本: %1$s [%2$s]</string>
|
||||
<string name="app_site">主页: http://reicast.com</string>
|
||||
<string name="beta_site">测试版: http://reicast.loungekatt.com</string>
|
||||
<string name="git_api">https://api.github.com/repos/reicast/reicast-emulator/commits</string>
|
||||
<string name="git_issues">https://github.com/reicast/reicast-emulator/issues/</string>
|
||||
|
||||
<string-array name="controllers">
|
||||
<item>控制器A</item>
|
||||
|
@ -71,8 +67,7 @@
|
|||
<string name="rateme">评价我</string>
|
||||
<string name="textOn">开</string>
|
||||
<string name="textOff">关</string>
|
||||
<string name="platform">复制logcat的内容到剪贴板\n请在问题的报告贴</string>
|
||||
|
||||
<string name="bios_config">请生成一个配置\n(运行至少一次BIOS)</string>
|
||||
<string name="menu_debug">提交错误日志</string>
|
||||
|
||||
</resources>
|
|
@ -51,10 +51,6 @@
|
|||
<string name="moga_connect">MOGA已連接</string>
|
||||
<string name="about_text">reicast是一款dreamcast模擬器</string>
|
||||
<string name="revision_text">版本: %1$s [%2$s]</string>
|
||||
<string name="app_site">主頁: http://reicast.com</string>
|
||||
<string name="beta_site">測試版: http://reicast.loungekatt.com</string>
|
||||
<string name="git_api">https://api.github.com/repos/reicast/reicast-emulator/commits</string>
|
||||
<string name="git_issues">https://github.com/reicast/reicast-emulator/issues/</string>
|
||||
|
||||
<string-array name="controllers">
|
||||
<item>控制器A</item>
|
||||
|
@ -71,8 +67,7 @@
|
|||
<string name="rateme">評價我</string>
|
||||
<string name="textOn">開</string>
|
||||
<string name="textOff">關</string>
|
||||
<string name="platform">復制logcat的內容到剪貼板\n請在問題的報告貼</string>
|
||||
|
||||
<string name="bios_config">請生成一個配置\n(運行至少一次BIOS)</string>
|
||||
<string name="menu_debug">提交錯誤日誌</string>
|
||||
|
||||
</resources>
|
|
@ -42,10 +42,7 @@
|
|||
<string name="games_listing">Available Dreamcast Games</string>
|
||||
|
||||
<string name="report_issue">Previous Crash Detected</string>
|
||||
<string name="platform">Copying logcat content to clipboard\nPlease paste in the issue report</string>
|
||||
<string name="log_saved">Log saved to \"System Path\"</string>
|
||||
<string name="bios_config">Configuration failed!</string>
|
||||
<string name="menu_debug">Submit Error Logs</string>
|
||||
|
||||
<string name="customize_touch_controls">Customize Touch Controls</string>
|
||||
<string name="launch_editor">Launch Editor</string>
|
||||
|
@ -88,8 +85,8 @@
|
|||
<string name="paths">Paths</string>
|
||||
<string name="input">Input</string>
|
||||
<string name="about">About</string>
|
||||
<string name="messages">Messages</string>
|
||||
<string name="rateme">Rate Me</string>
|
||||
<string name="messages">Test Suite</string>
|
||||
|
||||
<string name="textOn">ON</string>
|
||||
<string name="textOff">OFF</string>
|
||||
|
|
|
@ -13,7 +13,6 @@ import android.content.pm.PackageManager;
|
|||
import android.content.pm.ResolveInfo;
|
||||
import android.content.res.Configuration;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
|
@ -35,7 +34,6 @@ import com.reicast.emulator.config.Config;
|
|||
import com.reicast.emulator.config.ConfigureFragment;
|
||||
import com.reicast.emulator.config.InputFragment;
|
||||
import com.reicast.emulator.config.OptionsFragment;
|
||||
import com.reicast.emulator.debug.GenerateLogs;
|
||||
import com.reicast.emulator.emu.JNIdc;
|
||||
import com.reicast.emulator.periph.Gamepad;
|
||||
|
||||
|
@ -74,7 +72,7 @@ public class MainActivity extends SlidingFragmentActivity implements
|
|||
|
||||
String prior_error = mPrefs.getString("prior_error", null);
|
||||
if (prior_error != null && !prior_error.equals(null)) {
|
||||
initiateReport(prior_error);
|
||||
displayLogOutput(prior_error);
|
||||
mPrefs.edit().remove("prior_error").commit();
|
||||
} else {
|
||||
mUEHandler = new Thread.UncaughtExceptionHandler() {
|
||||
|
@ -314,7 +312,7 @@ public class MainActivity extends SlidingFragmentActivity implements
|
|||
* @param error
|
||||
* A generalized summary of the crash cause
|
||||
*/
|
||||
private void initiateReport(final String error) {
|
||||
private void displayLogOutput(final String error) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
|
||||
builder.setTitle(getString(R.string.report_issue));
|
||||
builder.setMessage(error);
|
||||
|
@ -324,30 +322,10 @@ public class MainActivity extends SlidingFragmentActivity implements
|
|||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
if (MainActivity.debugUser) {
|
||||
builder.setPositiveButton("Report",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
reportIssueUpstream(error);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
builder.create();
|
||||
builder.show();
|
||||
}
|
||||
|
||||
private void reportIssueUpstream(String error) {
|
||||
GenerateLogs mGenerateLogs = new GenerateLogs(MainActivity.this);
|
||||
mGenerateLogs.setUnhandled(error);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||
mGenerateLogs.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,
|
||||
home_directory);
|
||||
} else {
|
||||
mGenerateLogs.execute(home_directory);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isBiosExisting() {
|
||||
File bios = new File(home_directory, "data/dc_boot.bin");
|
||||
return bios.exists();
|
||||
|
@ -359,7 +337,7 @@ public class MainActivity extends SlidingFragmentActivity implements
|
|||
}
|
||||
|
||||
public void onGameSelected(Uri uri) {
|
||||
if (GenerateLogs.readOutput("uname -a").equals(getString(R.string.error_kernel))) {
|
||||
if (Config.readOutput("uname -a").equals(getString(R.string.error_kernel))) {
|
||||
Toast.makeText(MainActivity.this, R.string.unsupported,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package com.reicast.emulator.config;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
@ -112,4 +116,29 @@ public class Config {
|
|||
toast.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the output of a shell command
|
||||
*
|
||||
* @param command
|
||||
* The shell command being issued to the terminal
|
||||
*/
|
||||
public static String readOutput(String command) {
|
||||
try {
|
||||
Process p = Runtime.getRuntime().exec(command);
|
||||
InputStream is = null;
|
||||
if (p.waitFor() == 0) {
|
||||
is = p.getInputStream();
|
||||
} else {
|
||||
is = p.getErrorStream();
|
||||
}
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(is),
|
||||
2048);
|
||||
String line = br.readLine();
|
||||
br.close();
|
||||
return line;
|
||||
} catch (Exception ex) {
|
||||
return "ERROR: " + ex.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,11 +2,8 @@ package com.reicast.emulator.config;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
|
@ -20,7 +17,6 @@ import android.view.ViewGroup;
|
|||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemSelectedListener;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.EditText;
|
||||
|
@ -29,9 +25,7 @@ import android.widget.SeekBar.OnSeekBarChangeListener;
|
|||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.reicast.emulator.MainActivity;
|
||||
import com.reicast.emulator.R;
|
||||
import com.reicast.emulator.debug.GenerateLogs;
|
||||
import com.reicast.emulator.emu.GL2JNIView;
|
||||
|
||||
import de.ankri.views.Switch;
|
||||
|
@ -389,26 +383,5 @@ public class ConfigureFragment extends Fragment {
|
|||
|
||||
});
|
||||
|
||||
Button debug = (Button) getView().findViewById(R.id.debug_button);
|
||||
if (MainActivity.debugUser) {
|
||||
debug.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
generateErrorLog();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
debug.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void generateErrorLog() {
|
||||
GenerateLogs mGenerateLogs = new GenerateLogs(parentActivity);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||
mGenerateLogs.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,
|
||||
home_directory);
|
||||
} else {
|
||||
mGenerateLogs.execute(home_directory);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,5 +69,18 @@
|
|||
android:layout_weight="1.0"
|
||||
android:divider="#b5b5b5"
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
<TableRow
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/debug_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="8"
|
||||
android:text="@string/menu_debug" />
|
||||
</TableRow>
|
||||
|
||||
</LinearLayout>
|
|
@ -0,0 +1,7 @@
|
|||
<resources>
|
||||
|
||||
<string name="platform">Kopierer logcat indhold til clipboardet\nIndsæt venligst i fejlrapporten</string>
|
||||
<string name="log_saved">Log gemt i \"System Path\"</string>
|
||||
<string name="menu_debug">Indsend fejllogger</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,7 @@
|
|||
<resources>
|
||||
|
||||
<string name="platform">Kopieren logcat Inhalt in die Zwischenablage kopieren\nBitte fügen Sie in der Ausgabe Bericht</string>
|
||||
|
||||
<string name="menu_debug">Senden Debug-Protokolle</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,5 @@
|
|||
<resources>
|
||||
|
||||
<string name="menu_debug">Save Error Logs</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,7 @@
|
|||
<resources>
|
||||
|
||||
<string name="platform">Contenido Copiado Logcat al portapapeles\nPor favor, pegue en el informe de problema</string>
|
||||
|
||||
<string name="menu_debug">Enviar registros de errores</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,7 @@
|
|||
<resources>
|
||||
|
||||
<string name="platform">Le contenu du logcat a été copié dans le presse-papiers\nVeuillez coller le rapport d\'émission</string>
|
||||
|
||||
<string name="menu_debug">Soumettre le log d\'erreurs</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,7 @@
|
|||
<resources>
|
||||
|
||||
<string name="platform">クリップボードにコピーするlogcatをコンテンツ\n問題報告書に貼り付けてください</string>
|
||||
|
||||
<string name="menu_debug">デバッグログを提出</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,7 @@
|
|||
<resources>
|
||||
|
||||
<string name="platform">클립 보드에 복사 logcat 내용\n문제 보고서에 붙여 넣기</string>
|
||||
|
||||
<string name="menu_debug">디버그 로그를 제출</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,5 @@
|
|||
<resources>
|
||||
|
||||
<string name="menu_debug">Save Error Logs</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,7 @@
|
|||
<resources>
|
||||
|
||||
<string name="platform">Conteúdo do logcat copiado para a área de transferência\n Por favor, cole no relatório de erros.</string>
|
||||
<string name="log_saved">Log salvo no \"Diretório do sistema\"</string>
|
||||
<string name="menu_debug">Enviar Log de Erros</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,8 @@
|
|||
<resources>
|
||||
|
||||
<string name="log_saved">Логи сохранены в %1$s</string>
|
||||
<string name="platform">Логи скопированы в буфер обмена.\nВставьте их в репорт.</string>
|
||||
|
||||
<string name="menu_debug">Отправить журнал ошибок</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,6 @@
|
|||
<resources>
|
||||
|
||||
<string name="platform">复制logcat的内容到剪贴板\n请在问题的报告贴</string>
|
||||
<string name="menu_debug">提交错误日志</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,6 @@
|
|||
<resources>
|
||||
|
||||
<string name="platform">復制logcat的內容到剪貼板\n請在問題的報告貼</string>
|
||||
<string name="menu_debug">提交錯誤日誌</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,8 @@
|
|||
<resources>
|
||||
|
||||
<string name="app_name">reicast [LK Edition]</string>
|
||||
|
||||
<string name="git_issues">https://github.com/NoblesseOblige/reicast-emulator/issues/</string>
|
||||
<string name="log_url">http://twisted.dyndns.tv:3194/Dreamcast/report/submit.php</string>
|
||||
|
||||
</resources>
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
<string name="select_notify">Message Notifications</string>
|
||||
|
||||
<string name="platform">Copying logcat content to clipboard\nPlease paste in the issue report</string>
|
||||
<string name="log_saved">Log saved to \"Sdcard Path\"</string>
|
||||
<string name="menu_debug">Submit Error Logs</string>
|
||||
|
||||
<string name="textOn">ON</string>
|
||||
<string name="textOff">OFF</string>
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.reicast.emulator.debug;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
|
@ -46,6 +47,7 @@ import android.content.pm.PackageManager.NameNotFoundException;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
@ -95,6 +97,8 @@ public class Debug extends Activity {
|
|||
private Context mContext;
|
||||
private SharedPreferences mPrefs;
|
||||
|
||||
private File sdcard = Environment.getExternalStorageDirectory();
|
||||
|
||||
private ExpandableListView exlist = new ExpandableListView();
|
||||
|
||||
@Override
|
||||
|
@ -168,6 +172,23 @@ public class Debug extends Activity {
|
|||
}
|
||||
|
||||
});
|
||||
Button debug = (Button) findViewById(R.id.debug_button);
|
||||
debug.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
generateErrorLog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void generateErrorLog() {
|
||||
GenerateLogs mGenerateLogs = new GenerateLogs(Debug.this);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||
mGenerateLogs.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,
|
||||
sdcard.getAbsolutePath());
|
||||
} else {
|
||||
mGenerateLogs.execute(sdcard.getAbsolutePath());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class MessageAdapter extends BaseAdapter {
|
||||
|
|
|
@ -14,8 +14,6 @@ import android.os.AsyncTask;
|
|||
import android.os.Build;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.reicast.emulator.R;
|
||||
|
||||
public class GenerateLogs extends AsyncTask<String, Integer, String> {
|
||||
|
||||
public static final String build_model = android.os.Build.MODEL;
|
|
@ -24,8 +24,6 @@ import android.os.AsyncTask;
|
|||
import android.os.Build;
|
||||
import android.os.StrictMode;
|
||||
|
||||
import com.reicast.emulator.R;
|
||||
|
||||
/**
|
||||
* Upload the specialized logcat to reicast issues
|
||||
*
|
Loading…
Reference in New Issue