mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-21 22:39:12 +00:00
Set FLAG_SECURE on every activity
This commit is contained in:
parent
4cd87b0452
commit
002045c7c7
2 changed files with 9 additions and 0 deletions
|
@ -2,6 +2,7 @@ package me.impy.aegis.ui;
|
|||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import me.impy.aegis.AegisApplication;
|
||||
|
||||
|
@ -13,6 +14,10 @@ public abstract class AegisActivity extends AppCompatActivity {
|
|||
super.onCreate(savedInstanceState);
|
||||
_app = (AegisApplication) getApplication();
|
||||
|
||||
// set FLAG_SECURE on the window of every AegisActivity
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
|
||||
|
||||
// set the theme
|
||||
boolean nightMode = _app.getPreferences().getBoolean("pref_dark_mode", false);
|
||||
setPreferredTheme(nightMode);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.Manifest;
|
|||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.github.paolorotolo.appintro.AppIntro;
|
||||
import com.github.paolorotolo.appintro.AppIntroFragment;
|
||||
|
@ -53,6 +54,9 @@ public class IntroActivity extends AppIntro implements DerivationTask.Callback {
|
|||
super.onCreate(savedInstanceState);
|
||||
_app = (AegisApplication) getApplication();
|
||||
|
||||
// set FLAG_SECURE on the window of every IntroActivity
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
|
||||
|
||||
showSkipButton(false);
|
||||
//showPagerIndicator(false);
|
||||
setGoBackLock(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue