File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
src/main/java/org/itxtech/daedalus Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ android {
1010 minSdkVersion 15
1111 targetSdkVersion 25
1212 versionCode 2
13- versionName " 1.0.1 "
13+ versionName " 1.1.0 "
1414
1515 buildConfigField " String" , " BUILD_TIME" , " \" ${ System.currentTimeMillis()} \" "
1616 buildConfigField " String" , " GIT_COMMIT" , " \" ${ gitCommit} \" "
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public void onCreate(Bundle savedInstanceState) {
4141 secondaryServer .setEntries (DnsServer .getDnsServerNames (Daedalus .getInstance ()));
4242 secondaryServer .setEntryValues (DnsServer .getDnsServerIds ());
4343
44- if (Build .VERSION .SDK_INT < 21 ) {
44+ if (Build .VERSION .SDK_INT < Build . VERSION_CODES . LOLLIPOP ) {
4545 SwitchPreference countQueryTimes = (SwitchPreference ) findPreference ("settings_count_query_times" );
4646 countQueryTimes .setChecked (false );
4747 countQueryTimes .setEnabled (false );
@@ -69,7 +69,7 @@ public boolean onPreferenceClick(Preference preference) {
6969 @ Override
7070 public void onStart () {
7171 super .onStart ();
72- if (view != null && Build .VERSION .SDK_INT < 21 ) {
72+ if (view != null && Build .VERSION .SDK_INT < Build . VERSION_CODES . LOLLIPOP ) {
7373 Snackbar .make (view , R .string .notice_legacy_api , Snackbar .LENGTH_LONG )
7474 .setAction ("Action" , null ).show ();
7575 }
Original file line number Diff line number Diff line change 11package org .itxtech .daedalus .service ;
22
3+ import android .annotation .TargetApi ;
34import android .app .Notification ;
45import android .app .NotificationManager ;
56import android .app .PendingIntent ;
67import android .content .Context ;
78import android .content .Intent ;
89import android .net .VpnService ;
10+ import android .os .Build ;
911import android .os .ParcelFileDescriptor ;
1012import android .preference .PreferenceManager ;
1113import android .support .v7 .app .NotificationCompat ;
@@ -134,6 +136,7 @@ public void onDestroy() {
134136 stopThread ();
135137 }
136138
139+ @ TargetApi (Build .VERSION_CODES .LOLLIPOP )
137140 private void stopThread () {
138141 try {
139142 if (this .descriptor != null ) {
@@ -167,6 +170,7 @@ public void onRevoke() {
167170 stopThread ();
168171 }
169172
173+ @ TargetApi (Build .VERSION_CODES .LOLLIPOP )
170174 @ Override
171175 public void run () {
172176 try {
You can’t perform that action at this time.
0 commit comments