|
63 | 63 | import org.schabi.newpipe.databinding.DrawerLayoutBinding; |
64 | 64 | import org.schabi.newpipe.databinding.InstanceSpinnerLayoutBinding; |
65 | 65 | import org.schabi.newpipe.databinding.ToolbarLayoutBinding; |
66 | | -import org.schabi.newpipe.error.ErrorActivity; |
| 66 | +import org.schabi.newpipe.error.ErrorUtil; |
67 | 67 | import org.schabi.newpipe.extractor.NewPipe; |
68 | 68 | import org.schabi.newpipe.extractor.StreamingService; |
69 | 69 | import org.schabi.newpipe.extractor.exceptions.ExtractionException; |
@@ -157,7 +157,7 @@ protected void onCreate(final Bundle savedInstanceState) { |
157 | 157 | try { |
158 | 158 | setupDrawer(); |
159 | 159 | } catch (final Exception e) { |
160 | | - ErrorActivity.reportUiErrorInSnackbar(this, "Setting up drawer", e); |
| 160 | + ErrorUtil.showUiErrorSnackbar(this, "Setting up drawer", e); |
161 | 161 | } |
162 | 162 |
|
163 | 163 | if (DeviceUtils.isTv(this)) { |
@@ -214,7 +214,7 @@ public void onDrawerClosed(final View drawerView) { |
214 | 214 | /** |
215 | 215 | * Builds the drawer menu for the current service. |
216 | 216 | * |
217 | | - * @throws ExtractionException |
| 217 | + * @throws ExtractionException if the service didn't provide available kiosks |
218 | 218 | */ |
219 | 219 | private void addDrawerMenuForCurrentService() throws ExtractionException { |
220 | 220 | //Tabs |
@@ -266,7 +266,7 @@ private boolean drawerItemSelected(final MenuItem item) { |
266 | 266 | try { |
267 | 267 | tabSelected(item); |
268 | 268 | } catch (final Exception e) { |
269 | | - ErrorActivity.reportUiErrorInSnackbar(this, "Selecting main page tab", e); |
| 269 | + ErrorUtil.showUiErrorSnackbar(this, "Selecting main page tab", e); |
270 | 270 | } |
271 | 271 | break; |
272 | 272 | case R.id.menu_options_about_group: |
@@ -372,7 +372,7 @@ private void toggleServices() { |
372 | 372 | try { |
373 | 373 | addDrawerMenuForCurrentService(); |
374 | 374 | } catch (final Exception e) { |
375 | | - ErrorActivity.reportUiErrorInSnackbar(this, "Showing main page tabs", e); |
| 375 | + ErrorUtil.showUiErrorSnackbar(this, "Showing main page tabs", e); |
376 | 376 | } |
377 | 377 | } |
378 | 378 | } |
@@ -475,7 +475,7 @@ protected void onResume() { |
475 | 475 | drawerHeaderBinding.drawerHeaderActionButton.setContentDescription( |
476 | 476 | getString(R.string.drawer_header_description) + selectedServiceName); |
477 | 477 | } catch (final Exception e) { |
478 | | - ErrorActivity.reportUiErrorInSnackbar(this, "Setting up service toggle", e); |
| 478 | + ErrorUtil.showUiErrorSnackbar(this, "Setting up service toggle", e); |
479 | 479 | } |
480 | 480 |
|
481 | 481 | final SharedPreferences sharedPreferences |
@@ -785,7 +785,7 @@ private void handleIntent(final Intent intent) { |
785 | 785 | NavigationHelper.gotoMainFragment(getSupportFragmentManager()); |
786 | 786 | } |
787 | 787 | } catch (final Exception e) { |
788 | | - ErrorActivity.reportUiErrorInSnackbar(this, "Handling intent", e); |
| 788 | + ErrorUtil.showUiErrorSnackbar(this, "Handling intent", e); |
789 | 789 | } |
790 | 790 | } |
791 | 791 |
|
|
0 commit comments