Raised minimum Android version to 2.3 (API 9). #23

This commit is contained in:
akwizgran
2015-12-02 13:20:55 +00:00
parent 7841ae52ca
commit 79d9b4b6af
10 changed files with 71 additions and 111 deletions

View File

@@ -1,25 +1,19 @@
package org.briarproject.system;
import android.os.Build;
import java.io.DataOutputStream;
import java.io.IOException;
import android.annotation.SuppressLint;
import android.os.Build;
class AndroidSeedProvider extends LinuxSeedProvider {
@Override
@SuppressLint("NewApi")
void writeToEntropyPool(DataOutputStream out) throws IOException {
out.writeInt(android.os.Process.myPid());
out.writeInt(android.os.Process.myTid());
out.writeInt(android.os.Process.myUid());
String fingerprint = Build.FINGERPRINT;
if (fingerprint != null) out.writeUTF(fingerprint);
if (Build.VERSION.SDK_INT >= 9) {
String serial = Build.SERIAL;
if (serial != null) out.writeUTF(serial);
}
if (Build.FINGERPRINT != null) out.writeUTF(Build.FINGERPRINT);
if (Build.SERIAL != null) out.writeUTF(Build.SERIAL);
super.writeToEntropyPool(out);
}
}