kopia lustrzana https://github.com/TeamNewPipe/NewPipe
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.
pull/3043/head^2
v0.18.4
rodzic
5b98d41637
commit
0bc769b971
|
@ -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);
|
||||
}
|
||||
|
@ -190,14 +196,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||
false,
|
||||
false
|
||||
).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.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;
|
||||
.putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Ładowanie…
Reference in New Issue