mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	Fix regression: Unable to find explicit activity class
See https://github.com/TeamNewPipe/NewPipe/issues/3114#issuecomment-589940878 for info on this crash.
This reverts ef90493c27 partly.
			
			
This commit is contained in:
		| @@ -55,7 +55,13 @@ public final class BackgroundPlayerActivity extends ServicePlayerActivity { | ||||
|                 return true; | ||||
|             } | ||||
|  | ||||
|             return switchTo(PopupVideoPlayer.class); | ||||
|             this.player.setRecovery(); | ||||
|             getApplicationContext().sendBroadcast(getPlayerShutdownIntent()); | ||||
|             getApplicationContext().startService( | ||||
|                 getSwitchIntent(PopupVideoPlayer.class) | ||||
|                     .putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying()) | ||||
|             ); | ||||
|             return true; | ||||
|         } | ||||
|         return false; | ||||
|     } | ||||
|   | ||||
| @@ -48,7 +48,13 @@ public final class PopupVideoPlayerActivity extends ServicePlayerActivity { | ||||
|     @Override | ||||
|     public boolean onPlayerOptionSelected(MenuItem item) { | ||||
|         if (item.getItemId() == R.id.action_switch_background) { | ||||
|             return switchTo(BackgroundPlayer.class); | ||||
|             this.player.setRecovery(); | ||||
|             getApplicationContext().sendBroadcast(getPlayerShutdownIntent()); | ||||
|             getApplicationContext().startService( | ||||
|                 getSwitchIntent(BackgroundPlayer.class) | ||||
|                     .putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying()) | ||||
|             ); | ||||
|             return true; | ||||
|         } | ||||
|         return false; | ||||
|     } | ||||
|   | ||||
| @@ -166,7 +166,13 @@ public abstract class ServicePlayerActivity extends AppCompatActivity | ||||
|                 startActivity(new Intent(Settings.ACTION_SOUND_SETTINGS)); | ||||
|                 return true; | ||||
|             case R.id.action_switch_main: | ||||
|                 return switchTo(MainVideoPlayer.class); | ||||
|                 this.player.setRecovery(); | ||||
|                 getApplicationContext().sendBroadcast(getPlayerShutdownIntent()); | ||||
|                 getApplicationContext().startActivity( | ||||
|                     getSwitchIntent(MainVideoPlayer.class) | ||||
|                         .putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying()) | ||||
|                 ); | ||||
|                 return true; | ||||
|         } | ||||
|         return onPlayerOptionSelected(item) || super.onOptionsItemSelected(item); | ||||
|     } | ||||
| @@ -193,13 +199,6 @@ public abstract class ServicePlayerActivity extends AppCompatActivity | ||||
|                 .putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying()); | ||||
|     } | ||||
|  | ||||
|     protected boolean switchTo(final Class clazz) { | ||||
|         this.player.setRecovery(); | ||||
|         getApplicationContext().sendBroadcast(getPlayerShutdownIntent()); | ||||
|         getApplicationContext().startActivity(getSwitchIntent(clazz)); | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     //////////////////////////////////////////////////////////////////////////// | ||||
|     // Service Connection | ||||
|     //////////////////////////////////////////////////////////////////////////// | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 TobiGr
					TobiGr