Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1171004b authored by hughchen's avatar hughchen
Browse files

Show default bluetooth device icon

Show default bluetooth device icon if
cannot get permission of icon uri.

Bug: 143537702
Test: make -j42 RunSettingsLibRoboTests
Change-Id: I96c52a0b102e7a72f85e84dadee78139aca4754c
parent ff671494
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ public class BluetoothUtils {
                    context.getContentResolver().takePersistableUriPermission(iconUri,
                            Intent.FLAG_GRANT_READ_URI_PERMISSION);
                } catch (SecurityException e) {
                    Log.e(TAG, "Failed to take persistable permission for: " + iconUri);
                    Log.e(TAG, "Failed to take persistable permission for: " + iconUri, e);
                }
                try {
                    final Bitmap bitmap = MediaStore.Images.Media.getBitmap(
@@ -165,6 +165,8 @@ public class BluetoothUtils {
                    }
                } catch (IOException e) {
                    Log.e(TAG, "Failed to get drawable for: " + iconUri, e);
                } catch (SecurityException e) {
                    Log.e(TAG, "Failed to get permission for: " + iconUri, e);
                }
            }
        }