diff --git a/src/main/java/org/ligi/passandroid/ui/FullscreenBarcodeActivity.java b/src/main/java/org/ligi/passandroid/ui/FullscreenBarcodeActivity.java index d0181d40..d0f7abd9 100644 --- a/src/main/java/org/ligi/passandroid/ui/FullscreenBarcodeActivity.java +++ b/src/main/java/org/ligi/passandroid/ui/FullscreenBarcodeActivity.java @@ -4,6 +4,7 @@ import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.os.Bundle; import android.view.Menu; +import android.view.WindowManager; import android.widget.ImageView; import com.google.zxing.BarcodeFormat; @@ -72,4 +73,9 @@ public class FullscreenBarcodeActivity extends TicketViewActivityBase { } } + @Override + public void onAttachedToWindow() { + getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); + } + } diff --git a/src/main/java/org/ligi/passandroid/ui/TicketViewActivity.java b/src/main/java/org/ligi/passandroid/ui/TicketViewActivity.java index c95e67a2..a639d42e 100644 --- a/src/main/java/org/ligi/passandroid/ui/TicketViewActivity.java +++ b/src/main/java/org/ligi/passandroid/ui/TicketViewActivity.java @@ -11,6 +11,7 @@ import android.text.util.Linkify; import android.view.Menu; import android.view.MenuItem; import android.view.View; +import android.view.WindowManager; import android.widget.ImageView; import android.widget.TextView; @@ -156,4 +157,11 @@ public class TicketViewActivity extends TicketViewActivityBase { return super.onOptionsItemSelected(item); } + + + @Override + public void onAttachedToWindow() { + getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); + } + }