APISonar


com.zzhoujay.richtext.ext.Debug.log

> com > zzhoujay > richtext > ext > Debug > log
com APIs zzhoujay APIs richtext APIs ext APIs Debug APIs log APIs

Example 1
SpannableStringBuilder loadCache(String source) {
        SoftReference<SpannableStringBuilder> cache = richCache.get(MD5.generate(source));
        SpannableStringBuilder ssb = cache == null ? null : cache.get();
        if (ssb != null) {
            Debug.log(TAG, "cache hit -- text");
            return new SpannableStringBuilder(ssb);
        }
        return null;
    }
Example 2
void cache(String source, SpannableStringBuilder ssb) {
        String key = MD5.generate(source);
        if (richCache.get(key) != null) {
            Debug.log(TAG, "cached");
            return;
        }
        ssb = clearSpans(new SpannableStringBuilder(ssb));
        ssb.setSpan(new CachedSpannedParser.Cached(), 0, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
        richCache.put(key, new SoftReference<>(ssb));
    }