Released v1.1.0

This commit is contained in:
PeratX 2017-04-10 21:17:11 +08:00
parent 80b23b70d5
commit e41c17fb84
3 changed files with 7 additions and 3 deletions

View File

@ -10,7 +10,7 @@ android {
minSdkVersion 15
targetSdkVersion 25
versionCode 2
versionName "1.0.1"
versionName "1.1.0"
buildConfigField "String", "BUILD_TIME", "\"${System.currentTimeMillis()}\""
buildConfigField "String", "GIT_COMMIT", "\"${gitCommit}\""

View File

@ -41,7 +41,7 @@ public class SettingsFragment extends PreferenceFragment {
secondaryServer.setEntries(DnsServer.getDnsServerNames(Daedalus.getInstance()));
secondaryServer.setEntryValues(DnsServer.getDnsServerIds());
if (Build.VERSION.SDK_INT < 21) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
SwitchPreference countQueryTimes = (SwitchPreference) findPreference("settings_count_query_times");
countQueryTimes.setChecked(false);
countQueryTimes.setEnabled(false);
@ -69,7 +69,7 @@ public class SettingsFragment extends PreferenceFragment {
@Override
public void onStart() {
super.onStart();
if (view != null && Build.VERSION.SDK_INT < 21) {
if (view != null && Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
Snackbar.make(view, R.string.notice_legacy_api, Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}

View File

@ -1,11 +1,13 @@
package org.itxtech.daedalus.service;
import android.annotation.TargetApi;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.net.VpnService;
import android.os.Build;
import android.os.ParcelFileDescriptor;
import android.preference.PreferenceManager;
import android.support.v7.app.NotificationCompat;
@ -134,6 +136,7 @@ public class DaedalusVpnService extends VpnService implements Runnable {
stopThread();
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void stopThread() {
try {
if (this.descriptor != null) {
@ -167,6 +170,7 @@ public class DaedalusVpnService extends VpnService implements Runnable {
stopThread();
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void run() {
try {