Skip to content

Commit

Permalink
Update snet
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Dec 19, 2017
1 parent d21264d commit e8dd1b2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def cleanup(args):

if 'java' in args.target:
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'):
if '.apk' in f:
rm(os.path.join('out', f))
Expand Down
4 changes: 2 additions & 2 deletions snet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "27.0.1"
buildToolsVersion "27.0.2"

defaultConfig {
applicationId "com.topjohnwu.snet"
Expand All @@ -26,5 +26,5 @@ repositories {

dependencies {
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 change: 1 addition & 0 deletions snet/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@

-keep class com.topjohnwu.snet.SafetyNet* { *; }
-dontwarn java.lang.invoke**
-dontwarn com.google.android.gms.common.GooglePlayServicesUtil**
4 changes: 2 additions & 2 deletions snet/src/main/java/com/topjohnwu/snet/SafetyNetHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import android.util.Base64;

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.ResultCallback;
import com.google.android.gms.common.api.Status;
Expand Down Expand Up @@ -79,7 +79,7 @@ public void onConnectionFailed(@NonNull ConnectionResult result) {
clazz.getMethod("swapResources", String.class, int.class).invoke(mActivity, dexPath,
isDarkTheme ? android.R.style.Theme_Material : android.R.style.Theme_Material_Light);
try {
GoogleApiAvailability.getInstance().getErrorDialog(mActivity, result.getErrorCode(), 0).show();
GooglePlayServicesUtil.getErrorDialog(result.getErrorCode(), mActivity, 0).show();
} catch (Exception e) {
e.printStackTrace();
}
Expand Down

0 comments on commit e8dd1b2

Please sign in to comment.