add flag FLAG_SHOW_WHEN_LOCKED

This commit is contained in:
ligi 2014-07-11 20:54:20 +02:00
parent 8ab96918ca
commit dd0daafee8
2 changed files with 14 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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);
}
}