diff options
| author | 2023-09-22 21:39:44 +0000 | |
|---|---|---|
| committer | 2023-09-22 21:39:44 +0000 | |
| commit | d058fd1646511ce44de82f05b2382d44aa26319a (patch) | |
| tree | ba083e32e288cef84ea08f6d3704e7a620159ada | |
| parent | 72cb2856eb909636d4c1e87d5136e9acdbcf17f1 (diff) | |
| parent | 6c2e46027808f117b6d25587773c5581e4e9670d (diff) | |
Merge "Fix NPE in getShortcutIconDrawable" into main
| -rw-r--r-- | core/java/android/content/pm/LauncherApps.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java index 3165e292166b..dbaa4c93d71c 100644 --- a/core/java/android/content/pm/LauncherApps.java +++ b/core/java/android/content/pm/LauncherApps.java @@ -75,7 +75,6 @@ import com.android.internal.annotations.VisibleForTesting; import com.android.internal.infra.AndroidFuture; import com.android.internal.util.function.pooled.PooledLambda; -import java.io.FileNotFoundException; import java.io.IOException; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -1424,8 +1423,8 @@ public class LauncherApps { } try { return mContext.getContentResolver().openFileDescriptor(Uri.parse(uri), "r"); - } catch (FileNotFoundException e) { - Log.e(TAG, "Icon file not found: " + uri); + } catch (Exception e) { + Log.e(TAG, "Failed to open icon file: " + uri, e); return null; } } |