Loading res/values/strings.xml +6 −1 Original line number Diff line number Diff line Loading @@ -1189,6 +1189,11 @@ <string name="title_contacts_show_pic">Show contact pictures</string> <string name="title_contacts_show_dial_button">Show dial button</string> <string name="summary_contacts_show_dial_button">Show a dial button for contacts with numbers</string> <string name="title_contacts_show_count">Show contacts count</string> <string name="summary_contacts_show_count">Contacts count will be shown at the top of the contacts list</string> <string name="title_contacts_show_separators">Show alphabetical separators</string> <string name="summaryon_contacts_show_separators">Alphabetical separators will be shown in the contacts list</string> <string name="summaryoff_contacts_show_separators">Alphabetical separators will be hidden in the contacts list</string> <!-- Preferences: Contacts - View Contact --> <string name="title_view_contact">View contact</string> Loading @@ -1214,7 +1219,7 @@ <string name="title_about_name">Mod Name</string> <string name="summary_about_name">WyContacts Eclair</string> <string name="title_about_version">Version</string> <string name="summary_about_version">0.8</string> <string name="summary_about_version">0.9</string> <string name="title_about_credits">Credits</string> <string name="summary_about_credits">ChainsDD, geesun, niuchl, rac2030 and the rest of XDA! :)</string> Loading res/xml/contacts_preferences.xml +25 −5 Original line number Diff line number Diff line Loading @@ -92,6 +92,17 @@ </PreferenceScreen> </PreferenceCategory> <PreferenceCategory android:title="@string/recentCallsIconLabel"> <!-- <CheckBoxPreference android:key="cl_show_dial_button" android:title="@string/title_contacts_show_dial_button" android:summary="@string/summary_contacts_show_dial_button" android:defaultValue="true" /> <CheckBoxPreference android:key="cl_show_pic" android:title="@string/title_contacts_show_pic" android:defaultValue="true" /> --> <CheckBoxPreference android:key="cl_exact_time" android:title="@string/title_cl_exact_time" Loading @@ -118,12 +129,23 @@ android:title="@string/title_contacts_show_dial_button" android:summary="@string/summary_contacts_show_dial_button" android:defaultValue="true" /> <!-- <CheckBoxPreference android:key="contacts_show_pic" android:title="@string/title_contacts_show_pic" android:defaultValue="true" /> <!-- <CheckBoxPreference android:key="contacts_show_count" android:title="@string/title_contacts_show_count" android:summary="@string/summary_contacts_show_count" android:defaultValue="true" /> --> <CheckBoxPreference android:key="contacts_show_alphabetical_separators" android:title="@string/title_contacts_show_separators" android:summaryOn="@string/summaryon_contacts_show_separators" android:summaryOff="@string/summaryoff_contacts_show_separators" android:defaultValue="true" /> <PreferenceScreen android:key="view_contact" android:title="@string/title_view_contact" Loading @@ -141,12 +163,10 @@ android:key="favs_show_dial_button" android:title="@string/title_contacts_show_dial_button" android:defaultValue="true" /> <!-- <CheckBoxPreference android:key="favs_show_pic" android:title="@string/title_contacts_show_pic" android:defaultValue="true" /> --> <CheckBoxPreference android:key="favourites_hide_freq_called" android:title="@string/title_favourites_hide_freq_call" Loading src/com/android/contacts/ContactsListActivity.java +76 −3 Original line number Diff line number Diff line Loading @@ -499,6 +499,7 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC private static boolean showContactsPic; private static boolean showFavsDialButton; private static boolean showFavsPic; private static boolean showDisplayHeaders; private MenuItem mClearFreqCalled; static { Loading Loading @@ -1064,6 +1065,7 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC showContactsPic = ePrefs.getBoolean("contacts_show_pic", true); showFavsDialButton = ePrefs.getBoolean("favs_show_dial_button", true); showFavsPic = ePrefs.getBoolean("favs_show_pic", true); showDisplayHeaders = ePrefs.getBoolean("contacts_show_alphabetical_separators", true); registerProviderStatusObserver(); mPhotoLoader.resume(); Loading Loading @@ -2906,6 +2908,68 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC if ((mMode & MODE_MASK_SHOW_PHOTOS) == MODE_MASK_SHOW_PHOTOS) { mDisplayPhotos = true; setViewResource(R.layout.contacts_list_item_photo); mBitmapCache = new HashMap<Long, SoftReference<Bitmap>>(); mItemsMissingImages = new HashSet<ImageView>(); } if (mMode == MODE_STREQUENT || mMode == MODE_FREQUENT) { mDisplaySectionHeaders = false; } } private class ImageFetchHandler extends Handler { @Override public void handleMessage(Message message) { if (ContactsListActivity.this.isFinishing()) { return; } switch(message.what) { case FETCH_IMAGE_MSG: { final ImageView imageView = (ImageView) message.obj; if (imageView == null) { break; } final PhotoInfo info = (PhotoInfo)imageView.getTag(); if (info == null) { break; } final long photoId = info.photoId; if (photoId == 0) { break; } SoftReference<Bitmap> photoRef = mBitmapCache.get(photoId); if (photoRef == null) { break; } Bitmap photo = photoRef.get(); if (photo == null) { mBitmapCache.remove(photoId); break; } // Make sure the photoId on this image view has not changed // while we were loading the image. synchronized (imageView) { final PhotoInfo updatedInfo = (PhotoInfo)imageView.getTag(); long currentPhotoId = updatedInfo.photoId; if (currentPhotoId == photoId) { imageView.setImageBitmap(photo); mItemsMissingImages.remove(imageView); } } break; } } } public void clearImageFecthing() { removeMessages(FETCH_IMAGE_MSG); } } Loading Loading @@ -3048,6 +3112,12 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC v = convertView; } bindView(v, mContext, cursor); //Wysie if (mContacts) { mDisplaySectionHeaders = showDisplayHeaders; } bindSectionHeader(v, realPosition, mDisplaySectionHeaders && !showingSuggestion); return v; } Loading Loading @@ -3192,15 +3262,12 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC else { mDisplayCallButton = false; } /* if ((mContacts && showContactsPic) || (mFavs && showFavsPic)) { mDisplayPhotos = true; } else { mDisplayPhotos = false; } */ } // Make the call button visible if requested. Loading Loading @@ -3235,6 +3302,12 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC final int position = cursor.getPosition(); mPhotoLoader.loadPhoto(viewToUse, photoId); } else { if (cache.photoView != null) cache.photoView.setVisibility(View.GONE); if (cache.nonQuickContactPhotoView != null) cache.nonQuickContactPhotoView.setVisibility(View.GONE); } if ((mMode & MODE_MASK_NO_PRESENCE) == 0) { // Set the proper icon (star or presence or nothing) Loading Loading
res/values/strings.xml +6 −1 Original line number Diff line number Diff line Loading @@ -1189,6 +1189,11 @@ <string name="title_contacts_show_pic">Show contact pictures</string> <string name="title_contacts_show_dial_button">Show dial button</string> <string name="summary_contacts_show_dial_button">Show a dial button for contacts with numbers</string> <string name="title_contacts_show_count">Show contacts count</string> <string name="summary_contacts_show_count">Contacts count will be shown at the top of the contacts list</string> <string name="title_contacts_show_separators">Show alphabetical separators</string> <string name="summaryon_contacts_show_separators">Alphabetical separators will be shown in the contacts list</string> <string name="summaryoff_contacts_show_separators">Alphabetical separators will be hidden in the contacts list</string> <!-- Preferences: Contacts - View Contact --> <string name="title_view_contact">View contact</string> Loading @@ -1214,7 +1219,7 @@ <string name="title_about_name">Mod Name</string> <string name="summary_about_name">WyContacts Eclair</string> <string name="title_about_version">Version</string> <string name="summary_about_version">0.8</string> <string name="summary_about_version">0.9</string> <string name="title_about_credits">Credits</string> <string name="summary_about_credits">ChainsDD, geesun, niuchl, rac2030 and the rest of XDA! :)</string> Loading
res/xml/contacts_preferences.xml +25 −5 Original line number Diff line number Diff line Loading @@ -92,6 +92,17 @@ </PreferenceScreen> </PreferenceCategory> <PreferenceCategory android:title="@string/recentCallsIconLabel"> <!-- <CheckBoxPreference android:key="cl_show_dial_button" android:title="@string/title_contacts_show_dial_button" android:summary="@string/summary_contacts_show_dial_button" android:defaultValue="true" /> <CheckBoxPreference android:key="cl_show_pic" android:title="@string/title_contacts_show_pic" android:defaultValue="true" /> --> <CheckBoxPreference android:key="cl_exact_time" android:title="@string/title_cl_exact_time" Loading @@ -118,12 +129,23 @@ android:title="@string/title_contacts_show_dial_button" android:summary="@string/summary_contacts_show_dial_button" android:defaultValue="true" /> <!-- <CheckBoxPreference android:key="contacts_show_pic" android:title="@string/title_contacts_show_pic" android:defaultValue="true" /> <!-- <CheckBoxPreference android:key="contacts_show_count" android:title="@string/title_contacts_show_count" android:summary="@string/summary_contacts_show_count" android:defaultValue="true" /> --> <CheckBoxPreference android:key="contacts_show_alphabetical_separators" android:title="@string/title_contacts_show_separators" android:summaryOn="@string/summaryon_contacts_show_separators" android:summaryOff="@string/summaryoff_contacts_show_separators" android:defaultValue="true" /> <PreferenceScreen android:key="view_contact" android:title="@string/title_view_contact" Loading @@ -141,12 +163,10 @@ android:key="favs_show_dial_button" android:title="@string/title_contacts_show_dial_button" android:defaultValue="true" /> <!-- <CheckBoxPreference android:key="favs_show_pic" android:title="@string/title_contacts_show_pic" android:defaultValue="true" /> --> <CheckBoxPreference android:key="favourites_hide_freq_called" android:title="@string/title_favourites_hide_freq_call" Loading
src/com/android/contacts/ContactsListActivity.java +76 −3 Original line number Diff line number Diff line Loading @@ -499,6 +499,7 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC private static boolean showContactsPic; private static boolean showFavsDialButton; private static boolean showFavsPic; private static boolean showDisplayHeaders; private MenuItem mClearFreqCalled; static { Loading Loading @@ -1064,6 +1065,7 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC showContactsPic = ePrefs.getBoolean("contacts_show_pic", true); showFavsDialButton = ePrefs.getBoolean("favs_show_dial_button", true); showFavsPic = ePrefs.getBoolean("favs_show_pic", true); showDisplayHeaders = ePrefs.getBoolean("contacts_show_alphabetical_separators", true); registerProviderStatusObserver(); mPhotoLoader.resume(); Loading Loading @@ -2906,6 +2908,68 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC if ((mMode & MODE_MASK_SHOW_PHOTOS) == MODE_MASK_SHOW_PHOTOS) { mDisplayPhotos = true; setViewResource(R.layout.contacts_list_item_photo); mBitmapCache = new HashMap<Long, SoftReference<Bitmap>>(); mItemsMissingImages = new HashSet<ImageView>(); } if (mMode == MODE_STREQUENT || mMode == MODE_FREQUENT) { mDisplaySectionHeaders = false; } } private class ImageFetchHandler extends Handler { @Override public void handleMessage(Message message) { if (ContactsListActivity.this.isFinishing()) { return; } switch(message.what) { case FETCH_IMAGE_MSG: { final ImageView imageView = (ImageView) message.obj; if (imageView == null) { break; } final PhotoInfo info = (PhotoInfo)imageView.getTag(); if (info == null) { break; } final long photoId = info.photoId; if (photoId == 0) { break; } SoftReference<Bitmap> photoRef = mBitmapCache.get(photoId); if (photoRef == null) { break; } Bitmap photo = photoRef.get(); if (photo == null) { mBitmapCache.remove(photoId); break; } // Make sure the photoId on this image view has not changed // while we were loading the image. synchronized (imageView) { final PhotoInfo updatedInfo = (PhotoInfo)imageView.getTag(); long currentPhotoId = updatedInfo.photoId; if (currentPhotoId == photoId) { imageView.setImageBitmap(photo); mItemsMissingImages.remove(imageView); } } break; } } } public void clearImageFecthing() { removeMessages(FETCH_IMAGE_MSG); } } Loading Loading @@ -3048,6 +3112,12 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC v = convertView; } bindView(v, mContext, cursor); //Wysie if (mContacts) { mDisplaySectionHeaders = showDisplayHeaders; } bindSectionHeader(v, realPosition, mDisplaySectionHeaders && !showingSuggestion); return v; } Loading Loading @@ -3192,15 +3262,12 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC else { mDisplayCallButton = false; } /* if ((mContacts && showContactsPic) || (mFavs && showFavsPic)) { mDisplayPhotos = true; } else { mDisplayPhotos = false; } */ } // Make the call button visible if requested. Loading Loading @@ -3235,6 +3302,12 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC final int position = cursor.getPosition(); mPhotoLoader.loadPhoto(viewToUse, photoId); } else { if (cache.photoView != null) cache.photoView.setVisibility(View.GONE); if (cache.nonQuickContactPhotoView != null) cache.nonQuickContactPhotoView.setVisibility(View.GONE); } if ((mMode & MODE_MASK_NO_PRESENCE) == 0) { // Set the proper icon (star or presence or nothing) Loading