[automerger skipped] Merge "[Telephony mainline] Move all METHOD_* constants from SystemContract to BlockedNumberContract" am: ce18139789 am: de94523c11
am: 6347de57fa -s ours
am skip reason: change_id I5c4380f9343fa50f469dc59a54900bbdc6ea3693 with SHA1 62747b128f is in history

Change-Id: I0867ba7b4acbdb4683c937adcdde276536bf5c25
diff --git a/res/values-bn/strings.xml b/res/values-bn/strings.xml
index f0f5ffa..6963473 100644
--- a/res/values-bn/strings.xml
+++ b/res/values-bn/strings.xml
@@ -16,5 +16,5 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="3836152623003881586">"অবরুদ্ধ নম্বরগুলির সঞ্চয়স্থান"</string>
+    <string name="app_label" msgid="3836152623003881586">"ব্লক করা নম্বরগুলির স্টোরেজ"</string>
 </resources>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 85f4998..ec0fdaa 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -16,5 +16,5 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="3836152623003881586">"अवरोधित नंबरों का संग्रहण"</string>
+    <string name="app_label" msgid="3836152623003881586">"ब्लॉक नंबरों की स्टोरेज"</string>
 </resources>
diff --git a/res/values-hy/strings.xml b/res/values-hy/strings.xml
index 374c7c5..2abbb76 100644
--- a/res/values-hy/strings.xml
+++ b/res/values-hy/strings.xml
@@ -16,5 +16,5 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="3836152623003881586">"Արգելափակված համարների պահեստ"</string>
+    <string name="app_label" msgid="3836152623003881586">"Արգելափակված համարների պահոց"</string>
 </resources>
diff --git a/res/values-mr/strings.xml b/res/values-mr/strings.xml
index 23dd405..ee2ced3 100644
--- a/res/values-mr/strings.xml
+++ b/res/values-mr/strings.xml
@@ -16,5 +16,5 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="3836152623003881586">"अवरोधित केलेल्या नंबरचा स्टोरेज"</string>
+    <string name="app_label" msgid="3836152623003881586">"ब्लॉक केलेल्या नंबरचा स्टोरेज"</string>
 </resources>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index 5dea283..0bb1812 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -16,5 +16,5 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="3836152623003881586">"ଅବରୋଧିତ ସଂଖ୍ୟାର ଷ୍ଟୋରେଜ୍"</string>
+    <string name="app_label" msgid="3836152623003881586">"ବ୍ଲକ୍ ହୋଇଥିବା ସଂଖ୍ୟାର ଷ୍ଟୋରେଜ୍"</string>
 </resources>
diff --git a/src/com/android/providers/blockednumber/BlockedNumberProvider.java b/src/com/android/providers/blockednumber/BlockedNumberProvider.java
index c70e1ee..eb3d992 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() {