From a0f74e715ac5db363fcaab413214a99c78ee70a3 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Sun, 1 Apr 2018 21:54:00 +0200 Subject: [PATCH] fix bugreport for kiosk --- app/build.gradle | 3 ++- .../newpipe/fragments/list/kiosk/KioskFragment.java | 2 +- .../java/org/schabi/newpipe/report/ErrorActivity.java | 11 ++++------- .../java/org/schabi/newpipe/report/UserAction.java | 3 ++- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3f099c4fe..b6ce0ffd4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -54,7 +54,8 @@ dependencies { exclude module: 'support-annotations' } - implementation 'com.github.TeamNewPipe:NewPipeExtractor:f787b375e5fb6d' + implementation 'com.github.TeamNewPipe:NewPipeExtractor:a6b6235644474' + testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:1.10.19' diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java index 482f71cb4..c6d6ea0c3 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java @@ -168,7 +168,7 @@ public class KioskFragment extends BaseListInfoFragment { if (!result.getErrors().isEmpty()) { showSnackBarError(result.getErrors(), - UserAction.REQUESTED_PLAYLIST, + UserAction.REQUESTED_KIOSK, NewPipe.getNameOfService(result.getServiceId()), result.getUrl(), 0); } } diff --git a/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java index 017c094aa..b065935b8 100644 --- a/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java +++ b/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java @@ -89,7 +89,8 @@ public class ErrorActivity extends AppCompatActivity { private TextView errorMessageView; public static void reportUiError(final AppCompatActivity activity, final Throwable el) { - reportError(activity, el, activity.getClass(), null, ErrorInfo.make(UserAction.UI_ERROR, "none", "", R.string.app_ui_crash)); + reportError(activity, el, activity.getClass(), null, + ErrorInfo.make(UserAction.UI_ERROR, "none", "", R.string.app_ui_crash)); } public static void reportError(final Context context, final List el, @@ -97,12 +98,8 @@ public class ErrorActivity extends AppCompatActivity { if (rootView != null) { Snackbar.make(rootView, R.string.error_snackbar_message, 15 * 1000) .setActionTextColor(Color.YELLOW) - .setAction(R.string.error_snackbar_action, new View.OnClickListener() { - @Override - public void onClick(View v) { - startErrorActivity(returnActivity, context, errorInfo, el); - } - }).show(); + .setAction(R.string.error_snackbar_action, v -> + startErrorActivity(returnActivity, context, errorInfo, el)).show(); } else { startErrorActivity(returnActivity, context, errorInfo, el); } diff --git a/app/src/main/java/org/schabi/newpipe/report/UserAction.java b/app/src/main/java/org/schabi/newpipe/report/UserAction.java index b97080170..c06c65a81 100644 --- a/app/src/main/java/org/schabi/newpipe/report/UserAction.java +++ b/app/src/main/java/org/schabi/newpipe/report/UserAction.java @@ -13,7 +13,8 @@ public enum UserAction { GET_SUGGESTIONS("get suggestions"), REQUESTED_STREAM("requested stream"), REQUESTED_CHANNEL("requested channel"), - REQUESTED_PLAYLIST("requested playlist"); + REQUESTED_PLAYLIST("requested playlist"), + REQUESTED_KIOSK("requested kiosk"); private final String message;