Fix proguard flags

Removed problematic *ForTest and use NeededForTesting instead.

Change-Id: I61517b6ea30da2461f541ceca19f04f24f8624da
diff --git a/proguard.flags b/proguard.flags
index f4ec4b2..79378e6 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -9,24 +9,10 @@
   public void *(android.view.MenuItem);
 }
 
-# TODO: Instead of keeping the following two functions we could as well just remove them completely
-# as they are only used in test code
-
--keep class com.android.contacts.model.EntityDelta {
-  public com.android.contacts.model.EntityDelta$ValuesDelta getSuperPrimaryEntry(java.lang.String,boolean);
-}
-
--keep class com.android.contacts.model.EntityDelta$ValuesDelta {
-  public android.content.ContentValues getAfter();
-}
-
-# Any methods whose name is '*ForTest' are preserved.
--keep class ** {
-  *** *ForTest(...);
-}
-
 # Any class or method annotated with NeededForTesting.
 -keep @com.android.contacts.test.NeededForTesting class *
 -keepclassmembers class * {
 @com.android.contacts.test.NeededForTesting *;
 }
+
+-verbose
diff --git a/src/com/android/contacts/PhoneCallDetailsHelper.java b/src/com/android/contacts/PhoneCallDetailsHelper.java
index 60dfb7b..fd950fe 100644
--- a/src/com/android/contacts/PhoneCallDetailsHelper.java
+++ b/src/com/android/contacts/PhoneCallDetailsHelper.java
@@ -18,6 +18,7 @@
 
 import com.android.contacts.calllog.CallTypeHelper;
 import com.android.contacts.calllog.PhoneNumberHelper;
+import com.android.contacts.test.NeededForTesting;
 
 import android.content.res.Resources;
 import android.graphics.Typeface;
@@ -141,6 +142,7 @@
         nameView.setText(nameText);
     }
 
+    @NeededForTesting
     public void setCurrentTimeForTest(long currentTimeMillis) {
         mCurrentTimeMillisForTest = currentTimeMillis;
     }
diff --git a/src/com/android/contacts/calllog/CallLogListItemViews.java b/src/com/android/contacts/calllog/CallLogListItemViews.java
index 741d218..503de43 100644
--- a/src/com/android/contacts/calllog/CallLogListItemViews.java
+++ b/src/com/android/contacts/calllog/CallLogListItemViews.java
@@ -18,6 +18,7 @@
 
 import com.android.contacts.PhoneCallDetailsViews;
 import com.android.contacts.R;
+import com.android.contacts.test.NeededForTesting;
 
 import android.content.Context;
 import android.view.View;
@@ -68,6 +69,7 @@
                 view.findViewById(R.id.call_log_divider));
     }
 
+    @NeededForTesting
     public static CallLogListItemViews createForTest(Context context) {
         return new CallLogListItemViews(
                 new QuickContactBadge(context),
diff --git a/src/com/android/contacts/editor/ContactEditorUtils.java b/src/com/android/contacts/editor/ContactEditorUtils.java
index 05a041d..46006a0 100644
--- a/src/com/android/contacts/editor/ContactEditorUtils.java
+++ b/src/com/android/contacts/editor/ContactEditorUtils.java
@@ -19,6 +19,7 @@
 import com.android.contacts.model.AccountType;
 import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.model.AccountWithDataSet;
+import com.android.contacts.test.NeededForTesting;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Sets;
@@ -74,11 +75,13 @@
         return sInstance;
     }
 
+    @NeededForTesting
     void cleanupForTest() {
         mPrefs.edit().remove(KEY_DEFAULT_ACCOUNT).remove(KEY_KNOWN_ACCOUNTS)
                 .remove(KEY_ANYTHING_SAVED).apply();
     }
 
+    @NeededForTesting
     void removeDefaultAccountForTest() {
         mPrefs.edit().remove(KEY_DEFAULT_ACCOUNT).apply();
     }
diff --git a/src/com/android/contacts/model/BaseAccountType.java b/src/com/android/contacts/model/BaseAccountType.java
index ce74148..1e830e2 100644
--- a/src/com/android/contacts/model/BaseAccountType.java
+++ b/src/com/android/contacts/model/BaseAccountType.java
@@ -17,6 +17,7 @@
 package com.android.contacts.model;
 
 import com.android.contacts.R;
+import com.android.contacts.test.NeededForTesting;
 import com.android.contacts.util.DateUtils;
 import com.google.android.collect.Lists;
 import com.google.android.collect.Maps;
@@ -490,6 +491,7 @@
                     + " mColumnName" + mColumnName;
         }
 
+        @NeededForTesting
         public String getColumnNameForTest() {
             return mColumnName;
         }
diff --git a/src/com/android/contacts/model/EntityDelta.java b/src/com/android/contacts/model/EntityDelta.java
index 8244e9c..2cbfa26 100644
--- a/src/com/android/contacts/model/EntityDelta.java
+++ b/src/com/android/contacts/model/EntityDelta.java
@@ -16,6 +16,7 @@
 
 package com.android.contacts.model;
 
+import com.android.contacts.test.NeededForTesting;
 import com.google.android.collect.Lists;
 import com.google.android.collect.Maps;
 import com.google.android.collect.Sets;
@@ -183,6 +184,7 @@
      *     doesn't exist (may be a primary, or just a random item
      * @return
      */
+    @NeededForTesting
     public ValuesDelta getSuperPrimaryEntry(String mimeType, boolean forceSelection) {
         final ArrayList<ValuesDelta> mimeEntries = getMimeEntries(mimeType, false);
         if (mimeEntries == null) return null;
@@ -564,6 +566,7 @@
             return entry;
         }
 
+        @NeededForTesting
         public ContentValues getAfter() {
             return mAfter;
         }
diff --git a/src/com/android/contacts/model/FallbackAccountType.java b/src/com/android/contacts/model/FallbackAccountType.java
index d81f2f5..6ce7a43 100644
--- a/src/com/android/contacts/model/FallbackAccountType.java
+++ b/src/com/android/contacts/model/FallbackAccountType.java
@@ -17,6 +17,7 @@
 package com.android.contacts.model;
 
 import com.android.contacts.R;
+import com.android.contacts.test.NeededForTesting;
 
 import android.content.Context;
 import android.util.Log;
@@ -63,6 +64,7 @@
      * In order to build {@link DataKind}s with the same resource package name,
      * {@code resPackageName} is injectable.
      */
+    @NeededForTesting
     static AccountType createForTest(Context context, String resPackageName) {
         return new FallbackAccountType(context, resPackageName);
     }
diff --git a/src/com/android/contacts/widget/CompositeListAdapter.java b/src/com/android/contacts/widget/CompositeListAdapter.java
index 692e073..610b97f 100644
--- a/src/com/android/contacts/widget/CompositeListAdapter.java
+++ b/src/com/android/contacts/widget/CompositeListAdapter.java
@@ -15,6 +15,7 @@
  */
 package com.android.contacts.widget;
 
+import com.android.contacts.test.NeededForTesting;
 import com.google.common.annotations.VisibleForTesting;
 
 import android.database.DataSetObserver;
@@ -27,7 +28,11 @@
  * A general purpose adapter that is composed of multiple sub-adapters. It just
  * appends them in the order they are added. It listens to changes from all
  * sub-adapters and propagates them to its own listeners.
+ *
+ * This class not used for now -- but let's keep running the test in case we want to revive it...
+ * (So NeededForTesting)
  */
+@NeededForTesting
 public class CompositeListAdapter extends BaseAdapter {
 
     private static final int INITIAL_CAPACITY = 2;