From 14eaedd73ace48306fa387d784abc1d835b2ef65 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Tue, 13 Sep 2016 22:36:47 +0200 Subject: [PATCH 1/6] use intent system to pass errors to error activity --- app/build.gradle | 9 +- .../org/schabi/newpipe/AcraReportSender.java | 26 +++++ .../newpipe/AcraReportSenderFactory.java | 16 +++ .../schabi/newpipe/ActivityCommunicator.java | 3 - app/src/main/java/org/schabi/newpipe/App.java | 23 +++++ .../org/schabi/newpipe/ErrorActivity.java | 97 +++++++++++++++---- app/src/main/res/values/strings.xml | 1 + 7 files changed, 149 insertions(+), 26 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/AcraReportSender.java create mode 100644 app/src/main/java/org/schabi/newpipe/AcraReportSenderFactory.java diff --git a/app/build.gradle b/app/build.gradle index 6e07de082..c371a3712 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,10 +32,10 @@ android { dependencies { testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:24.2.0' - compile 'com.android.support:support-v4:24.2.0' - compile 'com.android.support:design:24.2.0' - compile 'com.android.support:recyclerview-v7:24.2.0' + compile 'com.android.support:appcompat-v7:24.2.1' + compile 'com.android.support:support-v4:24.2.1' + compile 'com.android.support:design:24.2.1' + compile 'com.android.support:recyclerview-v7:24.2.1' compile 'org.jsoup:jsoup:1.8.3' compile 'org.mozilla:rhino:1.7.7' compile 'info.guardianproject.netcipher:netcipher:1.2' @@ -46,4 +46,5 @@ dependencies { compile 'com.google.code.gson:gson:2.4' compile 'com.nononsenseapps:filepicker:3.0.0' testCompile 'junit:junit:4.12' + compile 'ch.acra:acra:4.9.0' } diff --git a/app/src/main/java/org/schabi/newpipe/AcraReportSender.java b/app/src/main/java/org/schabi/newpipe/AcraReportSender.java new file mode 100644 index 000000000..813633f5e --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/AcraReportSender.java @@ -0,0 +1,26 @@ +package org.schabi.newpipe; + +import android.content.Context; +import android.util.Log; + +import org.acra.collector.CrashReportData; +import org.acra.sender.ReportSender; +import org.acra.sender.ReportSenderException; + +/** + * Created by the-scrabi on 13.09.16. + */ +public class AcraReportSender implements ReportSender { + + @Override + public void send(Context context, CrashReportData report) throws ReportSenderException { + Log.e("Newpipe UI ERROR", report.toString()); + try { + ((String)null).length(); + } catch(Exception e) { + ErrorActivity.reportError(context, e, null, null, + ErrorActivity.ErrorInfo.make(ErrorActivity.SEARCHED,"none", + "App crash, UI failure", R.string.app_ui_crash)); + } + } +} diff --git a/app/src/main/java/org/schabi/newpipe/AcraReportSenderFactory.java b/app/src/main/java/org/schabi/newpipe/AcraReportSenderFactory.java new file mode 100644 index 000000000..7dd6c6ad2 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/AcraReportSenderFactory.java @@ -0,0 +1,16 @@ +package org.schabi.newpipe; + +import android.content.Context; + +import org.acra.config.ACRAConfiguration; +import org.acra.sender.ReportSender; +import org.acra.sender.ReportSenderFactory; + +/** + * Created by the-scrabi on 13.09.16. + */ +public class AcraReportSenderFactory implements ReportSenderFactory { + public ReportSender create(Context context, ACRAConfiguration config) { + return new AcraReportSender(); + } +} diff --git a/app/src/main/java/org/schabi/newpipe/ActivityCommunicator.java b/app/src/main/java/org/schabi/newpipe/ActivityCommunicator.java index a097e087c..fa843106d 100644 --- a/app/src/main/java/org/schabi/newpipe/ActivityCommunicator.java +++ b/app/src/main/java/org/schabi/newpipe/ActivityCommunicator.java @@ -42,8 +42,5 @@ public class ActivityCommunicator { // Thumbnail send from VideoItemDetailFragment to BackgroundPlayer public volatile Bitmap backgroundPlayerThumbnail; - // Sent from any activity to ErrorActivity. - public volatile List errorList; public volatile Class returnActivity; - public volatile ErrorActivity.ErrorInfo errorInfo; } diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java index f0604f16f..81555d979 100644 --- a/app/src/main/java/org/schabi/newpipe/App.java +++ b/app/src/main/java/org/schabi/newpipe/App.java @@ -2,10 +2,17 @@ package org.schabi.newpipe; import android.app.Application; import android.content.Context; +import android.util.Log; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; +import org.acra.ACRA; +import org.acra.config.ACRAConfiguration; +import org.acra.config.ACRAConfigurationException; +import org.acra.config.ConfigurationBuilder; +import org.acra.sender.ReportSenderFactory; +import org.schabi.newpipe.extractor.ServiceList; import org.schabi.newpipe.settings.SettingsActivity; import info.guardianproject.netcipher.NetCipher; @@ -30,12 +37,28 @@ import info.guardianproject.netcipher.proxy.OrbotHelper; */ public class App extends Application { + private static final String TAG = App.class.toString(); private static boolean useTor; + final Class[] reportSenderFactoryClasses + = new Class[]{AcraReportSenderFactory.class}; + @Override public void onCreate() { super.onCreate(); + // init crashreport + try { + final ACRAConfiguration acraConfig = new ConfigurationBuilder(this) + .setReportSenderFactoryClasses(reportSenderFactoryClasses) + .build(); + ACRA.init(this, acraConfig); + } catch(ACRAConfigurationException ace) { + ace.printStackTrace(); + ErrorActivity.reportError(this, ace, null, null, + ErrorActivity.ErrorInfo.make(ErrorActivity.SEARCHED,"none", + "Could not initialize ACRA crash report", R.string.app_ui_crash)); + } // Initialize image loader ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this).build(); diff --git a/app/src/main/java/org/schabi/newpipe/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/ErrorActivity.java index 485a19c6d..d064af291 100644 --- a/app/src/main/java/org/schabi/newpipe/ErrorActivity.java +++ b/app/src/main/java/org/schabi/newpipe/ErrorActivity.java @@ -8,6 +8,8 @@ import android.content.Intent; import android.graphics.Color; import android.net.Uri; import android.os.Build; +import android.os.Parcel; +import android.os.Parcelable; import android.preference.PreferenceManager; import android.support.design.widget.Snackbar; import android.support.v4.app.NavUtils; @@ -57,7 +59,7 @@ import java.util.Vector; */ public class ErrorActivity extends AppCompatActivity { - public static class ErrorInfo { + public static class ErrorInfo implements Parcelable { public int userAction; public String request; public String serviceName; @@ -71,15 +73,59 @@ public class ErrorActivity extends AppCompatActivity { info.message = message; return info; } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeInt(this.userAction); + dest.writeString(this.request); + dest.writeString(this.serviceName); + dest.writeInt(this.message); + } + + public ErrorInfo() { + } + + protected ErrorInfo(Parcel in) { + this.userAction = in.readInt(); + this.request = in.readString(); + this.serviceName = in.readString(); + this.message = in.readInt(); + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + @Override + public ErrorInfo createFromParcel(Parcel source) { + return new ErrorInfo(source); + } + + @Override + public ErrorInfo[] newArray(int size) { + return new ErrorInfo[size]; + } + }; } + // LOG TAGS public static final String TAG = ErrorActivity.class.toString(); + + // BUNDLE TAGS + public static final String ERROR_INFO = "error_info"; + public static final String ERROR_LIST = "error_list"; + + // MESSAGE ID public static final int SEARCHED = 0; public static final int REQUESTED_STREAM = 1; public static final int GET_SUGGESTIONS = 2; public static final int SOMETHING_ELSE = 3; public static final int USER_REPORT = 4; public static final int LOAD_IMAGE = 5; + + // MESSAGE STRING public static final String SEARCHED_STRING = "searched"; public static final String REQUESTED_STREAM_STRING = "requested stream"; public static final String GET_SUGGESTIONS_STRING = "get suggestions"; @@ -91,7 +137,7 @@ public class ErrorActivity extends AppCompatActivity { public static final String ERROR_EMAIL_ADDRESS = "crashreport@newpipe.schabi.org"; public static final String ERROR_EMAIL_SUBJECT = "Exception in NewPipe " + BuildConfig.VERSION_NAME; - private List errorList; + private String[] errorList; private ErrorInfo errorInfo; private Class returnActivity; private String currentTimeStamp; @@ -115,19 +161,19 @@ public class ErrorActivity extends AppCompatActivity { @Override public void onClick(View v) { ActivityCommunicator ac = ActivityCommunicator.getCommunicator(); - ac.errorList = el; ac.returnActivity = returnAcitivty; - ac.errorInfo = errorInfo; Intent intent = new Intent(context, ErrorActivity.class); + intent.putExtra(ERROR_INFO, errorInfo); + intent.putExtra(ERROR_LIST, elToSl(el)); context.startActivity(intent); } }).show(); } else { ActivityCommunicator ac = ActivityCommunicator.getCommunicator(); - ac.errorList = el; ac.returnActivity = returnAcitivty; - ac.errorInfo = errorInfo; Intent intent = new Intent(context, ErrorActivity.class); + intent.putExtra(ERROR_INFO, errorInfo); + intent.putExtra(ERROR_LIST, elToSl(el)); context.startActivity(intent); } } @@ -169,6 +215,9 @@ public class ErrorActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_error); + + Intent intent = getIntent(); + try { ActionBar actionBar = getSupportActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); @@ -179,23 +228,20 @@ public class ErrorActivity extends AppCompatActivity { e.printStackTrace(); } - ActivityCommunicator ac = ActivityCommunicator.getCommunicator(); - errorList = ac.errorList; - returnActivity = ac.returnActivity; - errorInfo = ac.errorInfo; - reportButton = (Button) findViewById(R.id.errorReportButton); userCommentBox = (EditText) findViewById(R.id.errorCommentBox); errorView = (TextView) findViewById(R.id.errorView); infoView = (TextView) findViewById(R.id.errorInfosView); errorMessageView = (TextView) findViewById(R.id.errorMessageView); - errorView.setText(formErrorText(errorList)); + ActivityCommunicator ac = ActivityCommunicator.getCommunicator(); + returnActivity = ac.returnActivity; + errorInfo = intent.getParcelableExtra(ERROR_INFO); + errorList = intent.getStringArrayExtra(ERROR_LIST); - //importand add gurumeditaion + //importand add gurumeditaion addGuruMeditaion(); currentTimeStamp = getCurrentTimeStamp(); - buildInfo(errorInfo); reportButton.setOnClickListener(new View.OnClickListener() { @Override @@ -214,12 +260,16 @@ public class ErrorActivity extends AppCompatActivity { globIpRangeThread = new Thread(new IpRagneRequester()); globIpRangeThread.start(); + // normal bugreport + buildInfo(errorInfo); if(errorInfo.message != 0) { errorMessageView.setText(errorInfo.message); } else { errorMessageView.setVisibility(View.GONE); findViewById(R.id.messageWhatHappenedView).setVisibility(View.GONE); } + + errorView.setText(formErrorText(errorList)); } @Override @@ -255,12 +305,12 @@ public class ErrorActivity extends AppCompatActivity { return sw.getBuffer().toString(); } - private String formErrorText(List el) { + private String formErrorText(String[] el) { String text = ""; if(el != null) { - for (Throwable e : el) { + for (String e : el) { text += "-------------------------------------\n" - + getStackTrace(e); + + e; } } text += "-------------------------------------"; @@ -316,8 +366,8 @@ public class ErrorActivity extends AppCompatActivity { JSONArray exceptionArray = new JSONArray(); if(errorList != null) { - for (Throwable e : errorList) { - exceptionArray.put(getStackTrace(e)); + for (String e : errorList) { + exceptionArray.put(e); } } @@ -421,4 +471,13 @@ public class ErrorActivity extends AppCompatActivity { } } } + + // errorList to StringList + private static String[] elToSl(List stackTraces) { + String[] out = new String[stackTraces.size()]; + for(int i = 0; i < stackTraces.size(); i++) { + out[i] = getStackTrace(stackTraces.get(i)); + } + return out; + } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3d1a0fa35..38ffe9742 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -97,6 +97,7 @@ This is a LIVE STREAM. These are not yet supported. Could not get any stream. Could not load Image + App/UI crashed Sorry that should not happen. Guru Meditation. From 27bc414616395f3a5db9fcc3751f1fe8edc96293 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Tue, 13 Sep 2016 22:38:45 +0200 Subject: [PATCH 2/6] add copyright notice --- .../org/schabi/newpipe/AcraReportSender.java | 19 ++++++++++++++++++- .../newpipe/AcraReportSenderFactory.java | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/AcraReportSender.java b/app/src/main/java/org/schabi/newpipe/AcraReportSender.java index 813633f5e..66bd17e1e 100644 --- a/app/src/main/java/org/schabi/newpipe/AcraReportSender.java +++ b/app/src/main/java/org/schabi/newpipe/AcraReportSender.java @@ -8,8 +8,25 @@ import org.acra.sender.ReportSender; import org.acra.sender.ReportSenderException; /** - * Created by the-scrabi on 13.09.16. + * Created by Christian Schabesberger on 13.09.16. + * + * Copyright (C) Christian Schabesberger 2015 + * AcraReportSender.java is part of NewPipe. + * + * NewPipe is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * NewPipe is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NewPipe. If not, see . */ + public class AcraReportSender implements ReportSender { @Override diff --git a/app/src/main/java/org/schabi/newpipe/AcraReportSenderFactory.java b/app/src/main/java/org/schabi/newpipe/AcraReportSenderFactory.java index 7dd6c6ad2..13d7dbf57 100644 --- a/app/src/main/java/org/schabi/newpipe/AcraReportSenderFactory.java +++ b/app/src/main/java/org/schabi/newpipe/AcraReportSenderFactory.java @@ -7,8 +7,25 @@ import org.acra.sender.ReportSender; import org.acra.sender.ReportSenderFactory; /** - * Created by the-scrabi on 13.09.16. + * Created by Christian Schabesberger on 13.09.16. + * + * Copyright (C) Christian Schabesberger 2015 + * AcraReportSenderFactory.java is part of NewPipe. + * + * NewPipe is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * NewPipe is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NewPipe. If not, see . */ + public class AcraReportSenderFactory implements ReportSenderFactory { public ReportSender create(Context context, ACRAConfiguration config) { return new AcraReportSender(); From af2cddee9120cd09d91f6fabdfab159ad5e65cb8 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Tue, 13 Sep 2016 23:24:49 +0200 Subject: [PATCH 3/6] made acra catch and report errors --- .../org/schabi/newpipe/AcraReportSender.java | 11 +++------- .../org/schabi/newpipe/ErrorActivity.java | 22 +++++++++++++++++++ .../java/org/schabi/newpipe/MainActivity.java | 2 ++ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/AcraReportSender.java b/app/src/main/java/org/schabi/newpipe/AcraReportSender.java index 66bd17e1e..b86e056f7 100644 --- a/app/src/main/java/org/schabi/newpipe/AcraReportSender.java +++ b/app/src/main/java/org/schabi/newpipe/AcraReportSender.java @@ -31,13 +31,8 @@ public class AcraReportSender implements ReportSender { @Override public void send(Context context, CrashReportData report) throws ReportSenderException { - Log.e("Newpipe UI ERROR", report.toString()); - try { - ((String)null).length(); - } catch(Exception e) { - ErrorActivity.reportError(context, e, null, null, - ErrorActivity.ErrorInfo.make(ErrorActivity.SEARCHED,"none", - "App crash, UI failure", R.string.app_ui_crash)); - } + ErrorActivity.reportError(context, report, + ErrorActivity.ErrorInfo.make(ErrorActivity.UI_ERROR,"none", + "App crash, UI failure", R.string.app_ui_crash)); } } diff --git a/app/src/main/java/org/schabi/newpipe/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/ErrorActivity.java index d064af291..f572468c9 100644 --- a/app/src/main/java/org/schabi/newpipe/ErrorActivity.java +++ b/app/src/main/java/org/schabi/newpipe/ErrorActivity.java @@ -26,6 +26,8 @@ import android.widget.Button; import android.widget.EditText; import android.widget.TextView; +import org.acra.ReportField; +import org.acra.collector.CrashReportData; import org.json.JSONArray; import org.json.JSONObject; import org.schabi.newpipe.extractor.Parser; @@ -124,6 +126,7 @@ public class ErrorActivity extends AppCompatActivity { public static final int SOMETHING_ELSE = 3; public static final int USER_REPORT = 4; public static final int LOAD_IMAGE = 5; + public static final int UI_ERROR = 6; // MESSAGE STRING public static final String SEARCHED_STRING = "searched"; @@ -132,6 +135,7 @@ public class ErrorActivity extends AppCompatActivity { public static final String SOMETHING_ELSE_STRING = "something"; public static final String USER_REPORT_STRING = "user report"; public static final String LOAD_IMAGE_STRING = "load image"; + public static final String UI_ERROR_STRING = "ui error"; public static final String ERROR_EMAIL_ADDRESS = "crashreport@newpipe.schabi.org"; @@ -211,6 +215,22 @@ public class ErrorActivity extends AppCompatActivity { }); } + public static void reportError(final Context context, final CrashReportData report, final ErrorInfo errorInfo) { + // get key first (don't ask about this solution) + ReportField key = null; + for(ReportField k : report.keySet()) { + if(k.toString().equals("STACK_TRACE")) { + key = k; + } + } + String[] el = new String[] { report.get(key) }; + + Intent intent = new Intent(context, ErrorActivity.class); + intent.putExtra(ERROR_INFO, errorInfo); + intent.putExtra(ERROR_LIST, el); + context.startActivity(intent); + } + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -397,6 +417,8 @@ public class ErrorActivity extends AppCompatActivity { return USER_REPORT_STRING; case LOAD_IMAGE: return LOAD_IMAGE_STRING; + case UI_ERROR: + return UI_ERROR_STRING; default: return "Your description is in another castle."; } diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index e94d7591c..9e4a3c08f 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -44,6 +44,8 @@ public class MainActivity extends AppCompatActivity { setVolumeControlStream(AudioManager.STREAM_MUSIC); mainFragment = getSupportFragmentManager() .findFragmentById(R.id.search_fragment); + + ((String)null).length(); } public boolean onCreateOptionsMenu(Menu menu) { From 9bd5aa0da47448ebb748e4ad1f0c2cdc69ffac86 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Tue, 13 Sep 2016 23:31:06 +0200 Subject: [PATCH 4/6] add package field to crash report --- app/src/main/java/org/schabi/newpipe/AcraReportSender.java | 1 - app/src/main/java/org/schabi/newpipe/ErrorActivity.java | 2 ++ app/src/main/res/values-b+ast/strings.xml | 1 - app/src/main/res/values-de/strings.xml | 2 +- app/src/main/res/values-es/strings.xml | 1 - app/src/main/res/values-fa/strings.xml | 1 - app/src/main/res/values-fr/strings.xml | 1 - app/src/main/res/values-hu/strings.xml | 1 - app/src/main/res/values-it/strings.xml | 1 - app/src/main/res/values-ja/strings.xml | 1 - app/src/main/res/values-ko/strings.xml | 1 - app/src/main/res/values-nb-rNO/strings.xml | 1 - app/src/main/res/values-pt/strings.xml | 1 - app/src/main/res/values-ro/strings.xml | 1 - app/src/main/res/values-sk/strings.xml | 1 - app/src/main/res/values-sl/strings.xml | 1 - app/src/main/res/values-sr/strings.xml | 1 - app/src/main/res/values-uk/strings.xml | 1 - app/src/main/res/values-zh-rCN/strings.xml | 1 - app/src/main/res/values/strings.xml | 2 +- 20 files changed, 4 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/AcraReportSender.java b/app/src/main/java/org/schabi/newpipe/AcraReportSender.java index b86e056f7..bd151fae4 100644 --- a/app/src/main/java/org/schabi/newpipe/AcraReportSender.java +++ b/app/src/main/java/org/schabi/newpipe/AcraReportSender.java @@ -1,7 +1,6 @@ package org.schabi.newpipe; import android.content.Context; -import android.util.Log; import org.acra.collector.CrashReportData; import org.acra.sender.ReportSender; diff --git a/app/src/main/java/org/schabi/newpipe/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/ErrorActivity.java index f572468c9..4fb21fdc2 100644 --- a/app/src/main/java/org/schabi/newpipe/ErrorActivity.java +++ b/app/src/main/java/org/schabi/newpipe/ErrorActivity.java @@ -365,6 +365,7 @@ public class ErrorActivity extends AppCompatActivity { + "\n" + getContentLangString() + "\n" + info.serviceName + "\n" + currentTimeStamp + + "\n" + getPackageName() + "\n" + BuildConfig.VERSION_NAME + "\n" + getOsString(); @@ -379,6 +380,7 @@ public class ErrorActivity extends AppCompatActivity { .put("request", errorInfo.request) .put("content_language", getContentLangString()) .put("service", errorInfo.serviceName) + .put("package", getPackageName()) .put("version", BuildConfig.VERSION_NAME) .put("os", getOsString()) .put("time", currentTimeStamp) diff --git a/app/src/main/res/values-b+ast/strings.xml b/app/src/main/res/values-b+ast/strings.xml index b46a2d640..bc21b0237 100644 --- a/app/src/main/res/values-b+ast/strings.xml +++ b/app/src/main/res/values-b+ast/strings.xml @@ -135,7 +135,6 @@ Auto-reproduz un videu al llamar a NewPipe dende otra aplicación. Auto-reproducir al llamar dende otra aplicación - Qué:\\nSolicitú:\\nLlingua conteníu:\\nServiciu:\\nHora GMT:\\nVersión:\\nVersión SO:\\nRangu global d\'IP: Miniatura del xubidor Despréstames Nun puen consultase los descodificadores del preséu diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 379e1edc0..16cd8284f 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -91,7 +91,7 @@ MELDEN Info: Dies ist passiert: - Was:\\nAnfrage:\\nSprache des Inhalts:\\nDienst:\\nZeit (GMT):\\nVersion:\\nOS-Version:\\nGlob. IP-Bereich: + Was:\\nAnfrage:\\nSprache des Inhalts:\\nDienst:\\nZeit (GMT):\\nPacket:\\nVersion:\\nOS-Version:\\nGlob. IP-Bereich: Details: diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 15f6c7903..a8e669257 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -99,7 +99,6 @@ REPORTAR Información: Qué ha ocurrido: - Que:\\nSolicitud:\\nIdioma del contenido:\\nServicio:\\nHora GMT:\\nVersión:\\nVersión del SO:\\nRango global de IP: Buscado: Stream solicitado: Su comentario (en Inglés): diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index f612a7e00..4a5ab9972 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -81,7 +81,6 @@ گزارش اطّلاعات: چه روی داد: - چه:\\nدرخواست:\\nزبان درخواست:\\nخدمت:\\nزمان GMT:\\nنگارش:\\nنگارش س.ع:\\nبازه آی‌پی: جست‌وجو شده برای: جریان درخواستی: توضیح شما (به انگلیسی): diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index a7d5da4cc..3c4401846 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -121,7 +121,6 @@ Verbeux [désactivé] Impossible d\'accéder aux décodeurs de l\'appareil - Action :\\nRequête :\\nLangue du contenu :\\nService :\\nHeure GMT :\\nVersion :\\nVersion d\'OS :\\nIntervalle global d\'IP : Téléchargements Téléchargements Paramètres diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index b8d8146ca..e161f511e 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -117,7 +117,6 @@ Nem sikerült az összes előnézeti kép betöltése Nem sikerült a weblap betöltése. Nem sikerült a weblap teljes betöltése. - Mi:\\nKérés:\\nTartalom nyelve:\\nSzolgáltatás:\\nGMT Idő:\\nVerzió:\\nOS verzió:\\nGlob. IP tartomány: Védett tartalom nincs támogatva 18-as API alatt (Android 4.3) Ez az eszköz nem támogatja a szükséges DRM sémát Naplózás diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 546c9b0e4..204145f39 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -100,7 +100,6 @@ SEGNALA Info: Cosa è successo: - Cosa:\\nRichiesta:\\nLingua Contenuto:\\nServizio:\\nOrario GMT:\\nVersione:\\nVersione SO:\\nRange glob. dell\'IP: È stato cercato: Stream richiesto: Il tuo commento (in inglese): diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 9d29cbdb8..961675169 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -93,7 +93,6 @@ 報告 情報: 何が起こりましたか: - 何:\\nリクエスト:\\nコンテンツの言語:\\nサービス:\\nGMT 時間:\\nバージョン:\\nOS バージョン:\\nグローバル IP の範囲: 検索結果: 要求したストリーム: あなたのコメント (英語で): diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 54f78f585..50709b3b3 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -95,7 +95,6 @@ 보고 정보: 다음이 발생함: - 사유:\\n요청t:\\n컨텐츠 언어:\\n서비스:\\nGMT 시간:\\n버전:\\nOS 버전:\\nGlob. IP 범위: 다음을 검색: 요청된 스트림: 내용 (영어로 작성): diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 4c43eaf99..ffee63739 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -117,6 +117,5 @@ Eksperimentelt direkteoverført - Hva:\\nRequest:\\nContent Språk:\\nService:\\nGMT Tid:\\nVersion:\\nOS version:\\nGlob. IP-blokk: Kunne ikke igangsette dekoder %1$s diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 19c98a924..ac4d5f2f5 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -89,7 +89,6 @@ Relatório Info: O que ocorreu: - O quê:\\nPedido:\\nIdioma do conteúdo:\\nServiço:\\nHora GMT:\\nVersão:\\nVersão do So:\\nGlob. IP: Pesquisou por: Emissão solicitada: Comentários (em Inglês): diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index e9ba55c6c..3a6a64f86 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -96,7 +96,6 @@ RAPORTAȚI Informații: Ce s-a întâmplat: - Ce:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nVersion:\\nOS version:\\nGlob. Raza IP-ului: S-a căutat pentru: Fluxul cerut: Comentariul tău (în engleză): diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 16dab88e2..4fc221c9c 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -91,7 +91,6 @@ SPRÁVA Info: Čo sa stalo: - Čo:\\nPožiadavka:\\nJazyk obsahu:\\nSlužba:\\nČas v GMT:\\nVerzia:\\nVerzia OS:\\nGlob. rozsah IP: Hľadané: Požadované vysielanie: Váš komentár (v Angličtine): diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index a96a31539..100dd3587 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -107,7 +107,6 @@ [izklopljeno] Uporabi ExoPlayer Preizkusne zmožnosti -Predmet:\\nZahteva:\\nJezik vsebine:\\nStoritev:\\nČas po GMT:\\nRazličica:\\nRazličica OS:\\nObseg IP: Iskano: Zahtevan pretok: Opomba (v angleščini): diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 102ee2882..9c57e12c7 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -95,7 +95,6 @@ ПРИЈАВИ Подаци: Шта се десило: - Шта:\\nЗахтев:\\nЈезик садржаја:\\nУслуга:\\nГМТ време:\\nИздање:\\nИздање система:\\nГлоб. ИП опсег: Ваш коментар (на енглеском): Детаљи: diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index e048b27b6..be58b7365 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -79,5 +79,4 @@ ЗВІТУВАТИ Інформація: Що сталося: - Що:\\nЗапит:\\nМова контенту:\\nСервіс:\\nЧас GMT:\\nВерсія:\\nВерсія ОС:\\nДіапазон IP: diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index ff4342454..178f4bdbe 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -89,7 +89,6 @@ 详细信息: - 什么:\\n请求:\\n内容语言:\\n服务:\\nGMT 时间:\\n版本:\\nOS 版本:\\nGlob. IP 范围: 报告错误 用户报告 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 38ffe9742..dfd247dd7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -106,7 +106,7 @@ REPORT Info: What happened: - What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nVersion:\\nOS version:\\nGlob. IP range: + What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version:\\nGlob. IP range: Searched for: Requested stream: Your comment (in English): From 2b8954353d162b67ac069aa750ee5205d3218e02 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Tue, 13 Sep 2016 23:31:28 +0200 Subject: [PATCH 5/6] removed crash test line --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 9e4a3c08f..e94d7591c 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -44,8 +44,6 @@ public class MainActivity extends AppCompatActivity { setVolumeControlStream(AudioManager.STREAM_MUSIC); mainFragment = getSupportFragmentManager() .findFragmentById(R.id.search_fragment); - - ((String)null).length(); } public boolean onCreateOptionsMenu(Menu menu) { From a2a3b0575d161d25eb07ba116e736247d5bd54f6 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Tue, 13 Sep 2016 23:39:32 +0200 Subject: [PATCH 6/6] gather all bug shit things --- app/src/main/AndroidManifest.xml | 2 +- app/src/main/java/org/schabi/newpipe/App.java | 4 ++-- app/src/main/java/org/schabi/newpipe/ChannelActivity.java | 1 + .../java/org/schabi/newpipe/ImageErrorLoadingListener.java | 3 +-- .../java/org/schabi/newpipe/detail/StreamInfoWorker.java | 2 +- .../org/schabi/newpipe/detail/VideoItemDetailFragment.java | 2 +- .../java/org/schabi/newpipe/download/MainActivity.java | 2 +- .../org/schabi/newpipe/{ => report}/AcraReportSender.java | 3 ++- .../newpipe/{ => report}/AcraReportSenderFactory.java | 3 ++- .../org/schabi/newpipe/{ => report}/ErrorActivity.java | 7 ++++++- .../newpipe/search_fragment/SearchInfoItemFragment.java | 2 +- .../org/schabi/newpipe/search_fragment/SearchWorker.java | 3 +-- .../newpipe/search_fragment/SuggestionSearchRunnable.java | 3 +-- app/src/main/res/layout/activity_error.xml | 2 +- 14 files changed, 22 insertions(+), 17 deletions(-) rename app/src/main/java/org/schabi/newpipe/{ => report}/AcraReportSender.java (95%) rename app/src/main/java/org/schabi/newpipe/{ => report}/AcraReportSenderFactory.java (93%) rename app/src/main/java/org/schabi/newpipe/{ => report}/ErrorActivity.java (98%) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bffefd177..8a2f38540 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -129,7 +129,7 @@ android:name=".ExitActivity" android:label="@string/general_error" android:theme="@android:style/Theme.NoDisplay" /> - + + tools:context=".report.ErrorActivity">