Snap for 5811156 from 91496cee6827b9bafcb8ea0e3416ac9c415efa98 to rvc-release
Change-Id: I5775c4978a497513c6d9722cf17c052c1a5ff200
diff --git a/src/com/android/providers/blockednumber/BlockedNumberProvider.java b/src/com/android/providers/blockednumber/BlockedNumberProvider.java
index 2e029d8..c0f4737 100644
--- a/src/com/android/providers/blockednumber/BlockedNumberProvider.java
+++ b/src/com/android/providers/blockednumber/BlockedNumberProvider.java
@@ -39,6 +39,7 @@
import android.os.CancellationSignal;
import android.os.PersistableBundle;
import android.os.Process;
+import android.os.UserHandle;
import android.os.UserManager;
import android.provider.BlockedNumberContract;
import android.provider.BlockedNumberContract.SystemContract;
@@ -451,8 +452,7 @@
}
private boolean canCurrentUserBlockUsers() {
- UserManager userManager = getContext().getSystemService(UserManager.class);
- return userManager.isPrimaryUser();
+ return getContext().getUserId() == UserHandle.USER_SYSTEM;
}
private void notifyEmergencyContact() {