2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 05:37:43 +00:00

Rollback android-device-names to 1.x

Was bumped in f2f1930cecea2cf43814d3cdd1e5715999a432b9 but it was crashing
with "database disk image is malformed" and not returning a human name
This commit is contained in:
Albert Vaca Cintora 2023-03-18 20:39:37 +01:00
parent 5633183d57
commit 3aba448bea
2 changed files with 2 additions and 1 deletions

View File

@ -153,7 +153,7 @@ dependencies {
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.google.android.material:material:1.8.0'
implementation 'com.jakewharton:disklrucache:2.0.2' //For caching album art bitmaps
implementation 'com.jaredrummler:android-device-names:2.1.1' //To get a human-friendly device name
implementation 'com.jaredrummler:android-device-names:1.1.9' //To get a human-friendly device name
implementation 'org.apache.sshd:sshd-core:0.14.0'
implementation 'org.apache.mina:mina-core:2.0.19' //For some reason, makes sshd-core:0.14.0 work without NIO, which isn't available until Android 8 (api 26)

View File

@ -53,6 +53,7 @@ public class DeviceHelper {
// Could use preferences.contains but would need to check for empty String anyway.
String deviceName = preferences.getString(KEY_DEVICE_NAME_PREFERENCE, "");
if (deviceName.isEmpty()) {
//DeviceName.init(context); // Needed in DeviceName 2.x +
if (!fetchingName) {
fetchingName = true;
DeviceHelper.backgroundFetchDeviceName(context); //Starts a background thread that will eventually update the shared pref