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

Commit 6c2e4602 authored by Pinyao Ting's avatar Pinyao Ting
Browse files

Fix NPE in getShortcutIconDrawable

Bug: 301007443
Test: manual
Change-Id: I6f42d921fbdde4a33eae66e15325ac399ed7d52e
parent bf02452e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;
        }
    }