2020-12-09 12:42:01 +01:00
|
|
|
package org.schabi.newpipe.error;
|
2016-09-13 22:36:47 +02:00
|
|
|
|
|
|
|
import android.content.Context;
|
2020-03-31 19:20:15 +02:00
|
|
|
|
2019-10-04 14:59:08 +02:00
|
|
|
import androidx.annotation.NonNull;
|
2016-09-13 22:36:47 +02:00
|
|
|
|
2020-12-11 14:55:47 +01:00
|
|
|
import org.acra.ReportField;
|
2020-05-01 18:26:12 +02:00
|
|
|
import org.acra.data.CrashReportData;
|
2016-09-13 22:36:47 +02:00
|
|
|
import org.acra.sender.ReportSender;
|
2016-09-13 23:39:32 +02:00
|
|
|
import org.schabi.newpipe.R;
|
2016-09-13 22:36:47 +02:00
|
|
|
|
2017-09-03 08:04:18 +02:00
|
|
|
/*
|
2016-09-13 22:38:45 +02:00
|
|
|
* Created by Christian Schabesberger on 13.09.16.
|
|
|
|
*
|
|
|
|
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
|
|
|
|
* 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 <http://www.gnu.org/licenses/>.
|
2016-09-13 22:36:47 +02:00
|
|
|
*/
|
2016-09-13 22:38:45 +02:00
|
|
|
|
2016-09-13 22:36:47 +02:00
|
|
|
public class AcraReportSender implements ReportSender {
|
|
|
|
|
|
|
|
@Override
|
2020-03-31 19:20:15 +02:00
|
|
|
public void send(@NonNull final Context context, @NonNull final CrashReportData report) {
|
2021-12-01 09:43:24 +01:00
|
|
|
ErrorUtil.openActivity(context, new ErrorInfo(
|
2020-12-11 14:55:47 +01:00
|
|
|
new String[]{report.getString(ReportField.STACK_TRACE)},
|
|
|
|
UserAction.UI_ERROR,
|
|
|
|
ErrorInfo.SERVICE_NONE,
|
|
|
|
"ACRA report",
|
2021-12-01 10:28:35 +01:00
|
|
|
R.string.app_ui_crash));
|
2016-09-13 22:36:47 +02:00
|
|
|
}
|
|
|
|
}
|