Avoiding NullPointer Exception for user properties in CPID update

Bug: 258376391
Test: Manually tested
Change-Id: I5bb5032b764478be1b1f93104824834640ff0a90
This commit is contained in:
Sarup Dalwani
2023-01-13 06:31:30 +00:00
parent 4fd0475191
commit 9fef1626e2

View File

@@ -54,7 +54,8 @@ public class CrossProfileIntentFilterHelper {
UserProperties currentUserProperties = mUserManagerInternal
.getUserProperties(userInfo.id);
if (currentUserProperties.getUpdateCrossProfileIntentFiltersOnOTA()) {
if (currentUserProperties != null
&& currentUserProperties.getUpdateCrossProfileIntentFiltersOnOTA()) {
int parentUserId = mUserManagerInternal.getProfileParentId(userInfo.id);
if (parentUserId != userInfo.id) {
clearCrossProfileIntentFilters(userInfo.id,