- Cursor descendentsInConflict = getContentResolver().query(
- ProviderTableMeta.CONTENT_URI_FILE,
- new String[]{ProviderTableMeta._ID},
- where,
- new String[]{mAccount.name, parentPath + "%"},
- null
- );
+ Cursor descendentsInConflict = null;
+ if (getContentResolver() != null) {
+ descendentsInConflict = getContentResolver().query(
+ ProviderTableMeta.CONTENT_URI_FILE,
+ new String[]{ProviderTableMeta._ID},
+ whereForDescencentsInConflict,
+ new String[]{mAccount.name, parentPath + "%"},
+ null
+ );
+ } else {
+ try {
+ descendentsInConflict = getContentProviderClient().query(
+ ProviderTableMeta.CONTENT_URI_FILE,
+ new String[]{ProviderTableMeta._ID},
+ whereForDescencentsInConflict,
+ new String[]{mAccount.name, parentPath + "%"},
+ null
+ );
+ } catch (RemoteException e) {
+ Log_OC.e(TAG, "Failed querying for descendents in conflict " + e.getMessage());
+ }
+ }