From c73f8533f0af3de3b5880c13a1ae2d019a5fef89 Mon Sep 17 00:00:00 2001 From: Denton Gentry Date: Fri, 18 Aug 2023 20:18:31 -0700 Subject: [PATCH] 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 --- android/build.gradle | 2 +- android/src/main/java/com/tailscale/ipn/App.java | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 257d199..45d1607 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -25,7 +25,7 @@ android { compileSdk 31 defaultConfig { minSdkVersion 22 - targetSdkVersion 31 + targetSdkVersion 33 versionCode 175 versionName "1.47.108-td5ac18d2c-g4b67f47e88f" } diff --git a/android/src/main/java/com/tailscale/ipn/App.java b/android/src/main/java/com/tailscale/ipn/App.java index ed15131..299d354 100644 --- a/android/src/main/java/com/tailscale/ipn/App.java +++ b/android/src/main/java/com/tailscale/ipn/App.java @@ -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; }