mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 13:49:53 +01:00
Don't try to get Bluetooth address from settings.
This commit is contained in:
@@ -63,10 +63,12 @@ public class AndroidUtils {
|
|||||||
return new Pair<>(address, "adapter");
|
return new Pair<>(address, "adapter");
|
||||||
}
|
}
|
||||||
// Return the address from settings if it's valid and not fake
|
// Return the address from settings if it's valid and not fake
|
||||||
address = Settings.Secure.getString(ctx.getContentResolver(),
|
if (SDK_INT < 33) {
|
||||||
"bluetooth_address");
|
address = Settings.Secure.getString(ctx.getContentResolver(),
|
||||||
if (isValidBluetoothAddress(address)) {
|
"bluetooth_address");
|
||||||
return new Pair<>(address, "settings");
|
if (isValidBluetoothAddress(address)) {
|
||||||
|
return new Pair<>(address, "settings");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Try to get the address via reflection
|
// Try to get the address via reflection
|
||||||
address = getBluetoothAddressByReflection(adapter);
|
address = getBluetoothAddressByReflection(adapter);
|
||||||
|
|||||||
Reference in New Issue
Block a user