/** * Return the most compatible version of the TelecomCallLogCache. */ public static CallLogCache getCallLogCache(Context context) { if (CompatUtils.isClassAvailable("android.telecom.PhoneAccountHandle")) { return new CallLogCacheLollipopMr1(context); } return new CallLogCacheLollipop(context); }