Update snet
This commit is contained in:
parent
d21264d01b
commit
e8dd1b292f
2
app
2
app
@ -1 +1 @@
|
|||||||
Subproject commit a1871e4bc3b11fa5e17275527f87b18ce7a475b7
|
Subproject commit 91337218b314c853ad441aa38947394a68afcb08
|
2
build.py
2
build.py
@ -392,7 +392,7 @@ def cleanup(args):
|
|||||||
|
|
||||||
if 'java' in args.target:
|
if 'java' in args.target:
|
||||||
header('* Cleaning java')
|
header('* Cleaning java')
|
||||||
subprocess.run('{} clean'.format(os.path.join('.', 'gradlew')), shell=True)
|
subprocess.run('{} app:clean snet:clean crypto:clean'.format(os.path.join('.', 'gradlew')), shell=True)
|
||||||
for f in os.listdir('out'):
|
for f in os.listdir('out'):
|
||||||
if '.apk' in f:
|
if '.apk' in f:
|
||||||
rm(os.path.join('out', f))
|
rm(os.path.join('out', f))
|
||||||
|
@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 27
|
||||||
buildToolsVersion "27.0.1"
|
buildToolsVersion "27.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.topjohnwu.snet"
|
applicationId "com.topjohnwu.snet"
|
||||||
@ -26,5 +26,5 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
implementation 'com.google.android.gms:play-services-safetynet:11.6.0'
|
implementation 'com.google.android.gms:play-services-safetynet:7.0.0' /* The oldest version */
|
||||||
}
|
}
|
||||||
|
1
snet/proguard-rules.pro
vendored
1
snet/proguard-rules.pro
vendored
@ -22,3 +22,4 @@
|
|||||||
|
|
||||||
-keep class com.topjohnwu.snet.SafetyNet* { *; }
|
-keep class com.topjohnwu.snet.SafetyNet* { *; }
|
||||||
-dontwarn java.lang.invoke**
|
-dontwarn java.lang.invoke**
|
||||||
|
-dontwarn com.google.android.gms.common.GooglePlayServicesUtil**
|
||||||
|
@ -8,7 +8,7 @@ import android.support.annotation.Nullable;
|
|||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
|
|
||||||
import com.google.android.gms.common.ConnectionResult;
|
import com.google.android.gms.common.ConnectionResult;
|
||||||
import com.google.android.gms.common.GoogleApiAvailability;
|
import com.google.android.gms.common.GooglePlayServicesUtil;
|
||||||
import com.google.android.gms.common.api.GoogleApiClient;
|
import com.google.android.gms.common.api.GoogleApiClient;
|
||||||
import com.google.android.gms.common.api.ResultCallback;
|
import com.google.android.gms.common.api.ResultCallback;
|
||||||
import com.google.android.gms.common.api.Status;
|
import com.google.android.gms.common.api.Status;
|
||||||
@ -79,7 +79,7 @@ public class SafetyNetHelper
|
|||||||
clazz.getMethod("swapResources", String.class, int.class).invoke(mActivity, dexPath,
|
clazz.getMethod("swapResources", String.class, int.class).invoke(mActivity, dexPath,
|
||||||
isDarkTheme ? android.R.style.Theme_Material : android.R.style.Theme_Material_Light);
|
isDarkTheme ? android.R.style.Theme_Material : android.R.style.Theme_Material_Light);
|
||||||
try {
|
try {
|
||||||
GoogleApiAvailability.getInstance().getErrorDialog(mActivity, result.getErrorCode(), 0).show();
|
GooglePlayServicesUtil.getErrorDialog(result.getErrorCode(), mActivity, 0).show();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user