Home | History | Annotate | Download | only in content

Lines Matching defs:authority

178      * the given account/authority pair. One required initialization step is to
1531 String authority = uri.getAuthority();
1533 if (TextUtils.isEmpty(authority)) {
1534 throw new FileNotFoundException("No authority: " + uri);
1537 r = mContext.getPackageManager().getResourcesForApplication(authority);
1539 throw new FileNotFoundException("No package found for authority: " + uri);
1555 id = r.getIdentifier(path.get(1), path.get(0), authority);
1608 * @param authority the authority of the ContentProvider to which this batch should be applied
1616 public @NonNull ContentProviderResult[] applyBatch(@NonNull String authority,
1619 Preconditions.checkNotNull(authority, "authority");
1621 ContentProviderClient provider = acquireContentProviderClient(authority);
1623 throw new IllegalArgumentException("Unknown authority " + authority);
1865 * with the authority of name, starting the provider if necessary. Returns
1872 * with the authority of name or null if there isn't one.
2027 * using the sync adapter that's registered for the authority of the
2061 * using the sync adapter that's registered for the authority of the
2266 * @param authority which authority should be synced
2269 public static void requestSync(Account account, String authority, Bundle extras) {
2270 requestSyncAsUser(account, authority, UserHandle.myUserId(), extras);
2277 public static void requestSyncAsUser(Account account, String authority, @UserIdInt int userId,
2284 .setSyncAdapter(account, authority)
2356 * Cancel any active or pending syncs that match account and authority. The account and
2357 * authority can each independently be set to null, which means that syncs with any account
2358 * or authority, respectively, will match.
2361 * @param authority filters the syncs that match by this authority
2363 public static void cancelSync(Account account, String authority) {
2365 getContentService().cancelSync(account, authority, null);
2375 public static void cancelSyncAsUser(Account account, String authority, @UserIdInt int userId) {
2377 getContentService().cancelSyncAsUser(account, authority, null, userId);
2409 * Returns the package names of syncadapters that match a given user and authority.
2412 public static String[] getSyncAdapterPackagesForAuthorityAsUser(String authority,
2415 return getContentService().getSyncAdapterPackagesForAuthorityAsUser(authority, userId);
2427 * @param authority the provider whose setting we are querying
2430 public static boolean getSyncAutomatically(Account account, String authority) {
2432 return getContentService().getSyncAutomatically(account, authority);
2442 public static boolean getSyncAutomaticallyAsUser(Account account, String authority,
2445 return getContentService().getSyncAutomaticallyAsUser(account, authority, userId);
2457 * @param authority the provider whose behavior is being controlled
2460 public static void setSyncAutomatically(Account account, String authority, boolean sync) {
2461 setSyncAutomaticallyAsUser(account, authority, sync, UserHandle.myUserId());
2468 public static void setSyncAutomaticallyAsUser(Account account, String authority, boolean sync,
2471 getContentService().setSyncAutomaticallyAsUser(account, authority, sync, userId);
2478 * Specifies that a sync should be requested with the specified the account, authority,
2480 * with the account, authority and extras then a new periodic sync won't be added, instead
2502 * @param authority the provider to specify in the sync request
2510 public static void addPeriodicSync(Account account, String authority, Bundle extras,
2517 getContentService().addPeriodicSync(account, authority, extras, pollFrequency);
2544 * Remove a periodic sync. Has no affect if account, authority and extras don't match
2550 * @param authority the provider of the periodic sync to remove
2553 public static void removePeriodicSync(Account account, String authority, Bundle extras) {
2556 getContentService().removePeriodicSync(account, authority, extras);
2587 * Get the list of information about the periodic syncs for the given account and authority.
2592 * @param authority the provider whose periodic syncs we are querying
2595 public static List<PeriodicSync> getPeriodicSyncs(Account account, String authority) {
2597 return getContentService().getPeriodicSyncs(account, authority, null);
2609 public static int getIsSyncable(Account account, String authority) {
2611 authority);
2621 public static int getIsSyncableAsUser(Account account, String authority,
2624 return getContentService().getIsSyncableAsUser(account, authority, userId);
2636 public static void setIsSyncable(Account account, String authority, int syncable) {
2638 getContentService().setIsSyncable(account, authority, syncable);
2697 * Returns true if there is currently a sync operation for the given account or authority
2702 * @param authority the provider whose behavior is being queried
2703 * @return true if a sync is active for the given account or authority.
2705 public static boolean isSyncActive(Account account, String authority) {
2709 if (authority == null) {
2710 throw new IllegalArgumentException("authority must not be null");
2714 return getContentService().isSyncActive(account, authority, null);
2776 * Returns the status that matches the authority.
2778 * @param authority the provider whose behavior is being queried
2779 * @return the SyncStatusInfo for the authority, or null if none exists
2782 public static SyncStatusInfo getSyncStatus(Account account, String authority) {
2784 return getContentService().getSyncStatus(account, authority, null);
2794 public static SyncStatusInfo getSyncStatusAsUser(Account account, String authority,
2797 return getContentService().getSyncStatusAsUser(account, authority, null, userId);
2808 * @param authority the provider whose behavior is being queried
2809 * @return true if there is a pending sync with the matching account and authority
2811 public static boolean isSyncPending(Account account, String authority) {
2812 return isSyncPendingAsUser(account, authority, UserHandle.myUserId());
2819 public static boolean isSyncPendingAsUser(Account account, String authority,
2822 return getContentService().isSyncPendingAsUser(account, authority, null, userId);