Yes, but things can only be understood in their contexts. Madiba is Xhosa, their funerals go on for ~10 days and the service itself is/can be hours long.  When BO (and the other leaders with him) took that selfie, it wasnt strictly a funeral, not the solemn, full black dress we think of anyway.  It was in fact a 4-hr memorial/celebration filled with colourful dancing and singing of the New Orleans funeral type.  Other pictures taken in that series show him sometimes paying attention when others were not; e.g., the Danish PM checking her phone, etc. etc.