Skip to content

Commit 8057334

Browse files
committed
Merge pull request #74 from RoadXY/alpha-development
Update to latest build tools
2 parents 9ea23c2 + 45d7900 commit 8057334

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

libs/MemorizingTrustManager/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ buildscript {
1010

1111
apply plugin: 'com.android.library'
1212

13+
dependencies {
14+
compile "com.android.support:support-v4:23.0.+"
15+
}
16+
1317
android {
14-
compileSdkVersion 22
15-
buildToolsVersion "22.0.1"
18+
compileSdkVersion 23
19+
buildToolsVersion "23.0.2"
1620
//noinspection GroovyAssignabilityCheck
1721
defaultConfig {
1822
minSdkVersion 7
@@ -32,5 +36,4 @@ android {
3236
assets.srcDirs = ['assets']
3337
}
3438
}
35-
36-
}
39+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ':example'
1+
include ':example'

libs/MemorizingTrustManager/src/de/duenndns/ssl/MemorizingTrustManager.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import android.content.Intent;
3737
import android.net.Uri;
3838
import android.os.Handler;
39+
import android.support.v4.app.NotificationCompat;
3940
import android.util.SparseArray;
4041

4142
import java.io.File;
@@ -442,7 +443,7 @@ public void checkClientTrusted(X509Certificate[] chain, String authType)
442443
public void checkServerTrusted(X509Certificate[] chain, String authType)
443444
throws CertificateException
444445
{
445-
checkCertTrusted(chain, authType, true,true);
446+
checkCertTrusted(chain, authType, true, true);
446447
}
447448

448449
public X509Certificate[] getAcceptedIssuers()
@@ -558,19 +559,16 @@ private String hostNameMessage(X509Certificate cert, String hostname) {
558559
return si.toString();
559560
}
560561

561-
// We can use Notification.Builder once MTM's minSDK is >= 11
562-
@SuppressWarnings("deprecation")
563562
void startActivityNotification(Intent intent, int decisionId, String certName) {
564-
Notification n = new Notification(android.R.drawable.ic_lock_lock,
565-
master.getString(R.string.mtm_notification),
566-
System.currentTimeMillis());
567563
PendingIntent call = PendingIntent.getActivity(master, 0, intent, 0);
568-
n.setLatestEventInfo(master.getApplicationContext(),
569-
master.getString(R.string.mtm_notification),
570-
certName, call);
571-
n.flags |= Notification.FLAG_AUTO_CANCEL;
572-
573-
notificationManager.notify(NOTIFICATION_ID + decisionId, n);
564+
NotificationCompat.Builder builder = new NotificationCompat.Builder(getUI());
565+
builder.setSmallIcon(android.R.drawable.ic_lock_lock)
566+
.setContentTitle(master.getString(R.string.mtm_notification))
567+
.setContentText(certName)
568+
.setAutoCancel(true).setWhen(System.currentTimeMillis())
569+
.setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_VIBRATE | Notification.DEFAULT_SOUND)
570+
.setContentIntent(call);
571+
notificationManager.notify(NOTIFICATION_ID + decisionId, builder.build());
574572
}
575573

576574
/**

wear/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
33

44
android {
55
compileSdkVersion 23
6-
buildToolsVersion "23.0.1"
6+
buildToolsVersion "23.0.2"
77
publishNonDefault true
88

99
defaultConfig {
@@ -40,8 +40,8 @@ android {
4040
dependencies {
4141
compile fileTree(dir: 'libs', include: ['*.jar'])
4242
compile 'com.google.android.support:wearable:1.3.0'
43-
compile 'com.google.android.gms:play-services-wearable:8.3.0'
44-
compile 'com.android.support:recyclerview-v7:23.1.0'
43+
compile 'com.google.android.gms:play-services-wearable:8.4.0'
44+
compile 'com.android.support:recyclerview-v7:23.1.1'
4545
compile 'com.google.code.gson:gson:1.7.2'
4646
compile 'com.squareup.picasso:picasso:2.5.2'
4747
}

0 commit comments

Comments
 (0)