Add logs to output intent string for NPE in DbEntry.

Bug: 380555381
Test: No tests, just changed log string.
Flag: EXEMPT bug fix logs
Change-Id: I0b0a36ebce0db38c89afb22a89b7e969fdc16bd9
This commit is contained in:
Stefan Andonian
2024-12-09 13:40:35 -08:00
parent 6f10fb57a4
commit e2c19253b2
+2 -3
View File
@@ -30,7 +30,6 @@ import com.android.launcher3.LauncherSettings.Favorites.SPANX
import com.android.launcher3.LauncherSettings.Favorites.SPANY
import com.android.launcher3.model.data.ItemInfo
import com.android.launcher3.util.ContentWriter
import java.net.URISyntaxException
import java.util.Objects
class DbEntry : ItemInfo(), Comparable<DbEntry> {
@@ -129,8 +128,8 @@ class DbEntry : ItemInfo(), Comparable<DbEntry> {
private fun cleanIntentString(intentStr: String): String {
try {
return Intent.parseUri(intentStr, 0).apply { sourceBounds = null }.toURI()
} catch (e: URISyntaxException) {
Log.e(TAG, "Unable to parse Intent string", e)
} catch (e: Exception) {
Log.e(TAG, "Unable to parse Intent string: $intentStr", e)
return intentStr
}
}