Don't parse 3p recognizer metadata in safe mode

Malicious apps could put large xml recognition service metadata file
that could lead to crash the system. Making sure that we don't parse
such metadata for 3p apps in safe mode as they are not launchable in
safe mode anyway.

Bug: 430284594
Test: manual by verifying device boots in safe mode normally
Flag: EXEMPT CVE_FIX
(cherry picked from commit a81b51b6a6e0b7fd6a417926b6abd8a162110060)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:4e86d79f3aab4c1eb187595cf7b8d6d029b0b690
Merged-In: I52435ca8da633a73fc63e07c6fea3ec9cd8cd986
Change-Id: I52435ca8da633a73fc63e07c6fea3ec9cd8cd986
2 files changed