Commit 1d442543 authored by Hanwen Cheng's avatar Hanwen Cheng Committed by Thibaut Sardan
Browse files

fix: enable screenshot in dev mode (#300)

parent 41ef1040
Pipeline #45346 failed with stage
in 13 seconds
......@@ -143,9 +143,13 @@ android {
}
buildTypes {
release {
applicationIdSuffix "release"
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
debug {
applicationIdSuffix "dev"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
......
......@@ -22,8 +22,11 @@ public class MainActivity extends ReactActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,
WindowManager.LayoutParams.FLAG_SECURE);
if (!BuildConfig.DEBUG) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,
WindowManager.LayoutParams.FLAG_SECURE);
}
}
@Override
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment