mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 20:29:52 +01:00
Whitespace-only code formatting changes.
This commit is contained in:
@@ -14,7 +14,7 @@ public class AndroidFileUtils implements FileUtils {
|
||||
@SuppressLint("NewApi")
|
||||
@SuppressWarnings("deprecation")
|
||||
public long getTotalSpace(File f) throws IOException {
|
||||
if(Build.VERSION.SDK_INT >= 9) return f.getTotalSpace();
|
||||
if (Build.VERSION.SDK_INT >= 9) return f.getTotalSpace();
|
||||
StatFs s = new StatFs(f.getAbsolutePath());
|
||||
// These deprecated methods are the best thing available for SDK < 9
|
||||
return (long) s.getBlockCount() * s.getBlockSize();
|
||||
@@ -23,7 +23,7 @@ public class AndroidFileUtils implements FileUtils {
|
||||
@SuppressLint("NewApi")
|
||||
@SuppressWarnings("deprecation")
|
||||
public long getFreeSpace(File f) throws IOException {
|
||||
if(Build.VERSION.SDK_INT >= 9) return f.getUsableSpace();
|
||||
if (Build.VERSION.SDK_INT >= 9) return f.getUsableSpace();
|
||||
StatFs s = new StatFs(f.getAbsolutePath());
|
||||
// These deprecated methods are the best thing available for SDK < 9
|
||||
return (long) s.getAvailableBlocks() * s.getBlockSize();
|
||||
|
||||
@@ -47,14 +47,14 @@ class AndroidLocationUtils implements LocationUtils {
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getCurrentCountry() {
|
||||
String countryCode = getCountryFromPhoneNetwork();
|
||||
if(!TextUtils.isEmpty(countryCode)) return countryCode.toUpperCase();
|
||||
if (!TextUtils.isEmpty(countryCode)) return countryCode.toUpperCase();
|
||||
// Disabled because it involves a network call; requires
|
||||
// ACCESS_FINE_LOCATION
|
||||
// countryCode = getCountryFromLocation();
|
||||
// if(!TextUtils.isEmpty(countryCode)) return countryCode;
|
||||
// if (!TextUtils.isEmpty(countryCode)) return countryCode;
|
||||
LOG.info("Falling back to SIM card country");
|
||||
countryCode = getCountryFromSimCard();
|
||||
if(!TextUtils.isEmpty(countryCode)) return countryCode.toUpperCase();
|
||||
if (!TextUtils.isEmpty(countryCode)) return countryCode.toUpperCase();
|
||||
LOG.info("Falling back to user-defined locale");
|
||||
return Locale.getDefault().getCountry();
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ class AndroidSeedProvider extends LinuxSeedProvider {
|
||||
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) {
|
||||
if (fingerprint != null) out.writeUTF(fingerprint);
|
||||
if (Build.VERSION.SDK_INT >= 9) {
|
||||
String serial = Build.SERIAL;
|
||||
if(serial != null) out.writeUTF(serial);
|
||||
if (serial != null) out.writeUTF(serial);
|
||||
}
|
||||
super.writeToEntropyPool(out);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user