Make customcontext work with updated 5.2.0 API.

Change-Id: I3560282009b762759f96d77db40c86610cb54e62
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>