mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Use JDK 1.7, target Android 5.1.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="7"
|
||||
android:targetSdkVersion="20"
|
||||
android:targetSdkVersion="22"
|
||||
/>
|
||||
|
||||
<uses-feature android:name="android.hardware.bluetooth" />
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-20
|
||||
target=android-22
|
||||
|
||||
@@ -154,10 +154,12 @@ public class CrashReportActivity extends Activity implements OnClickListener {
|
||||
progress.setVisibility(VISIBLE);
|
||||
new AsyncTask<Void, Void, Map<String, String>>() {
|
||||
|
||||
@Override
|
||||
protected Map<String, String> doInBackground(Void... args) {
|
||||
return getStatusMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Map<String, String> result) {
|
||||
Context ctx = CrashReportActivity.this;
|
||||
int pad = LayoutUtils.getPadding(ctx);
|
||||
@@ -179,6 +181,7 @@ public class CrashReportActivity extends Activity implements OnClickListener {
|
||||
|
||||
// FIXME: Load strings from resources if we're keeping this activity
|
||||
@SuppressLint("NewApi")
|
||||
@SuppressWarnings("deprecation")
|
||||
private Map<String, String> getStatusMap() {
|
||||
Map<String, String> statusMap = new LinkedHashMap<String, String>();
|
||||
|
||||
@@ -199,7 +202,17 @@ public class CrashReportActivity extends Activity implements OnClickListener {
|
||||
statusMap.put("Android version:", release + " (" + sdk + ")");
|
||||
|
||||
// CPU architecture
|
||||
statusMap.put("Architecture:", Build.CPU_ABI);
|
||||
String arch = null;
|
||||
if(Build.VERSION.SDK_INT >= 21) {
|
||||
for(String abi : Build.SUPPORTED_ABIS) {
|
||||
if(arch == null) arch = abi;
|
||||
else arch = arch + ", " + abi;
|
||||
}
|
||||
} else {
|
||||
if(Build.CPU_ABI2 == null) arch = Build.CPU_ABI;
|
||||
else arch = Build.CPU_ABI + ", " + Build.CPU_ABI2;
|
||||
}
|
||||
statusMap.put("Architecture:", arch);
|
||||
|
||||
// System memory
|
||||
Object o = getSystemService(ACTIVITY_SERVICE);
|
||||
@@ -392,10 +405,12 @@ public class CrashReportActivity extends Activity implements OnClickListener {
|
||||
private void share() {
|
||||
new AsyncTask<Void, Void, Map<String, String>>() {
|
||||
|
||||
@Override
|
||||
protected Map<String, String> doInBackground(Void... args) {
|
||||
return getStatusMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Map<String, String> result) {
|
||||
try {
|
||||
File shared = Environment.getExternalStorageDirectory();
|
||||
|
||||
@@ -165,10 +165,12 @@ public class TestingActivity extends BriarActivity implements OnClickListener {
|
||||
progress.setVisibility(VISIBLE);
|
||||
new AsyncTask<Void, Void, Map<String, String>>() {
|
||||
|
||||
@Override
|
||||
protected Map<String, String> doInBackground(Void... args) {
|
||||
return getStatusMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Map<String, String> result) {
|
||||
int pad = LayoutUtils.getPadding(TestingActivity.this);
|
||||
for(Entry<String, String> e : result.entrySet()) {
|
||||
@@ -190,6 +192,7 @@ public class TestingActivity extends BriarActivity implements OnClickListener {
|
||||
|
||||
// FIXME: Load strings from resources if we're keeping this activity
|
||||
@SuppressLint("NewApi")
|
||||
@SuppressWarnings("deprecation")
|
||||
private Map<String, String> getStatusMap() {
|
||||
Map<String, String> statusMap = new LinkedHashMap<String, String>();
|
||||
|
||||
@@ -210,7 +213,17 @@ public class TestingActivity extends BriarActivity implements OnClickListener {
|
||||
statusMap.put("Android version:", release + " (" + sdk + ")");
|
||||
|
||||
// CPU architecture
|
||||
statusMap.put("Architecture:", Build.CPU_ABI);
|
||||
String arch = null;
|
||||
if(Build.VERSION.SDK_INT >= 21) {
|
||||
for(String abi : Build.SUPPORTED_ABIS) {
|
||||
if(arch == null) arch = abi;
|
||||
else arch = arch + ", " + abi;
|
||||
}
|
||||
} else {
|
||||
if(Build.CPU_ABI2 == null) arch = Build.CPU_ABI;
|
||||
else arch = Build.CPU_ABI + ", " + Build.CPU_ABI2;
|
||||
}
|
||||
statusMap.put("Architecture:", arch);
|
||||
|
||||
// System memory
|
||||
Object o = getSystemService(ACTIVITY_SERVICE);
|
||||
@@ -452,10 +465,12 @@ public class TestingActivity extends BriarActivity implements OnClickListener {
|
||||
private void share() {
|
||||
new AsyncTask<Void, Void, Map<String, String>>() {
|
||||
|
||||
@Override
|
||||
protected Map<String, String> doInBackground(Void... args) {
|
||||
return getStatusMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Map<String, String> result) {
|
||||
try {
|
||||
File shared = Environment.getExternalStorageDirectory();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package org.briarproject.plugins.tor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -9,6 +11,7 @@ import org.briarproject.api.plugins.duplex.DuplexPluginCallback;
|
||||
import org.briarproject.api.plugins.duplex.DuplexPluginFactory;
|
||||
import org.briarproject.api.system.LocationUtils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
|
||||
@@ -36,9 +39,20 @@ public class TorPluginFactory implements DuplexPluginFactory {
|
||||
return TorPlugin.ID;
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@SuppressWarnings("deprecation")
|
||||
public DuplexPlugin createPlugin(DuplexPluginCallback callback) {
|
||||
// Check that we have a Tor binary for this architecture
|
||||
if(!Build.CPU_ABI.startsWith("armeabi")) {
|
||||
List<String> abis = new ArrayList<String>();
|
||||
if(Build.VERSION.SDK_INT >= 21) {
|
||||
for(String abi : Build.SUPPORTED_ABIS) abis.add(abi);
|
||||
} else {
|
||||
abis.add(Build.CPU_ABI);
|
||||
if(Build.CPU_ABI2 != null) abis.add(Build.CPU_ABI2);
|
||||
}
|
||||
boolean supported = false;
|
||||
for(String abi : abis) if(abi.startsWith("armeabi")) supported = true;
|
||||
if(!supported) {
|
||||
LOG.info("Tor is not supported on this architecture");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="lib" path="libs/guice-3.0-no_aop.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/briar-api"/>
|
||||
<classpathentry kind="lib" path="/briar-api/libs/guice-3.0-no_aop.jar"/>
|
||||
<classpathentry kind="lib" path="libs/lcrypto-jdk15on-151.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="lib" path="/briar-api/libs/javax.inject.jar"/>
|
||||
<classpathentry kind="lib" path="libs/h2small-1.3.170.jar"/>
|
||||
<classpathentry kind="lib" path="libs/weupnp-0.1.3-SNAPSHOT-briar.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
<classpathentry kind="lib" path="libs/jssc-0.9-briar.jar" sourcepath="libs/source/jssc-0.9-briar-source.jar"/>
|
||||
<classpathentry kind="lib" path="libs/jna-4.1.0.jar"/>
|
||||
<classpathentry kind="lib" path="libs/jna-platform-4.1.0.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<classpathentry kind="lib" path="libs/hamcrest-library-1.1.jar"/>
|
||||
<classpathentry kind="lib" path="libs/jmock-2.5.1.jar"/>
|
||||
<classpathentry kind="lib" path="libs/junit-4.9b3.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="lib" path="/briar-core/libs/lcrypto-jdk15on-151.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
Reference in New Issue
Block a user