mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 05:52:52 +00:00
Only skip panic trigger signature check if running under a test
This commit is contained in:
parent
d1d5df8051
commit
5ce21a94ea
3 changed files with 6 additions and 1 deletions
|
@ -29,6 +29,7 @@ android {
|
|||
multiDexEnabled true
|
||||
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
|
||||
buildConfigField "String", "GIT_BRANCH", "\"${getGitBranch()}\""
|
||||
buildConfigField "java.util.concurrent.atomic.AtomicBoolean", "TEST", "new java.util.concurrent.atomic.AtomicBoolean(false)"
|
||||
|
||||
testInstrumentationRunner "com.beemdevelopment.aegis.AegisTestRunner"
|
||||
testInstrumentationRunnerArguments clearPackageData: 'true'
|
||||
|
|
|
@ -10,6 +10,10 @@ import androidx.test.runner.AndroidJUnitRunner;
|
|||
import com.beemdevelopment.aegis.util.IOUtils;
|
||||
|
||||
public class AegisTestRunner extends AndroidJUnitRunner {
|
||||
static {
|
||||
BuildConfig.TEST.set(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void callApplicationOnCreate(Application app) {
|
||||
Context context = app.getApplicationContext();
|
||||
|
|
|
@ -28,7 +28,7 @@ public class PanicResponderActivity extends AegisActivity {
|
|||
}
|
||||
|
||||
Intent intent;
|
||||
if (!BuildConfig.DEBUG) {
|
||||
if (!BuildConfig.TEST.get()) {
|
||||
TrustedIntents trustedIntents = TrustedIntents.get(this);
|
||||
trustedIntents.addTrustedSigner(GuardianProjectRSA4096.class);
|
||||
trustedIntents.addTrustedSigner(GuardianProjectFDroidRSA2048.class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue