Loading proguard.flags +13 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,14 @@ } -keep class com.android.contacts.common.** { *;} # For test: -keep class com.android.contacts.commonbind.analytics.AnalyticsUtil { *;} -keep class com.android.contacts.interactions.** { *;} -keep class com.google.common.base.Objects { *;} -keep class com.google.common.base.Preconditions { *;} -keep class com.google.common.collect.Lists { *;} -keep class com.google.common.collect.Maps { *;} -keep class com.google.common.collect.Sets { *;} # Any class or method annotated with NeededForTesting or NeededForReflection. -keep @com.android.contacts.common.testing.NeededForTesting class * Loading @@ -18,5 +26,10 @@ @com.android.contacts.common.testing.NeededForTesting *; @com.android.contacts.test.NeededForReflection *; } # Keep classes and methods that have the guava @VisibleForTesting annotation -keep @com.google.common.annotations.VisibleForTesting class * -keepclassmembers class * { @com.google.common.annotations.VisibleForTesting *; } -verbose src/com/android/contacts/ContactsApplication.java +2 −0 Original line number Diff line number Diff line Loading @@ -33,8 +33,10 @@ import com.android.contacts.common.testing.InjectedServices; import com.android.contacts.common.util.Constants; import com.android.contacts.commonbind.analytics.AnalyticsUtil; import com.android.contacts.common.testing.NeededForTesting; import com.google.common.annotations.VisibleForTesting; @NeededForTesting public class ContactsApplication extends Application { private static final boolean ENABLE_LOADER_LOG = false; // Don't submit with true private static final boolean ENABLE_FRAGMENT_LOG = false; // Don't submit with true Loading src/com/android/contacts/editor/ContactEditorUtils.java +3 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import java.util.Set; /** * Utility methods for the "account changed" notification in the new contact creation flow. */ @NeededForTesting public class ContactEditorUtils { private static final String TAG = "ContactEditorUtils"; Loading Loading @@ -119,6 +120,7 @@ public class ContactEditorUtils { * @param defaultAccount the account used to save a newly created contact. Or pass {@code null} * If the user selected "local only". */ @NeededForTesting public void saveDefaultAndAllAccounts(AccountWithDataSet defaultAccount) { final SharedPreferences.Editor editor = mPrefs.edit() .putBoolean(mAnythingSavedKey, true); Loading Loading @@ -210,6 +212,7 @@ public class ContactEditorUtils { * {@link #getDefaultAccount} will return a valid account. (Either an account which still * exists, or {@code null} which should be interpreted as "local only".) */ @NeededForTesting public boolean shouldShowAccountChangedNotification() { if (isFirstLaunch()) { return true; Loading src/com/android/contacts/editor/EditorUiUtils.java +6 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ import com.android.contacts.common.model.ValuesDelta; import com.android.contacts.common.model.account.AccountType; import com.android.contacts.common.model.account.GoogleAccountType; import com.android.contacts.common.model.dataitem.DataKind; import com.android.contacts.common.testing.NeededForTesting; import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette; import com.android.contacts.util.ContactPhotoUtils; import com.android.contacts.widget.QuickContactImageView; Loading @@ -64,6 +65,7 @@ import java.util.HashMap; /** * Utility methods for creating contact editor. */ @NeededForTesting public class EditorUiUtils { // Maps DataKind.mimeType to editor view layouts. Loading Loading @@ -114,6 +116,7 @@ public class EditorUiUtils { /** * Returns the account name and account type labels to display for local accounts. */ @NeededForTesting public static Pair<String,String> getLocalAccountInfo(Context context, String accountName, AccountType accountType) { if (TextUtils.isEmpty(accountName)) { Loading @@ -130,6 +133,7 @@ public class EditorUiUtils { /** * Returns the account name and account type labels to display for the given account type. */ @NeededForTesting public static Pair<String,String> getAccountInfo(Context context, String accountName, AccountType accountType) { CharSequence accountTypeDisplayLabel = accountType.getDisplayLabel(context); Loading Loading @@ -213,6 +217,7 @@ public class EditorUiUtils { /** * Returns a ringtone string based on the ringtone URI and version #. */ @NeededForTesting public static String getRingtoneStringFromUri(Uri pickedUri, int currentVersion) { if (isNewerThanM(currentVersion)) { if (pickedUri == null) return ""; // silent ringtone Loading @@ -225,6 +230,7 @@ public class EditorUiUtils { /** * Returns a ringtone URI, based on the string and version #. */ @NeededForTesting public static Uri getRingtoneUriFromString(String str, int currentVersion) { if (str != null) { if (isNewerThanM(currentVersion) && TextUtils.isEmpty(str)) return null; Loading Loading
proguard.flags +13 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,14 @@ } -keep class com.android.contacts.common.** { *;} # For test: -keep class com.android.contacts.commonbind.analytics.AnalyticsUtil { *;} -keep class com.android.contacts.interactions.** { *;} -keep class com.google.common.base.Objects { *;} -keep class com.google.common.base.Preconditions { *;} -keep class com.google.common.collect.Lists { *;} -keep class com.google.common.collect.Maps { *;} -keep class com.google.common.collect.Sets { *;} # Any class or method annotated with NeededForTesting or NeededForReflection. -keep @com.android.contacts.common.testing.NeededForTesting class * Loading @@ -18,5 +26,10 @@ @com.android.contacts.common.testing.NeededForTesting *; @com.android.contacts.test.NeededForReflection *; } # Keep classes and methods that have the guava @VisibleForTesting annotation -keep @com.google.common.annotations.VisibleForTesting class * -keepclassmembers class * { @com.google.common.annotations.VisibleForTesting *; } -verbose
src/com/android/contacts/ContactsApplication.java +2 −0 Original line number Diff line number Diff line Loading @@ -33,8 +33,10 @@ import com.android.contacts.common.testing.InjectedServices; import com.android.contacts.common.util.Constants; import com.android.contacts.commonbind.analytics.AnalyticsUtil; import com.android.contacts.common.testing.NeededForTesting; import com.google.common.annotations.VisibleForTesting; @NeededForTesting public class ContactsApplication extends Application { private static final boolean ENABLE_LOADER_LOG = false; // Don't submit with true private static final boolean ENABLE_FRAGMENT_LOG = false; // Don't submit with true Loading
src/com/android/contacts/editor/ContactEditorUtils.java +3 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import java.util.Set; /** * Utility methods for the "account changed" notification in the new contact creation flow. */ @NeededForTesting public class ContactEditorUtils { private static final String TAG = "ContactEditorUtils"; Loading Loading @@ -119,6 +120,7 @@ public class ContactEditorUtils { * @param defaultAccount the account used to save a newly created contact. Or pass {@code null} * If the user selected "local only". */ @NeededForTesting public void saveDefaultAndAllAccounts(AccountWithDataSet defaultAccount) { final SharedPreferences.Editor editor = mPrefs.edit() .putBoolean(mAnythingSavedKey, true); Loading Loading @@ -210,6 +212,7 @@ public class ContactEditorUtils { * {@link #getDefaultAccount} will return a valid account. (Either an account which still * exists, or {@code null} which should be interpreted as "local only".) */ @NeededForTesting public boolean shouldShowAccountChangedNotification() { if (isFirstLaunch()) { return true; Loading
src/com/android/contacts/editor/EditorUiUtils.java +6 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ import com.android.contacts.common.model.ValuesDelta; import com.android.contacts.common.model.account.AccountType; import com.android.contacts.common.model.account.GoogleAccountType; import com.android.contacts.common.model.dataitem.DataKind; import com.android.contacts.common.testing.NeededForTesting; import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette; import com.android.contacts.util.ContactPhotoUtils; import com.android.contacts.widget.QuickContactImageView; Loading @@ -64,6 +65,7 @@ import java.util.HashMap; /** * Utility methods for creating contact editor. */ @NeededForTesting public class EditorUiUtils { // Maps DataKind.mimeType to editor view layouts. Loading Loading @@ -114,6 +116,7 @@ public class EditorUiUtils { /** * Returns the account name and account type labels to display for local accounts. */ @NeededForTesting public static Pair<String,String> getLocalAccountInfo(Context context, String accountName, AccountType accountType) { if (TextUtils.isEmpty(accountName)) { Loading @@ -130,6 +133,7 @@ public class EditorUiUtils { /** * Returns the account name and account type labels to display for the given account type. */ @NeededForTesting public static Pair<String,String> getAccountInfo(Context context, String accountName, AccountType accountType) { CharSequence accountTypeDisplayLabel = accountType.getDisplayLabel(context); Loading Loading @@ -213,6 +217,7 @@ public class EditorUiUtils { /** * Returns a ringtone string based on the ringtone URI and version #. */ @NeededForTesting public static String getRingtoneStringFromUri(Uri pickedUri, int currentVersion) { if (isNewerThanM(currentVersion)) { if (pickedUri == null) return ""; // silent ringtone Loading @@ -225,6 +230,7 @@ public class EditorUiUtils { /** * Returns a ringtone URI, based on the string and version #. */ @NeededForTesting public static Uri getRingtoneUriFromString(String str, int currentVersion) { if (str != null) { if (isNewerThanM(currentVersion) && TextUtils.isEmpty(str)) return null; Loading