mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-27 17:34:50 +00:00
added some more lambdas
This commit is contained in:
parent
87ba5a7eb6
commit
30ab58c33d
@ -44,6 +44,7 @@ import java.io.StringWriter;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
@ -144,12 +145,7 @@ public class ErrorActivity extends AppCompatActivity {
|
|||||||
// async call
|
// async call
|
||||||
public static void reportError(Handler handler, final Context context, final List<Throwable> el,
|
public static void reportError(Handler handler, final Context context, final List<Throwable> el,
|
||||||
final Class returnActivity, final View rootView, final ErrorInfo errorInfo) {
|
final Class returnActivity, final View rootView, final ErrorInfo errorInfo) {
|
||||||
handler.post(new Runnable() {
|
handler.post(() -> reportError(context, el, returnActivity, rootView, errorInfo));
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
reportError(context, el, returnActivity, rootView, errorInfo);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void reportError(final Context context, final CrashReportData report, final ErrorInfo errorInfo) {
|
public static void reportError(final Context context, final CrashReportData report, final ErrorInfo errorInfo) {
|
||||||
@ -218,17 +214,13 @@ public class ErrorActivity extends AppCompatActivity {
|
|||||||
addGuruMeditaion();
|
addGuruMeditaion();
|
||||||
currentTimeStamp = getCurrentTimeStamp();
|
currentTimeStamp = getCurrentTimeStamp();
|
||||||
|
|
||||||
reportButton.setOnClickListener(new View.OnClickListener() {
|
reportButton.setOnClickListener((View v) -> {
|
||||||
@Override
|
Intent i = new Intent(Intent.ACTION_SENDTO);
|
||||||
public void onClick(View v) {
|
i.setData(Uri.parse("mailto:" + ERROR_EMAIL_ADDRESS))
|
||||||
|
|
||||||
Intent intent = new Intent(Intent.ACTION_SENDTO);
|
|
||||||
intent.setData(Uri.parse("mailto:" + ERROR_EMAIL_ADDRESS))
|
|
||||||
.putExtra(Intent.EXTRA_SUBJECT, ERROR_EMAIL_SUBJECT)
|
.putExtra(Intent.EXTRA_SUBJECT, ERROR_EMAIL_SUBJECT)
|
||||||
.putExtra(Intent.EXTRA_TEXT, buildJson());
|
.putExtra(Intent.EXTRA_TEXT, buildJson());
|
||||||
|
|
||||||
startActivity(Intent.createChooser(intent, "Send Email"));
|
startActivity(Intent.createChooser(i, "Send Email"));
|
||||||
}
|
|
||||||
});
|
});
|
||||||
reportButton.setEnabled(false);
|
reportButton.setEnabled(false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user