Undoing whitespace changes in APIManager.

This commit is contained in:
ojiikun 2013-04-01 23:51:44 +00:00
parent 89470e6476
commit 097339dbe7

View file

@ -489,7 +489,6 @@ public class APIManager {
contentResolver.bulkInsert(FeedProvider.FEEDS_URI, feedValues.toArray(new ContentValues[feedValues.size()]));
}
// go thru all the old feeds. if any are not in the update, delete them from the DB
for (String olderFeedId : existingFeeds.keySet()) {
if (feedUpdate.feeds.get(olderFeedId) == null) {
Uri feedUri = FeedProvider.FEEDS_URI.buildUpon().appendPath(olderFeedId).build();
@ -514,18 +513,15 @@ public class APIManager {
}
folderCursor.close();
// for all folders found just now
for (final Entry<String, List<Long>> entry : feedUpdate.folders.entrySet()) {
if (!TextUtils.isEmpty(entry.getKey())) {
String folderName = entry.getKey().trim();
// if the folder is new, write it to the DB
if (!existingFolders.contains(folderName) && !TextUtils.isEmpty(folderName)) {
final ContentValues folderValues = new ContentValues();
folderValues.put(DatabaseConstants.FOLDER_NAME, folderName);
contentResolver.insert(FeedProvider.FOLDERS_URI, folderValues);
}
// for each feed in the folder, if it didn't exist before this update, write a feed/folder mapping to the DB
for (Long feedId : entry.getValue()) {
if (!existingFeeds.containsKey(Long.toString(feedId))) {
ContentValues values = new ContentValues();
@ -536,7 +532,6 @@ public class APIManager {
}
}
}
}
return true;
}