mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
24 lines
637 B
Java
24 lines
637 B
Java
package org.briarproject.system;
|
|
|
|
import java.io.DataOutputStream;
|
|
import java.io.IOException;
|
|
|
|
import android.os.Build;
|
|
|
|
class AndroidSeedProvider extends LinuxSeedProvider {
|
|
|
|
@Override
|
|
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);
|
|
}
|
|
super.writeToEntropyPool(out);
|
|
}
|
|
}
|