build.gradle: update targetSdkVersion to 33. (#127)

"bluetooth_name" cannot be accessed after SDK 31, remove it from
getUserConfiguredDeviceName().

Fixes https://github.com/tailscale/tailscale/issues/8955

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
raggi/assert-goroot
Denton Gentry 2 years ago committed by GitHub
parent aba683bb61
commit c73f8533f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,7 +25,7 @@ android {
compileSdk 31
defaultConfig {
minSdkVersion 22
targetSdkVersion 31
targetSdkVersion 33
versionCode 175
versionName "1.47.108-td5ac18d2c-g4b67f47e88f"
}

@ -210,12 +210,7 @@ public class App extends Application {
// get user defined nickname from Settings
// returns null if not available
private String getUserConfiguredDeviceName() {
String nameFromSystemBluetooth = Settings.System.getString(getContentResolver(), "bluetooth_name");
String nameFromSecureBluetooth = Settings.Secure.getString(getContentResolver(), "bluetooth_name");
String nameFromSystemDevice = Settings.Secure.getString(getContentResolver(), "device_name");
if (!isEmpty(nameFromSystemBluetooth)) return nameFromSystemBluetooth;
if (!isEmpty(nameFromSecureBluetooth)) return nameFromSecureBluetooth;
if (!isEmpty(nameFromSystemDevice)) return nameFromSystemDevice;
return null;
}

Loading…
Cancel
Save