package com.tencent.mm.plugin.wenote.model.nativenote.a;

import android.text.Spanned;
import android.text.style.CharacterStyle;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.Comparator;

class b$1 implements Comparator<CharacterStyle> {
    final /* synthetic */ Spanned uOJ;

    b$1(Spanned spanned) {
        this.uOJ = spanned;
    }

    public final /* synthetic */ int compare(Object obj, Object obj2) {
        AppMethodBeat.i(26689);
        CharacterStyle characterStyle = (CharacterStyle) obj;
        CharacterStyle characterStyle2 = (CharacterStyle) obj2;
        int spanStart = this.uOJ.getSpanStart(characterStyle);
        int spanStart2 = this.uOJ.getSpanStart(characterStyle2);
        if (spanStart != spanStart2) {
            spanStart -= spanStart2;
            AppMethodBeat.o(26689);
            return spanStart;
        }
        spanStart = this.uOJ.getSpanEnd(characterStyle);
        spanStart2 = this.uOJ.getSpanEnd(characterStyle2);
        if (spanStart != spanStart2) {
            spanStart = spanStart2 - spanStart;
            AppMethodBeat.o(26689);
            return spanStart;
        }
        spanStart = characterStyle.getClass().getName().compareTo(characterStyle2.getClass().getName());
        AppMethodBeat.o(26689);
        return spanStart;
    }
}
