Log failed app deserialization

This commit is contained in:
MM20 2024-05-04 12:57:43 +02:00
parent 5734fc791c
commit 9f6cda964d
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -5,6 +5,7 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.content.pm.LauncherApps import android.content.pm.LauncherApps
import android.os.UserManager import android.os.UserManager
import android.util.Log
import androidx.core.content.getSystemService import androidx.core.content.getSystemService
import de.mm20.launcher2.search.SavableSearchable import de.mm20.launcher2.search.SavableSearchable
import de.mm20.launcher2.search.SearchableDeserializer import de.mm20.launcher2.search.SearchableDeserializer
@ -40,6 +41,7 @@ class LauncherAppDeserializer(val context: Context) : SearchableDeserializer {
val launcherActivityInfo = launcherApps.resolveActivity(intent, user) ?: return null val launcherActivityInfo = launcherApps.resolveActivity(intent, user) ?: return null
return LauncherApp(context, launcherActivityInfo) return LauncherApp(context, launcherActivityInfo)
} catch (e: SecurityException) { } catch (e: SecurityException) {
Log.e("MM20", "Failed to deserialize app: $serialized", e)
return null return null
} }
} }