Some fixes
This commit is contained in:
parent
1438f58fca
commit
481835bb5c
|
@ -107,6 +107,7 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
|||
|
||||
private ImageButton media_save, media_close;
|
||||
private boolean scheduleHidden, scheduleHiddenDescription;
|
||||
private SimpleExoPlayer player;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
@ -438,7 +439,7 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
|||
ExtractorMediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
|
||||
.createMediaSource(uri);
|
||||
|
||||
SimpleExoPlayer player = ExoPlayerFactory.newSimpleInstance(MediaActivity.this);
|
||||
player = ExoPlayerFactory.newSimpleInstance(MediaActivity.this);
|
||||
videoView.setPlayer(player);
|
||||
loader.setVisibility(View.GONE);
|
||||
player.prepare(videoSource);
|
||||
|
@ -457,7 +458,7 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
|||
ExtractorMediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
|
||||
.createMediaSource(uri);
|
||||
|
||||
SimpleExoPlayer player = ExoPlayerFactory.newSimpleInstance(MediaActivity.this);
|
||||
player = ExoPlayerFactory.newSimpleInstance(MediaActivity.this);
|
||||
videoView.setPlayer(player);
|
||||
loader.setVisibility(View.GONE);
|
||||
player.prepare(videoSource);
|
||||
|
@ -496,10 +497,22 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
|||
loader.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause(){
|
||||
super.onPause();
|
||||
if( player != null) {
|
||||
player.setPlayWhenReady(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(){
|
||||
super.onResume();
|
||||
FullScreencall();
|
||||
if( player != null) {
|
||||
player.setPlayWhenReady(true);
|
||||
}
|
||||
|
||||
}
|
||||
public void FullScreencall() {
|
||||
if(Build.VERSION.SDK_INT < 19) {
|
||||
|
|
|
@ -97,6 +97,7 @@ public class AccountsListAdapter extends RecyclerView.Adapter implements OnPostA
|
|||
|
||||
|
||||
if(MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON) {
|
||||
holder.account_mute_notification.hide();
|
||||
if (action == RetrieveAccountsAsyncTask.Type.BLOCKED)
|
||||
account.setFollowType(Account.followAction.BLOCK);
|
||||
else if (action == RetrieveAccountsAsyncTask.Type.MUTED)
|
||||
|
|
Loading…
Reference in New Issue