Don't send data for non-main users

This is a regression caused by ag/26661827

Fix: 333872544
Test: manual
Test: atest PrivateSpaceSafetySourceTest
Change-Id: I0465899af3745fa39eab8806dbceb347d70b0aa3
This commit is contained in:
Manish Singh
2024-04-25 11:37:27 +00:00
parent 30a03c4ee8
commit 50b5bae531
2 changed files with 27 additions and 7 deletions

View File

@@ -56,13 +56,13 @@ public final class PrivateSpaceSafetySource {
Log.i(TAG, "Private Space not allowed for user " + context.getUser());
return;
}
} else {
// Check the profile type - we don't want to show this for anything other than primary
// user.
if (userManager != null && !userManager.isMainUser()) {
Log.i(TAG, "setSafetySourceData not main user");
return;
}
}
// Check the profile type - we don't want to show this for anything other than primary
// user.
if (userManager != null && !userManager.isMainUser()) {
Log.i(TAG, "setSafetySourceData not main user");
return;
}
if (!Flags.allowPrivateProfile()