summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-02-08Add CombinedAvatarProviderTestAlex Clayton
Adds the CombinedAvatarProviderTest class. When I was adding the test I noticed that testProviderUpdateWithAvatarDisappearingTriggersChange kept failing due to a bug in the CombinedAvatarProvider class and testRemoveProviderDisconnectsUpdates could not be implemented as the class was incomplete. I had to make some changes to CombinedAvatarProvider to fix these issues. Test-information: Ran unit tests they all pass. Change-Id: I0bfb68dd2b15df0f220f36c136aceadaf6545893
2015-08-13VCard.getPhoto() to return null for absent photo.Alan Young
Most of the time when VCard.getPhoto() is called it is only used to determine presence or absence of a photo. Thus, it makes no sense to allocate an empty ByteArray() just for this purpose. Return null instead, if absent. Change-Id: I3bae02ffbece5589c74c950bbb4c0db6c0376c76
2015-07-07Update Avatar access model.Alan Young
Use the String avatar hash as the general handle for an avatar. AvatarManager.getAvatar(JID jid) will return null if no avatar is available. AvatarManager.getAvatarPath() and AvatarStorage.getAvatarPath() are deleted. Make AvatarProvider & AvatarManager abstract classes instead of interfaces so that their onAvatarChanged Signals are not static fields. Implement delete() for AvatarManagerImpl and AvatarProvider & subclasses so that signal connections can be released. Add @Override annotations as appropriate. Change-Id: Ia7c9d7607b642bb42c373f81dc6be9a60f0f2134
2015-06-14Add Avatar Functionality.Tarun Gupta
Adds AvatarManager, AvatarManagerImpl, AvatarStorage and different AvatarProviders including DummyAvatarProvider, NullAvatarProvider and OfflineAvatarProvider. Also adds VCardAvatarManager and VCardUpdateAvatarManager. Updates VCard Element, so that it does not return null on calling getPhoto() and thereby produce Null Pointer Exceptions. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Tests are added for AvatarManagerImpl, VCardAvatarManager and VCardUpdateAvatarManager, which passes. Tests for CombinedAvatarProvider will be added soon. Change-Id: Ia6c0f82ae496427dc0cd11841487f6c53fd0fe1c