Upgrade compileSdkVersion

This commit is contained in:
Thomas 2020-12-07 09:43:38 +01:00
parent 62467a3fe1
commit 18c19ace49
3 changed files with 25 additions and 14 deletions

View File

@ -1,12 +1,12 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "org.eu.exodus_privacy.exodusprivacy"
minSdkVersion 17
targetSdkVersion 29
targetSdkVersion 30
versionCode 10
versionName "2.1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@ -34,10 +34,10 @@ dependencies {
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation 'com.google.android.material:material:1.1.0'
testImplementation 'junit:junit:4.13'
implementation 'com.google.android.material:material:1.2.1'
testImplementation 'junit:junit:4.13.1'
}

View File

@ -44,6 +44,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@ -93,7 +94,7 @@ public class NetworkManager {
UNKNOWN
}
private class NetworkProcessingThread extends Thread {
private static class NetworkProcessingThread extends Thread {
private final String apiUrl = "https://reports.exodus-privacy.eu.org/api/";
private final List<Message> messageQueue;
private final Semaphore sem;
@ -116,6 +117,7 @@ public class NetworkManager {
try {
sem.acquire();
Message mes = messageQueue.remove(0);
//noinspection SwitchStatementWithTooFewBranches
switch (mes.type) {
case GET_REPORTS:
getTrackers(mes);
@ -338,12 +340,18 @@ public class NetworkManager {
try {
report.updateDate = Calendar.getInstance();
report.updateDate.setTimeZone(TimeZone.getTimeZone("UTC"));
report.updateDate.setTime(dateFormat.parse(object.getString("updated_at")));
Date date = dateFormat.parse(object.getString("updated_at"));
if (date != null) {
report.updateDate.setTime(date);
}
report.updateDate.set(Calendar.MILLISECOND, 0);
report.creationDate = Calendar.getInstance();
report.creationDate.setTimeZone(TimeZone.getTimeZone("UTC"));
report.creationDate.setTime(dateFormat.parse(object.getString("creation_date")));
date = dateFormat.parse(object.getString("creation_date"));
if (date != null) {
report.creationDate.setTime(date);
}
report.creationDate.set(Calendar.MILLISECOND, 0);
} catch (ParseException e) {
e.printStackTrace();
@ -367,7 +375,10 @@ public class NetworkManager {
try {
tracker.creationDate = Calendar.getInstance();
tracker.creationDate.setTimeZone(TimeZone.getTimeZone("UTC"));
tracker.creationDate.setTime(dateFormat.parse(object.getString("creation_date")));
Date date = dateFormat.parse(object.getString("creation_date"));
if (date != null) {
tracker.creationDate.setTime(date);
}
} catch (ParseException e) {
e.printStackTrace();
}
@ -410,7 +421,7 @@ public class NetworkManager {
}
}
private class Message {
private static class Message {
Message_Type type = Message_Type.UNKNOWN;
Bundle args = new Bundle();
NetworkListener listener;

View File

@ -1,6 +1,6 @@
#Mon Dec 07 08:49:24 CET 2020
#Mon Dec 07 09:33:34 CET 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip