Home | History | Annotate | Download | only in model

Lines Matching defs:source

2  * Copyright (C) 2009 The Android Open Source Project
87 // Create fallback contacts source for on-phone contacts
113 for (ContactsSource source : sources) {
114 addSource(source);
118 protected void addSource(ContactsSource source) {
119 mSources.put(source.accountType, source);
120 mKnownPackages.add(source.resPackageName);
146 // Invalidate cache of existing source
149 // Unknown source, so reload from scratch
160 for (ContactsSource source : mSources.values()) {
161 if (TextUtils.equals(packageName, source.resPackageName)) {
163 source.invalidateCache();
170 for (ContactsSource source : mSources.values()) {
171 source.invalidateCache();
207 ContactsSource source;
209 source = new GoogleSource(auth.packageName);
211 source = new ExchangeSource(auth.packageName);
214 Log.d(TAG, "Creating external source for type=" + accountType
216 source = new ExternalSource(auth.packageName);
217 source.readOnly = !sync.supportsUploading();
220 source.accountType = auth.type;
221 source.titleRes = auth.labelId;
222 source.iconRes = auth.iconId;
224 addSource(source);
256 final ContactsSource source = getInflatedSource(account.type,
258 final boolean hasContacts = source != null;
259 final boolean matchesWritable = (!writableOnly || (writableOnly && !source.readOnly));
278 // Try finding source and kind matching request
279 final ContactsSource source = mSources.get(accountType);
280 if (source != null) {
281 source.ensureInflated(context, inflateLevel);
282 kind = source.getKindForMimetype(mimeType);
302 // Try finding specific source, otherwise use fallback
303 ContactsSource source = mSources.get(accountType);
304 if (source == null) source = mFallbackSource;
306 if (source.isInflated(inflateLevel)) {
308 return source;
311 source.ensureInflated(mContext, inflateLevel);
312 return source;