Merge "Add logs telling us the number of available Accounts."
diff --git a/res/drawable-hdpi/ic_contact_picture_2.png b/res/drawable-hdpi/ic_contact_picture_2.png
deleted file mode 100755
index 5e65276..0000000
--- a/res/drawable-hdpi/ic_contact_picture_2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_contact_picture_3.png b/res/drawable-hdpi/ic_contact_picture_3.png
deleted file mode 100755
index a8ec1e1..0000000
--- a/res/drawable-hdpi/ic_contact_picture_3.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_contact_picture_2.png b/res/drawable-mdpi/ic_contact_picture_2.png
deleted file mode 100644
index 8b184af..0000000
--- a/res/drawable-mdpi/ic_contact_picture_2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_contact_picture_3.png b/res/drawable-mdpi/ic_contact_picture_3.png
deleted file mode 100644
index a2d08b5..0000000
--- a/res/drawable-mdpi/ic_contact_picture_3.png
+++ /dev/null
Binary files differ
diff --git a/src/com/android/contacts/list/ShortcutIntentBuilder.java b/src/com/android/contacts/list/ShortcutIntentBuilder.java
index 7a4f9de..caece67 100644
--- a/src/com/android/contacts/list/ShortcutIntentBuilder.java
+++ b/src/com/android/contacts/list/ShortcutIntentBuilder.java
@@ -34,12 +34,10 @@
import android.net.Uri;
import android.os.AsyncTask;
import android.provider.ContactsContract;
-import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.CommonDataKinds.Photo;
-
-import java.util.Random;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
/**
* Constructs shortcut intents.
@@ -217,13 +215,8 @@
if (bitmapData != null) {
bitmap = BitmapFactory.decodeByteArray(bitmapData, 0, bitmapData.length, null);
} else {
- final int[] fallbacks = {
- R.drawable.ic_contact_picture,
- R.drawable.ic_contact_picture_2,
- R.drawable.ic_contact_picture_3
- };
bitmap = BitmapFactory.decodeResource(mContext.getResources(),
- fallbacks[new Random().nextInt(fallbacks.length)]);
+ R.drawable.ic_contact_picture);
}
Intent shortcutIntent;
diff --git a/src/com/android/contacts/util/ContactBadgeUtil.java b/src/com/android/contacts/util/ContactBadgeUtil.java
index d779701..7f2f844 100644
--- a/src/com/android/contacts/util/ContactBadgeUtil.java
+++ b/src/com/android/contacts/util/ContactBadgeUtil.java
@@ -29,9 +29,8 @@
import android.content.res.Resources.NotFoundException;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import android.os.SystemClock;
-import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.CommonDataKinds.Photo;
+import android.provider.ContactsContract.Data;
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.util.Log;
@@ -143,21 +142,6 @@
}
public static Bitmap loadPlaceholderPhoto(Context context) {
- // Set the photo with a random "no contact" image
- final long now = SystemClock.elapsedRealtime();
- final int num = (int) now & 0xf;
- final int resourceId;
- if (num < 9) {
- // Leaning in from right, common
- resourceId = R.drawable.ic_contact_picture;
- } else if (num < 14) {
- // Leaning in from left uncommon
- resourceId = R.drawable.ic_contact_picture_2;
- } else {
- // Coming in from the top, rare
- resourceId = R.drawable.ic_contact_picture_3;
- }
-
- return BitmapFactory.decodeResource(context.getResources(), resourceId);
+ return BitmapFactory.decodeResource(context.getResources(), R.drawable.ic_contact_picture);
}
}
diff --git a/src/com/android/contacts/views/editor/AggregationSuggestionView.java b/src/com/android/contacts/views/editor/AggregationSuggestionView.java
index 0c35a39..3fcc11b 100644
--- a/src/com/android/contacts/views/editor/AggregationSuggestionView.java
+++ b/src/com/android/contacts/views/editor/AggregationSuggestionView.java
@@ -89,7 +89,7 @@
photo.setImageBitmap(BitmapFactory.decodeByteArray(
suggestion.photo, 0, suggestion.photo.length));
} else {
- photo.setImageResource(R.drawable.ic_contact_picture_2);
+ photo.setImageResource(R.drawable.ic_contact_picture);
}
TextView name = (TextView) findViewById(R.id.aggregation_suggestion_name);