package com.ss.android.ugc.aweme.relation.interceptor;

import X.DXi;
import android.content.Context;
import com.bytedance.covode.number.Covode;
import com.bytedance.router.RouteIntent;
import com.bytedance.router.SmartRoute;
import com.bytedance.router.SmartRouter;
import com.bytedance.router.interceptor.IInterceptor;
import kotlin.o.z;

public final class FBActivityInterceptor implements IInterceptor {
    static {
        Covode.recordClassIndex(103228);
    }

    public final boolean matchInterceptRules(RouteIntent routeIntent) {
        String path;
        if (routeIntent == null || (path = routeIntent.getPath()) == null || !z.LIZ(path, "//friend/find", false)) {
            return false;
        }
        return true;
    }

    public final boolean onInterceptRoute(Context context, RouteIntent routeIntent) {
        if (context == null || routeIntent == null || !DXi.LIZ.LIZJ()) {
            return false;
        }
        SmartRoute buildRoute = SmartRouter.buildRoute(context, "//friends/facebook");
        buildRoute.withParam(routeIntent.getExtra());
        buildRoute.open();
        return true;
    }
}
