package com.ss.android.ugc.aweme.framework.services;

import android.text.TextUtils;
import com.benchmark.BHApplogDowngrade;
import com.benchmark.BHNetTagDowngrade;
import com.benchmark.BHSlardarDowngrade;
import com.benchmark.BTCHConfigDowngrade;
import com.benchmark.collection_api.ByteBenchCollectionDowngrade;
import com.bytedance.bmf_mods_api.ColorShiftAPIDefault;
import com.bytedance.bmf_mods_api.HydraHDRAPIDefault;
import com.bytedance.bmf_mods_api.VideoBrightAPIDefault;
import com.bytedance.bmf_mods_api.VideoBrightCallBackAPIDefault;
import com.bytedance.bmf_mods_api.VideoOCLSRAPIDefault;
import com.bytedance.bmf_mods_api.VideoSRLutAPIDefault;
import com.bytedance.bmf_mods_api.VideoSRRaisrAPIDefault;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.android.base.runtime.DependOutServiceDowngrade;
import com.bytedance.ies.web.jsbridge2.JsBridge2ConfigDefault;
import com.fackbook.drawee.DraweeConfigOutServiceDowngrade;
import com.ss.android.ugc.aweme.csrf.IClientSecurityServiceDefault;
import com.ss.android.ugc.aweme.deeplink.DeepLinkDowngradeService;
import com.ss.android.ugc.aweme.discover.DiscoveryAsyncInflateDownImpl;
import com.ss.android.ugc.aweme.dsp.service.MusicDspServiceEmptyImpl;
import com.ss.android.ugc.aweme.favorites.service.FavoriteEmptyService;
import com.ss.android.ugc.aweme.homepage.HomePageServiceImpl;
import com.ss.android.ugc.aweme.inferenceengine.IInferenceEngineServiceDefault;
import com.ss.android.ugc.aweme.main.homepageImpl.LiveBubblePopServiceImpl;
import com.ss.android.ugc.aweme.mix.services.MixFeedDowngrade;
import com.ss.android.ugc.aweme.ml.api.MLCommonServiceDefault;
import com.ss.android.ugc.aweme.ml.api.MLDataCenterServiceDefault;
import com.ss.android.ugc.aweme.ml.api.SmartCDNRankServiceDefault;
import com.ss.android.ugc.aweme.ml.api.SmartDataTrackerServiceDefault;
import com.ss.android.ugc.aweme.ml.api.SmartFeedAdUIServiceDefault;
import com.ss.android.ugc.aweme.ml.api.SmartFeedLoadMoreServiceDefault;
import com.ss.android.ugc.aweme.ml.api.SmartFeedPreloadServiceDefault;
import com.ss.android.ugc.aweme.ml.api.SmartPreloadCommentV2ServiceDefault;
import com.ss.android.ugc.aweme.ml.api.SmartPreloadProfileV2ServiceDefault;
import com.ss.android.ugc.aweme.ml.infra.SmartClassifyServiceDefault;
import com.ss.android.ugc.aweme.ml.infra.SmartCommonPreloadServiceDefault;
import com.ss.android.ugc.aweme.ml.infra.SmartDataCenterApiServiceDefault;
import com.ss.android.ugc.aweme.ml.infra.SmartMLSceneServiceDefault;
import com.ss.android.ugc.aweme.ml.infra.SmartPlaytimePredictServiceDefault;
import com.ss.android.ugc.aweme.ml.infra.SmartRegressCalculateServiceDefault;
import com.ss.android.ugc.aweme.modeo.ModeoImitDefaultImpl;
import com.ss.android.ugc.aweme.music.video.service.MusicVideoServiceEmptyImpl;
import com.ss.android.ugc.aweme.poi_api.service.PoiServiceEmptyImpl;
import com.ss.android.ugc.aweme.poi_map.service.PoiMapServiceEmptylmpl;
import com.ss.android.ugc.aweme.popularfeed.service.PopularFeedEmptyService;
import com.ss.android.ugc.aweme.portrait.api.PortraitCenterInitServiceDefault;
import com.ss.android.ugc.aweme.preinstall.PreInstallFakeService;
import com.ss.android.ugc.aweme.preinstall.brand.TranssonicFakeService;
import com.ss.android.ugc.aweme.profile.ProfileDowngradeService;
import com.ss.android.ugc.aweme.qrcode.QRCodeDowngradeService;
import com.ss.android.ugc.aweme.ruler_adapter.RulerServiceImpl;
import com.ss.android.ugc.aweme.service.NearbyFeedServiceEmptyImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultEtDebugServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultFeedDebugServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultFilterBotServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultFrameCheckServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultLocalTestImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultLocationMockServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultMatrixPluginServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultOfflineFeedbackServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultOnBoardManager;
import com.ss.android.ugc.aweme.service.downgrade.DefaultPopupDebugToolsServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultPopupRecordServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultRegionMockServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultSecuidLarkServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultSparrowServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.DefaultToolsOfflineServiceImpl;
import com.ss.android.ugc.aweme.service.downgrade.OfflineGroupchatServiceEmptyImpl;
import com.ss.android.ugc.aweme.story.StoryServiceDowngradeImpl;
import com.ss.android.ugc.aweme.upvote.service.UpvoteServiceDowngradeImpl;
import com.ss.android.ugc.aweme.utils.gecko.GeckoGlobalInitServiceDefault;
import com.ss.android.ugc.aweme.utils.gecko.GeckoLocalServiceDefault;
import com.ss.android.ugc.customactivityoncrash_base.DefaultCustomActivityOnCrashService;
import com.ss.android.ugc.tiktok.deeplink.DeeplinkPrefetchDefault;
import com.ss.android.ugc.tiktok.location_api.service.LocationServiceEmptyImpl;
import com.ss.android.ugc.tiktok.seclink.ISecLinkServiceDefault;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

public class DowngradeImplManager {
    public final Map<String, String> componentsMap = new ConcurrentHashMap();
    public final Set<String> downgradeComponents = Collections.synchronizedSet(new HashSet());
    public Map<String, ServiceProvider> downgradeImplMap = new ConcurrentHashMap();
    public Map<String, Object> staticDowngradeImplCache = new ConcurrentHashMap();
    public final Set<String> staticDowngradeNotExistSet = Collections.synchronizedSet(new HashSet());

    static {
        Covode.recordClassIndex(81069);
    }

    public static DowngradeImplManager getInstance() {
        return SingleInstanceHolder.INSTANCE;
    }

    public static class SingleInstanceHolder {
        public static final DowngradeImplManager INSTANCE = new DowngradeImplManager();

        static {
            Covode.recordClassIndex(81070);
        }
    }

    public void downgradeComponent(String str) {
        if (!TextUtils.isEmpty(str) && !this.downgradeComponents.contains(str)) {
            this.downgradeComponents.add(str);
        }
    }

    public boolean isServiceForceDowngrade(Class cls) {
        String str = this.componentsMap.get(cls.getName());
        if (!TextUtils.isEmpty(str)) {
            return this.downgradeComponents.contains(str);
        }
        return false;
    }

    public <T> T getDowngradeImpl(Class<T> cls) {
        String name = cls.getName();
        ServiceProvider serviceProvider = this.downgradeImplMap.get(name);
        if (serviceProvider != null) {
            return serviceProvider.get();
        }
        T t = this.staticDowngradeImplCache.get(name);
        if (t != null || this.staticDowngradeNotExistSet.contains(name)) {
            return t;
        }
        return getStaticDowngradeImpl(cls);
    }

    private <T> T getStaticDowngradeImpl(Class<T> cls) {
        switch (cls.getName().hashCode()) {
            case -1891048851:
                if (cls.getName().equals("com.bytedance.bmf_mods_api.ColorShiftAPI")) {
                    T colorShiftAPIDefault = new ColorShiftAPIDefault();
                    putStaticDowngradeImplCache("com.bytedance.bmf_mods_api.ColorShiftAPI", colorShiftAPIDefault);
                    return colorShiftAPIDefault;
                }
                break;
            case -1788325683:
                if (cls.getName().equals("com.bytedance.bmf_mods_api.VideoSRRaisrAPI")) {
                    T videoSRRaisrAPIDefault = new VideoSRRaisrAPIDefault();
                    putStaticDowngradeImplCache("com.bytedance.bmf_mods_api.VideoSRRaisrAPI", videoSRRaisrAPIDefault);
                    return videoSRRaisrAPIDefault;
                }
                break;
            case -1753842266:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.api.SmartCDNRankService")) {
                    T smartCDNRankServiceDefault = new SmartCDNRankServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.api.SmartCDNRankService", smartCDNRankServiceDefault);
                    return smartCDNRankServiceDefault;
                }
                break;
            case -1746126115:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IEtDebugService")) {
                    T defaultEtDebugServiceImpl = new DefaultEtDebugServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IEtDebugService", defaultEtDebugServiceImpl);
                    return defaultEtDebugServiceImpl;
                }
                break;
            case -1727161271:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.api.ISmartFeedPreloadService")) {
                    T smartFeedPreloadServiceDefault = new SmartFeedPreloadServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.api.ISmartFeedPreloadService", smartFeedPreloadServiceDefault);
                    return smartFeedPreloadServiceDefault;
                }
                break;
            case -1690323830:
                if (cls.getName().equals("com.ss.android.ugc.aweme.deeplink.IDeepLinkService")) {
                    T deepLinkDowngradeService = new DeepLinkDowngradeService();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.deeplink.IDeepLinkService", deepLinkDowngradeService);
                    return deepLinkDowngradeService;
                }
                break;
            case -1667865087:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.api.IMLCommonService")) {
                    T mLCommonServiceDefault = new MLCommonServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.api.IMLCommonService", mLCommonServiceDefault);
                    return mLCommonServiceDefault;
                }
                break;
            case -1633603100:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.api.ISmartPreloadCommentV2Service")) {
                    T smartPreloadCommentV2ServiceDefault = new SmartPreloadCommentV2ServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.api.ISmartPreloadCommentV2Service", smartPreloadCommentV2ServiceDefault);
                    return smartPreloadCommentV2ServiceDefault;
                }
                break;
            case -1581112369:
                if (cls.getName().equals("com.benchmark.collection_api.BXCollectionAPI")) {
                    return new ByteBenchCollectionDowngrade();
                }
                break;
            case -1568697773:
                if (cls.getName().equals("com.ss.android.ugc.aweme.homepage.business.ILiveBubblePopService")) {
                    T liveBubblePopServiceImpl = new LiveBubblePopServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.homepage.business.ILiveBubblePopService", liveBubblePopServiceImpl);
                    return liveBubblePopServiceImpl;
                }
                break;
            case -1472699734:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.ILocationMockService")) {
                    T defaultLocationMockServiceImpl = new DefaultLocationMockServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.ILocationMockService", defaultLocationMockServiceImpl);
                    return defaultLocationMockServiceImpl;
                }
                break;
            case -1429156681:
                if (cls.getName().equals("com.ss.android.ugc.tiktok.location_api.service.ILocationService")) {
                    T locationServiceEmptyImpl = new LocationServiceEmptyImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.tiktok.location_api.service.ILocationService", locationServiceEmptyImpl);
                    return locationServiceEmptyImpl;
                }
                break;
            case -1379566319:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.infra.ISmartMLSceneService")) {
                    T smartMLSceneServiceDefault = new SmartMLSceneServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.infra.ISmartMLSceneService", smartMLSceneServiceDefault);
                    return smartMLSceneServiceDefault;
                }
                break;
            case -1364971920:
                if (cls.getName().equals("com.bytedance.bmf_mods_api.VideoOCLSRAPI")) {
                    T videoOCLSRAPIDefault = new VideoOCLSRAPIDefault();
                    putStaticDowngradeImplCache("com.bytedance.bmf_mods_api.VideoOCLSRAPI", videoOCLSRAPIDefault);
                    return videoOCLSRAPIDefault;
                }
                break;
            case -1303276871:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IOfflineFeedbackService")) {
                    T defaultOfflineFeedbackServiceImpl = new DefaultOfflineFeedbackServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IOfflineFeedbackService", defaultOfflineFeedbackServiceImpl);
                    return defaultOfflineFeedbackServiceImpl;
                }
                break;
            case -1289181594:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.infra.ISmartPlaytimePredictService")) {
                    T smartPlaytimePredictServiceDefault = new SmartPlaytimePredictServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.infra.ISmartPlaytimePredictService", smartPlaytimePredictServiceDefault);
                    return smartPlaytimePredictServiceDefault;
                }
                break;
            case -1263811427:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.api.ISmartFeedLoadMoreService")) {
                    T smartFeedLoadMoreServiceDefault = new SmartFeedLoadMoreServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.api.ISmartFeedLoadMoreService", smartFeedLoadMoreServiceDefault);
                    return smartFeedLoadMoreServiceDefault;
                }
                break;
            case -1230251313:
                if (cls.getName().equals("com.bytedance.ies.android.base.runtime.IDependOutService")) {
                    return new DependOutServiceDowngrade();
                }
                break;
            case -1175770854:
                if (cls.getName().equals("com.ss.android.ugc.aweme.dsp.service.IMusicDspService")) {
                    T musicDspServiceEmptyImpl = new MusicDspServiceEmptyImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.dsp.service.IMusicDspService", musicDspServiceEmptyImpl);
                    return musicDspServiceEmptyImpl;
                }
                break;
            case -978906707:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.infra.ISmartRegressCalculateService")) {
                    T smartRegressCalculateServiceDefault = new SmartRegressCalculateServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.infra.ISmartRegressCalculateService", smartRegressCalculateServiceDefault);
                    return smartRegressCalculateServiceDefault;
                }
                break;
            case -920236025:
                if (cls.getName().equals("com.ss.android.ugc.aweme.csrf.IClientSecurityService")) {
                    T iClientSecurityServiceDefault = new IClientSecurityServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.csrf.IClientSecurityService", iClientSecurityServiceDefault);
                    return iClientSecurityServiceDefault;
                }
                break;
            case -897514835:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IPopupDebugToolsService")) {
                    T defaultPopupDebugToolsServiceImpl = new DefaultPopupDebugToolsServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IPopupDebugToolsService", defaultPopupDebugToolsServiceImpl);
                    return defaultPopupDebugToolsServiceImpl;
                }
                break;
            case -892718263:
                if (cls.getName().equals("com.benchmark.IBTCHSlardar")) {
                    T bHSlardarDowngrade = new BHSlardarDowngrade();
                    putStaticDowngradeImplCache("com.benchmark.IBTCHSlardar", bHSlardarDowngrade);
                    return bHSlardarDowngrade;
                }
                break;
            case -857828971:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IMatrixPluginService")) {
                    T defaultMatrixPluginServiceImpl = new DefaultMatrixPluginServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IMatrixPluginService", defaultMatrixPluginServiceImpl);
                    return defaultMatrixPluginServiceImpl;
                }
                break;
            case -767436525:
                if (cls.getName().equals("com.bytedance.bmf_mods_api.VideoBrightAPI")) {
                    T videoBrightAPIDefault = new VideoBrightAPIDefault();
                    putStaticDowngradeImplCache("com.bytedance.bmf_mods_api.VideoBrightAPI", videoBrightAPIDefault);
                    return videoBrightAPIDefault;
                }
                break;
            case -738010642:
                if (cls.getName().equals("com.ss.android.ugc.aweme.poi_api.service.IPoiService")) {
                    T poiServiceEmptyImpl = new PoiServiceEmptyImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.poi_api.service.IPoiService", poiServiceEmptyImpl);
                    return poiServiceEmptyImpl;
                }
                break;
            case -709173037:
                if (cls.getName().equals("com.ss.android.ugc.aweme.popularfeed.service.IPopularFeedService")) {
                    T popularFeedEmptyService = new PopularFeedEmptyService();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.popularfeed.service.IPopularFeedService", popularFeedEmptyService);
                    return popularFeedEmptyService;
                }
                break;
            case -706028711:
                if (cls.getName().equals("com.ss.android.ugc.aweme.modeo.IModeoInit")) {
                    T modeoImitDefaultImpl = new ModeoImitDefaultImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.modeo.IModeoInit", modeoImitDefaultImpl);
                    return modeoImitDefaultImpl;
                }
                break;
            case -703329023:
                if (cls.getName().equals("com.fackbook.drawee.IDraweeConfigOutService")) {
                    return new DraweeConfigOutServiceDowngrade();
                }
                break;
            case -688908617:
                if (cls.getName().equals("com.ss.android.ugc.tiktok.deeplink.IDeepLinkSecurityService")) {
                    T deeplinkPrefetchDefault = new DeeplinkPrefetchDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.tiktok.deeplink.IDeepLinkSecurityService", deeplinkPrefetchDefault);
                    return deeplinkPrefetchDefault;
                }
                break;
            case -659757515:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IOfflineGroupchatService")) {
                    T offlineGroupchatServiceEmptyImpl = new OfflineGroupchatServiceEmptyImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IOfflineGroupchatService", offlineGroupchatServiceEmptyImpl);
                    return offlineGroupchatServiceEmptyImpl;
                }
                break;
            case -628620472:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.infra.ISmartClassifyService")) {
                    T smartClassifyServiceDefault = new SmartClassifyServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.infra.ISmartClassifyService", smartClassifyServiceDefault);
                    return smartClassifyServiceDefault;
                }
                break;
            case -627748852:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.INearbyFeedService")) {
                    T nearbyFeedServiceEmptyImpl = new NearbyFeedServiceEmptyImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.INearbyFeedService", nearbyFeedServiceEmptyImpl);
                    return nearbyFeedServiceEmptyImpl;
                }
                break;
            case -607424883:
                if (cls.getName().equals("com.ss.android.ugc.customactivityoncrash_base.ICustomActivityOnCrashService")) {
                    T defaultCustomActivityOnCrashService = new DefaultCustomActivityOnCrashService();
                    putStaticDowngradeImplCache("com.ss.android.ugc.customactivityoncrash_base.ICustomActivityOnCrashService", defaultCustomActivityOnCrashService);
                    return defaultCustomActivityOnCrashService;
                }
                break;
            case -597770654:
                if (cls.getName().equals("com.ss.android.ugc.aweme.discover.IDiscoveryAsyncInflateService")) {
                    return new DiscoveryAsyncInflateDownImpl();
                }
                break;
            case -539986555:
                if (cls.getName().equals("com.benchmark.IBTCHApplog")) {
                    T bHApplogDowngrade = new BHApplogDowngrade();
                    putStaticDowngradeImplCache("com.benchmark.IBTCHApplog", bHApplogDowngrade);
                    return bHApplogDowngrade;
                }
                break;
            case -505491999:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IToolsOfflineService")) {
                    T defaultToolsOfflineServiceImpl = new DefaultToolsOfflineServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IToolsOfflineService", defaultToolsOfflineServiceImpl);
                    return defaultToolsOfflineServiceImpl;
                }
                break;
            case -401510911:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.api.ISmartFeedAdUIService")) {
                    T smartFeedAdUIServiceDefault = new SmartFeedAdUIServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.api.ISmartFeedAdUIService", smartFeedAdUIServiceDefault);
                    return smartFeedAdUIServiceDefault;
                }
                break;
            case -360388275:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.api.IMLDataCenterService")) {
                    T mLDataCenterServiceDefault = new MLDataCenterServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.api.IMLDataCenterService", mLDataCenterServiceDefault);
                    return mLDataCenterServiceDefault;
                }
                break;
            case -317372455:
                if (cls.getName().equals("com.ss.android.ugc.tiktok.seclink.ISecLinkService")) {
                    T iSecLinkServiceDefault = new ISecLinkServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.tiktok.seclink.ISecLinkService", iSecLinkServiceDefault);
                    return iSecLinkServiceDefault;
                }
                break;
            case -271762187:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.ISparrowService")) {
                    T defaultSparrowServiceImpl = new DefaultSparrowServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.ISparrowService", defaultSparrowServiceImpl);
                    return defaultSparrowServiceImpl;
                }
                break;
            case -203622012:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IPopupRecordService")) {
                    T defaultPopupRecordServiceImpl = new DefaultPopupRecordServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IPopupRecordService", defaultPopupRecordServiceImpl);
                    return defaultPopupRecordServiceImpl;
                }
                break;
            case -177870657:
                if (cls.getName().equals("com.benchmark.IBTCHNetTag")) {
                    T bHNetTagDowngrade = new BHNetTagDowngrade();
                    putStaticDowngradeImplCache("com.benchmark.IBTCHNetTag", bHNetTagDowngrade);
                    return bHNetTagDowngrade;
                }
                break;
            case -45175540:
                if (cls.getName().equals("com.ss.android.ugc.aweme.inferenceengine.IInferenceEngineService")) {
                    T iInferenceEngineServiceDefault = new IInferenceEngineServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.inferenceengine.IInferenceEngineService", iInferenceEngineServiceDefault);
                    return iInferenceEngineServiceDefault;
                }
                break;
            case 23658350:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IFrameCheckService")) {
                    T defaultFrameCheckServiceImpl = new DefaultFrameCheckServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IFrameCheckService", defaultFrameCheckServiceImpl);
                    return defaultFrameCheckServiceImpl;
                }
                break;
            case 26004728:
                if (cls.getName().equals("com.bytedance.bmf_mods_api.HydraHDRAPI")) {
                    T hydraHDRAPIDefault = new HydraHDRAPIDefault();
                    putStaticDowngradeImplCache("com.bytedance.bmf_mods_api.HydraHDRAPI", hydraHDRAPIDefault);
                    return hydraHDRAPIDefault;
                }
                break;
            case 31921668:
                if (cls.getName().equals("com.ss.android.ugc.aweme.favorites.service.IFavoriteService")) {
                    T favoriteEmptyService = new FavoriteEmptyService();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.favorites.service.IFavoriteService", favoriteEmptyService);
                    return favoriteEmptyService;
                }
                break;
            case 53902533:
                if (cls.getName().equals("com.ss.android.ugc.aweme.upvote.service.IUpvoteService")) {
                    T upvoteServiceDowngradeImpl = new UpvoteServiceDowngradeImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.upvote.service.IUpvoteService", upvoteServiceDowngradeImpl);
                    return upvoteServiceDowngradeImpl;
                }
                break;
            case 57780698:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.api.ISmartPreloadProfileV2Service")) {
                    T smartPreloadProfileV2ServiceDefault = new SmartPreloadProfileV2ServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.api.ISmartPreloadProfileV2Service", smartPreloadProfileV2ServiceDefault);
                    return smartPreloadProfileV2ServiceDefault;
                }
                break;
            case 87343796:
                if (cls.getName().equals("com.benchmark.IBTCHConfiguration")) {
                    T bTCHConfigDowngrade = new BTCHConfigDowngrade();
                    putStaticDowngradeImplCache("com.benchmark.IBTCHConfiguration", bTCHConfigDowngrade);
                    return bTCHConfigDowngrade;
                }
                break;
            case 197343978:
                if (cls.getName().equals("com.ss.android.ugc.aweme.mix.services.IMixFeedService")) {
                    return new MixFeedDowngrade();
                }
                break;
            case 316475372:
                if (cls.getName().equals("com.ss.android.ugc.aweme.story.IStoryService")) {
                    T storyServiceDowngradeImpl = new StoryServiceDowngradeImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.story.IStoryService", storyServiceDowngradeImpl);
                    return storyServiceDowngradeImpl;
                }
                break;
            case 389028902:
                if (cls.getName().equals("com.ss.android.ugc.aweme.preinstall.IPreInstallService")) {
                    T preInstallFakeService = new PreInstallFakeService();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.preinstall.IPreInstallService", preInstallFakeService);
                    return preInstallFakeService;
                }
                break;
            case 389511774:
                if (cls.getName().equals("com.ss.android.ugc.aweme.poi_map.service.IPoiMapService")) {
                    T poiMapServiceEmptylmpl = new PoiMapServiceEmptylmpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.poi_map.service.IPoiMapService", poiMapServiceEmptylmpl);
                    return poiMapServiceEmptylmpl;
                }
                break;
            case 478472780:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IFeedDebugService")) {
                    T defaultFeedDebugServiceImpl = new DefaultFeedDebugServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IFeedDebugService", defaultFeedDebugServiceImpl);
                    return defaultFeedDebugServiceImpl;
                }
                break;
            case 534010062:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IOnBoardingService")) {
                    T defaultOnBoardManager = new DefaultOnBoardManager();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IOnBoardingService", defaultOnBoardManager);
                    return defaultOnBoardManager;
                }
                break;
            case 642369832:
                if (cls.getName().equals("com.bytedance.ies.web.jsbridge2.IJsBridge2Config")) {
                    T jsBridge2ConfigDefault = new JsBridge2ConfigDefault();
                    putStaticDowngradeImplCache("com.bytedance.ies.web.jsbridge2.IJsBridge2Config", jsBridge2ConfigDefault);
                    return jsBridge2ConfigDefault;
                }
                break;
            case 913277804:
                if (cls.getName().equals("com.ss.android.ugc.aweme.profile.IProfileService")) {
                    T profileDowngradeService = new ProfileDowngradeService();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.profile.IProfileService", profileDowngradeService);
                    return profileDowngradeService;
                }
                break;
            case 929935183:
                if (cls.getName().equals("com.ss.android.ugc.aweme.music.video.service.IMusicVideoService")) {
                    T musicVideoServiceEmptyImpl = new MusicVideoServiceEmptyImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.music.video.service.IMusicVideoService", musicVideoServiceEmptyImpl);
                    return musicVideoServiceEmptyImpl;
                }
                break;
            case 1127805601:
                if (cls.getName().equals("com.ss.android.ugc.aweme.local_test.LocalTestApi")) {
                    T defaultLocalTestImpl = new DefaultLocalTestImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.local_test.LocalTestApi", defaultLocalTestImpl);
                    return defaultLocalTestImpl;
                }
                break;
            case 1164032055:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ruler_adapter_api.IRulerService")) {
                    T rulerServiceImpl = new RulerServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ruler_adapter_api.IRulerService", rulerServiceImpl);
                    return rulerServiceImpl;
                }
                break;
            case 1205724034:
                if (cls.getName().equals("com.bytedance.geckox.IGeckoGlobalInit")) {
                    T geckoGlobalInitServiceDefault = new GeckoGlobalInitServiceDefault();
                    putStaticDowngradeImplCache("com.bytedance.geckox.IGeckoGlobalInit", geckoGlobalInitServiceDefault);
                    return geckoGlobalInitServiceDefault;
                }
                break;
            case 1377752390:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.api.ISmartDataTrackerService")) {
                    T smartDataTrackerServiceDefault = new SmartDataTrackerServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.api.ISmartDataTrackerService", smartDataTrackerServiceDefault);
                    return smartDataTrackerServiceDefault;
                }
                break;
            case 1439578746:
                if (cls.getName().equals("com.ss.android.ugc.aweme.homepage.IHomePageService")) {
                    T homePageServiceImpl = new HomePageServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.homepage.IHomePageService", homePageServiceImpl);
                    return homePageServiceImpl;
                }
                break;
            case 1469964205:
                if (cls.getName().equals("com.ss.android.ugc.aweme.i18n.language.i18n.GeckoLocalService")) {
                    T geckoLocalServiceDefault = new GeckoLocalServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.i18n.language.i18n.GeckoLocalService", geckoLocalServiceDefault);
                    return geckoLocalServiceDefault;
                }
                break;
            case 1513354211:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.infra.ISmartDataCenterApiService")) {
                    T smartDataCenterApiServiceDefault = new SmartDataCenterApiServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.infra.ISmartDataCenterApiService", smartDataCenterApiServiceDefault);
                    return smartDataCenterApiServiceDefault;
                }
                break;
            case 1529199585:
                if (cls.getName().equals("com.ss.android.ugc.aweme.preinstall.brand.ITranssonicService")) {
                    T transsonicFakeService = new TranssonicFakeService();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.preinstall.brand.ITranssonicService", transsonicFakeService);
                    return transsonicFakeService;
                }
                break;
            case 1532564235:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IRegionMockService")) {
                    T defaultRegionMockServiceImpl = new DefaultRegionMockServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IRegionMockService", defaultRegionMockServiceImpl);
                    return defaultRegionMockServiceImpl;
                }
                break;
            case 1661968864:
                if (cls.getName().equals("com.ss.android.ugc.aweme.ml.infra.ISmartCommonPreloadService")) {
                    T smartCommonPreloadServiceDefault = new SmartCommonPreloadServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.ml.infra.ISmartCommonPreloadService", smartCommonPreloadServiceDefault);
                    return smartCommonPreloadServiceDefault;
                }
                break;
            case 1701644943:
                if (cls.getName().equals("com.ss.android.ugc.aweme.portrait.api.IPortraitCenterInitService")) {
                    T portraitCenterInitServiceDefault = new PortraitCenterInitServiceDefault();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.portrait.api.IPortraitCenterInitService", portraitCenterInitServiceDefault);
                    return portraitCenterInitServiceDefault;
                }
                break;
            case 1771368059:
                if (cls.getName().equals("com.bytedance.bmf_mods_api.VideoSRLutAPI")) {
                    T videoSRLutAPIDefault = new VideoSRLutAPIDefault();
                    putStaticDowngradeImplCache("com.bytedance.bmf_mods_api.VideoSRLutAPI", videoSRLutAPIDefault);
                    return videoSRLutAPIDefault;
                }
                break;
            case 1784507698:
                if (cls.getName().equals("com.ss.android.ugc.aweme.service.IFilterBotService")) {
                    T defaultFilterBotServiceImpl = new DefaultFilterBotServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.service.IFilterBotService", defaultFilterBotServiceImpl);
                    return defaultFilterBotServiceImpl;
                }
                break;
            case 1790875022:
                if (cls.getName().equals("com.bytedance.bmf_mods_api.VideoBrightCallbackAPI")) {
                    T videoBrightCallBackAPIDefault = new VideoBrightCallBackAPIDefault();
                    putStaticDowngradeImplCache("com.bytedance.bmf_mods_api.VideoBrightCallbackAPI", videoBrightCallBackAPIDefault);
                    return videoBrightCallBackAPIDefault;
                }
                break;
            case 1959495426:
                if (cls.getName().equals("com.ss.android.ugc.aweme.utils.ISecUidDependService")) {
                    T defaultSecuidLarkServiceImpl = new DefaultSecuidLarkServiceImpl();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.utils.ISecUidDependService", defaultSecuidLarkServiceImpl);
                    return defaultSecuidLarkServiceImpl;
                }
                break;
            case 2037829402:
                if (cls.getName().equals("com.ss.android.ugc.aweme.qrcode.IQRCodeService")) {
                    T qRCodeDowngradeService = new QRCodeDowngradeService();
                    putStaticDowngradeImplCache("com.ss.android.ugc.aweme.qrcode.IQRCodeService", qRCodeDowngradeService);
                    return qRCodeDowngradeService;
                }
                break;
        }
        this.staticDowngradeNotExistSet.add(cls.getName());
        return null;
    }

    private void addServiceComponent(String str, String str2) {
        this.componentsMap.put(str, str2);
    }

    private void putStaticDowngradeImplCache(String str, Object obj) {
        this.staticDowngradeImplCache.put(str, obj);
    }

    public <T> void bindDowngradeImpl(Class<T> cls, ServiceProvider<T> serviceProvider) {
        this.downgradeImplMap.put(cls.getName(), serviceProvider);
    }
}
