@@ -26,15 +26,15 @@ import org.schabi.newpipe.R
2626 * is available.
2727 * - Use a notification if the exception happens inside a background service (player, subscription
2828 * import, ...) or there is no activity/fragment from which to extract a root view.
29- * - Finally use the error activity only as a last resort in case the exception is critical and
29+ * - Finally use the error screen only as a last resort in case the exception is critical and
3030 * happens in an open activity (since the workflow would be interrupted anyway in that case).
3131 */
3232class ErrorUtil {
3333 companion object {
3434 private const val ERROR_REPORT_NOTIFICATION_ID = 5340681
3535
3636 /* *
37- * Starts a new error activity allowing the user to report the provided error. Only use this
37+ * Starts a new error screen allowing the user to report the provided error. Only use this
3838 * method directly as a last resort in case the exception is critical and happens in an open
3939 * activity (since the workflow would be interrupted anyway in that case). So never use this
4040 * for background services.
@@ -51,12 +51,12 @@ class ErrorUtil {
5151 ) {
5252 createNotification(context, errorInfo)
5353 } else {
54- context.startActivity(getErrorActivityIntent (context, errorInfo))
54+ context.startActivity(getErrorScreenIntent (context, errorInfo))
5555 }
5656 }
5757
5858 /* *
59- * Show a bottom snackbar to the user, with a report button that opens the error activity .
59+ * Show a bottom snackbar to the user, with a report button that opens the error screen .
6060 * Use this method if the exception is not critical and it happens in a place where a root
6161 * view is available.
6262 *
@@ -71,7 +71,7 @@ class ErrorUtil {
7171 }
7272
7373 /* *
74- * Show a bottom snackbar to the user, with a report button that opens the error activity .
74+ * Show a bottom snackbar to the user, with a report button that opens the error screen .
7575 * Use this method if the exception is not critical and it happens in a place where a root
7676 * view is available.
7777 *
@@ -105,7 +105,7 @@ class ErrorUtil {
105105 }
106106
107107 /* *
108- * Create an error notification. Tapping on the notification opens the error activity . Use
108+ * Create an error notification. Tapping on the notification opens the error screen . Use
109109 * this method if the exception happens inside a background service (player, subscription
110110 * import, ...) or there is no activity/fragment from which to extract a root view.
111111 *
@@ -129,7 +129,7 @@ class ErrorUtil {
129129 PendingIntentCompat .getActivity(
130130 context,
131131 0 ,
132- getErrorActivityIntent (context, errorInfo),
132+ getErrorScreenIntent (context, errorInfo),
133133 PendingIntent .FLAG_UPDATE_CURRENT ,
134134 false
135135 )
@@ -148,7 +148,7 @@ class ErrorUtil {
148148 }
149149 }
150150
151- private fun getErrorActivityIntent (context : Context , errorInfo : ErrorInfo ): Intent {
151+ private fun getErrorScreenIntent (context : Context , errorInfo : ErrorInfo ): Intent {
152152 return ComposeActivity .errorIntent(context, errorInfo)
153153 }
154154
@@ -160,7 +160,7 @@ class ErrorUtil {
160160 Snackbar .make(rootView, errorInfo.getMessage(context), Snackbar .LENGTH_LONG )
161161 .setActionTextColor(Color .YELLOW )
162162 .setAction(context.getString(R .string.error_snackbar_action).uppercase()) {
163- context.startActivity(getErrorActivityIntent (context, errorInfo))
163+ context.startActivity(getErrorScreenIntent (context, errorInfo))
164164 }.show()
165165 }
166166 }
0 commit comments