File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -345,10 +345,10 @@ public static final class Preferences {
345345 * directory provider URIs by themselves. This level of indirection allows
346346 * Contacts Provider to implement additional system-level features and
347347 * optimizations. Access to Contacts Provider is protected by the
348- * READ_CONTACTS permission, but access to the directory provider is not.
349- * Therefore directory providers must reject requests coming from clients
350- * other than the Contacts Provider itself. An easy way to prevent such
351- * unauthorized access is to check the name of the calling package :
348+ * READ_CONTACTS permission, but access to the directory provider is protected by
349+ * BIND_DIRECTORY_SEARCH. This permission was introduced at the API level 17, for previous
350+ * platform versions the provider should perform the following check to make sure the call
351+ * is coming from the ContactsProvider :
352352 * <pre>
353353 * private boolean isCallerAllowed() {
354354 * PackageManager pm = getContext().getPackageManager();
Original file line number Diff line number Diff line change 278278 android : label =" @string/permlab_writeContacts"
279279 android : description =" @string/permdesc_writeContacts" />
280280
281+ <!-- Allows an application to execute contacts directory search.
282+ This should only be used by ContactsProvider. -->
283+ <!-- @hide -->
284+ <permission android : name =" android.permission.BIND_DIRECTORY_SEARCH"
285+ android : permissionGroup =" android.permission-group.PERSONAL_INFO"
286+ android : protectionLevel =" signature" />
287+
281288 <!-- Allows an application to read the user's call log. -->
282289 <permission android : name =" android.permission.READ_CALL_LOG"
283290 android : permissionGroup =" android.permission-group.PERSONAL_INFO"
You can’t perform that action at this time.
0 commit comments