From 41a0d6fa617ef363a95d212dc02e1f1b2d308148 Mon Sep 17 00:00:00 2001 From: chiteroman <98092901+chiteroman@users.noreply.github.com> Date: Fri, 17 May 2024 15:37:20 +0200 Subject: [PATCH] Remove weird code... Forgot to remove it XD --- .../playintegrityfix/CustomKeyStoreSpi.java | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/app/src/main/java/es/chiteroman/playintegrityfix/CustomKeyStoreSpi.java b/app/src/main/java/es/chiteroman/playintegrityfix/CustomKeyStoreSpi.java index 6ab9c92..f7efa21 100644 --- a/app/src/main/java/es/chiteroman/playintegrityfix/CustomKeyStoreSpi.java +++ b/app/src/main/java/es/chiteroman/playintegrityfix/CustomKeyStoreSpi.java @@ -3,7 +3,6 @@ package es.chiteroman.playintegrityfix; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.lang.reflect.Method; import java.security.Key; import java.security.KeyStoreException; import java.security.KeyStoreSpi; @@ -24,30 +23,10 @@ public final class CustomKeyStoreSpi extends KeyStoreSpi { return keyStoreSpi.engineGetKey(alias, password); } - private static String getProcessName() { - try { - Class activityThread = Class.forName("android.app.ActivityThread"); - - Method method = activityThread.getDeclaredMethod("currentProcessName"); - - method.setAccessible(true); - - return (String) method.invoke(null); - - } catch (Throwable t) { - EntryPoint.LOG(t.toString()); - } - return null; - } - @Override public Certificate[] engineGetCertificateChain(String alias) { - boolean droidGuard = Arrays.stream(Thread.currentThread().getStackTrace()).anyMatch(e -> e.getClassName().toLowerCase(Locale.US).contains("droidguard")); - - String processName = getProcessName(); - - if (processName != null && droidGuard && processName.equals("com.google.android.gms.unstable")) { + if (Arrays.stream(Thread.currentThread().getStackTrace()).anyMatch(e -> e.getClassName().toLowerCase(Locale.US).contains("droidguard"))) { EntryPoint.LOG("DroidGuard call detected. Throw exception!"); throw new UnsupportedOperationException(); }