Commit 3d9ec24a authored by sisbell's avatar sisbell Committed by Georg Koppen
Browse files

Bug 31981: Remove require-api.patch

parent d430f8ea
......@@ -14,7 +14,6 @@ mkdir -p /var/tmp/build $output_dir
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]
patch -p1 < $rootdir/require-api.patch
patch -p1 < $rootdir/remove-native-build.patch
patch -p1 < $rootdir/disable-daemon.patch
patch -p1 < $rootdir/maven-local.patch
......
......@@ -28,7 +28,6 @@ input_files:
exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
- project: tor-onion-proxy-library
name: topl
- filename: require-api.patch
- filename: remove-native-build.patch
- filename: disable-daemon.patch
- filename: maven-local.patch
diff --git a/service/src/main/java/org/torproject/android/service/TorService.java b/service/src/main/java/org/torproject/android/service/TorService.java
index d280a29..beb2b02 100644
--- a/service/src/main/java/org/torproject/android/service/TorService.java
+++ b/service/src/main/java/org/torproject/android/service/TorService.java
@@ -12,7 +12,10 @@ import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
import android.os.IBinder;
-import android.support.annotation.RequiresApi;
+// Not available in 23.4.0
+// https://developer.android.com/reference/android/support/annotation/RequiresApi
+//import android.support.annotation.RequiresApi;
+import android.annotation.TargetApi;
import android.text.TextUtils;
import android.util.Log;
import com.msopentech.thali.android.toronionproxy.AndroidOnionProxyManager;
@@ -93,7 +96,10 @@ public final class TorService extends Service implements TorServiceConstants, Or
startService(intentVpn);
}
- @RequiresApi(api = Build.VERSION_CODES.O)
+ // Use TargetApi until we use a support library version that adds the
+ // RequriesApi annotation
+ //@RequiresApi(api = Build.VERSION_CODES.O)
+ @TargetApi(value = Build.VERSION_CODES.O)
private void createNotificationChannel(String appName, String appDescription) {
int importance = NotificationManager.IMPORTANCE_LOW;
NotificationChannel mChannel = new NotificationChannel(NOTIFICATION_CHANNEL_ID, appName,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment