Skip to content

Commit

Permalink
Fix user profile behavior
Browse files Browse the repository at this point in the history
User profile was not read at the time the SafetyNet request is done
because getProfileResId() was returning 0 in that case.

We need to check profile resources id only when user profile is not
selected.
  • Loading branch information
jonathanklee authored and mar-v-in committed Oct 2, 2023
1 parent 367096e commit 10e72fa
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ object ProfileManager {
private fun getProfileData(context: Context, profile: String, realData: Map<String, String>): Map<String, String> {
try {
if (profile in listOf(PROFILE_REAL, PROFILE_NATIVE)) return realData
val profileResId = getProfileResId(context, profile)
if (profileResId == 0) return realData
if (profile != PROFILE_USER && getProfileResId(context, profile) == 0) return realData
val resultData = mutableMapOf<String, String>()
resultData.putAll(realData)
val parser = getProfileXml(context, profile)
Expand Down

0 comments on commit 10e72fa

Please sign in to comment.