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