Remove dependencies on gsf-client and google-common.
Use HashMap and HashSet instead of com.google.android.collect.Maps/Sets. Remove dead code.
bug 2425037
diff --git a/Android.mk b/Android.mk
index a9278de..d13fbe0 100644
--- a/Android.mk
+++ b/Android.mk
@@ -20,9 +20,6 @@
LOCAL_SRC_FILES := $(call all-java-files-under,src)
-LOCAL_STATIC_JAVA_LIBRARIES := gsf-client # Google apps only: GSF client libraries
-LOCAL_STATIC_JAVA_LIBRARIES += google-common # Google apps only: shared Google code
-
LOCAL_PACKAGE_NAME := CalendarProvider
include $(BUILD_PACKAGE)
diff --git a/src/com/android/providers/calendar/CalendarProvider2.java b/src/com/android/providers/calendar/CalendarProvider2.java
index 95b8296..fe116ef 100644
--- a/src/com/android/providers/calendar/CalendarProvider2.java
+++ b/src/com/android/providers/calendar/CalendarProvider2.java
@@ -55,14 +55,10 @@
import android.util.Log;
import android.util.TimeFormatException;
import android.util.TimeUtils;
-import com.google.android.collect.Maps;
-import com.google.android.collect.Sets;
-import com.google.wireless.gdata.calendar.client.CalendarClient;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Map;
import java.util.Set;
import java.util.TimeZone;
@@ -235,8 +231,6 @@
private static final int INSTANCES_INDEX_END_MINUTE = 3;
private static final int INSTANCES_INDEX_ALL_DAY = 4;
- private CalendarClient mCalendarClient = null;
-
private AlarmManager mAlarmManager;
private CalendarAppWidgetProvider mAppWidgetProvider = CalendarAppWidgetProvider.getInstance();
@@ -3003,7 +2997,7 @@
sEventsProjectionMap.put(Events._SYNC_ACCOUNT_TYPE,
"_sync_account_type");
- sEventEntitiesProjectionMap = Maps.newHashMap();
+ sEventEntitiesProjectionMap = new HashMap<String, String>();
sEventEntitiesProjectionMap.put(Events.HTML_URI, "htmlUri");
sEventEntitiesProjectionMap.put(Events.TITLE, "title");
sEventEntitiesProjectionMap.put(Events.DESCRIPTION, "description");
@@ -3087,8 +3081,8 @@
mDb = mDbHelper.getWritableDatabase();
if (mDb == null) return;
- Map<Account, Boolean> accountHasCalendar = Maps.newHashMap();
- Set<Account> validAccounts = Sets.newHashSet();
+ HashMap<Account, Boolean> accountHasCalendar = new HashMap<Account, Boolean>();
+ HashSet<Account> validAccounts = new HashSet<Account>();
for (Account account : accounts) {
validAccounts.add(new Account(account.name, account.type));
accountHasCalendar.put(account, false);
@@ -3129,10 +3123,6 @@
} finally {
mDb.endTransaction();
}
-
- if (mCalendarClient == null) {
- return;
- }
}
/* package */ static boolean readBooleanQueryParameter(Uri uri, String name,