mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix issue #904 - Avoid sleep mode for media activity
This commit is contained in:
parent
0daee80325
commit
958e4f6aa5
1 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,7 @@ import android.view.MotionEvent;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -103,6 +104,7 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
|
|||
getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
ActivityCompat.postponeEnterTransition(MediaActivity.this);
|
||||
binding = ActivityMediaPagerBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
|
Loading…
Reference in a new issue