导航菜单

页面标题

页面副标题

OLX India v19.42.007 - a.java 源代码

正在查看: OLX India v19.42.007 应用的 a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.naspers.ragnarok.ui.common.util;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import com.naspers.ragnarok.common.a;
import com.naspers.ragnarok.domain.constant.Constants;
import com.naspers.ragnarok.domain.entity.chat.ChatAd;
import com.naspers.ragnarok.domain.entity.chat.ChatDefaultDataProvider;
import com.naspers.ragnarok.domain.entity.chat.ChatProfile;
import com.naspers.ragnarok.domain.entity.conversation.Conversation;
import com.naspers.ragnarok.domain.entity.inbox.QuickFilter;
import com.naspers.ragnarok.domain.entity.inbox.QuickFilterAction;
import com.naspers.ragnarok.domain.entity.location.IMapLocation;
import com.naspers.ragnarok.domain.entity.location.Place;
import com.naspers.ragnarok.domain.entity.meeting.DealerType;
import com.naspers.ragnarok.domain.entity.meeting.MeetingsAction;
import com.naspers.ragnarok.domain.entity.message.MessageCTAAction;
import com.naspers.ragnarok.domain.entity.testDrive.TestDriveType;
import com.naspers.ragnarok.domain.util.common.Extras;
import com.naspers.ragnarok.domain.util.common.JsonUtils;
import com.naspers.ragnarok.ui.activity.O2OChatActivity;
import com.naspers.ragnarok.ui.adSpecificConversation.activity.DealerAdConversationActivity;
import com.naspers.ragnarok.ui.b2c.activity.InventoryActivity;
import com.naspers.ragnarok.ui.feedback.FeedbackActivity;
import com.naspers.ragnarok.universal.ui.ui.gallery.ImageGalleryActivity;
import com.naspers.ragnarok.universal.ui.ui.location.activity.ChatLocationMapActivity;
import com.naspers.ragnarok.universal.ui.ui.location.activity.SearchLocationByNameActivity;
import com.naspers.ragnarok.universal.ui.ui.location.activity.SelectLocationMapActivity;
import com.naspers.ragnarok.universal.ui.ui.message.activity.ChatActivity;
import com.naspers.ragnarok.universal.ui.ui.testDrive.activity.TestDriveActivity;
import com.naspers.ragnarok.universal.ui.ui.testDrive.activity.TestDriveConfirmationActivity;
import com.naspers.ragnarok.universal.ui.ui.util.b;
import com.naspers.ragnarok.universal.ui.ui.videoCall.activity.VideoCallActivity;
import com.naspers.ragnarok.universal.ui.ui.videoCall.activity.VideoCallConfirmationActivity;
import java.io.Serializable;
import java.util.HashMap;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.apache.commons.lang3.h;

public abstract class a {
    public static final C0036a a = new C0036a(null);

    public static final class C0036a {
        public C0036a(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        public final Intent a(Context context, String str) {
            Intent intent = new Intent(context, (Class<?>) DealerAdConversationActivity.class);
            intent.putExtra("CHAT_AD_ID", str);
            return intent;
        }

        private C0036a() {
        }
    }

    public static Intent K(a aVar, Context context, ChatAd chatAd, ChatProfile chatProfile, MeetingsAction meetingsAction, String str, MessageCTAAction messageCTAAction, TestDriveType testDriveType, int i, Object obj) {
        if (obj == null) {
            return aVar.J(context, chatAd, chatProfile, meetingsAction, str, messageCTAAction, (i & 64) != 0 ? TestDriveType.DEFAULT : testDriveType);
        }
        throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: getTestDriveActivity");
    }

    public static Intent M(a aVar, Context context, Conversation conversation, MeetingsAction meetingsAction, String str, MessageCTAAction messageCTAAction, TestDriveType testDriveType, int i, Object obj) {
        if (obj != null) {
            throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: getTestDriveActivityIntent");
        }
        if ((i & 32) != 0) {
            testDriveType = TestDriveType.DEFAULT;
        }
        return aVar.L(context, conversation, meetingsAction, str, messageCTAAction, testDriveType);
    }

    private final void Q(Context context, Intent intent, Class cls) {
        if (intent.getComponent() == null) {
            intent.setClass(context, cls);
        }
    }

    private final void a(IMapLocation iMapLocation, int i, boolean z, String str, Intent intent) {
        intent.putExtra(Constants.ExtraKeys.LOCATION_MAP_AD_EXTRA, iMapLocation);
        intent.putExtra("activityMapTitle", i);
        intent.putExtra(Constants.ExtraKeys.FROM_HOME, z);
        intent.putExtra(Constants.ExtraKeys.ORIGIN_SOURCE, str);
    }

    private final String k(String str) {
        return Intrinsics.d(str, Constants.Intent.Extra.MEETING_RESCHEDULE) ? Constants.ExtraKeys.CONVERSATION_MEETING : Intrinsics.d(str, Constants.Intent.Extra.MEETING_DIRECTIONS) ? Constants.ExtraKeys.CONVERSATION_DIRECTION : Constants.ExtraKeys.CONVERSATION_CHAT;
    }

    public static Intent r(a aVar, Context context, ChatAd chatAd, ChatProfile chatProfile, String str, int i, HashMap hashMap, com.naspers.ragnarok.universal.ui.ui.c2b.entities.a aVar2, int i2, Object obj) {
        if (obj == null) {
            return aVar.n(context, chatAd, chatProfile, (i2 & 8) != 0 ? "" : str, (i2 & 16) != 0 ? -1 : i, (i2 & 32) != 0 ? new HashMap() : hashMap, (i2 & 64) != 0 ? null : aVar2);
        }
        throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: getChatActivityIntent");
    }

    public static Intent s(a aVar, Context context, Conversation conversation, String str, int i, HashMap hashMap, int i2, Object obj) {
        if (obj != null) {
            throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: getChatActivityIntent");
        }
        if ((i2 & 4) != 0) {
            str = "";
        }
        String str2 = str;
        int i3 = (i2 & 8) != 0 ? -1 : i;
        if ((i2 & 16) != 0) {
            hashMap = new HashMap();
        }
        return aVar.q(context, conversation, str2, i3, hashMap);
    }

    public abstract Intent A();

    public final Intent B(Context context, Bundle bundle) {
        Intent intent = new Intent(context, (Class<?>) ImageGalleryActivity.class);
        if (bundle != null) {
            if (bundle.containsKey(Constants.ExtraKeys.SELECTED_PHOTO_INDEX)) {
                intent.putExtra(Constants.ExtraKeys.SELECTED_PHOTO_INDEX, ((Integer) bundle.get(Constants.ExtraKeys.SELECTED_PHOTO_INDEX)).intValue());
            }
            if (bundle.containsKey(Constants.ExtraKeys.GALLERY_IMAGES_INFO)) {
                intent.putExtra(Constants.ExtraKeys.GALLERY_IMAGES_INFO, (Serializable) bundle.get(Constants.ExtraKeys.GALLERY_IMAGES_INFO));
            }
            if (bundle.containsKey(Constants.ExtraKeys.ORIGIN_SOURCE)) {
                intent.putExtra(Constants.ExtraKeys.ORIGIN_SOURCE, (String) bundle.get(Constants.ExtraKeys.ORIGIN_SOURCE));
            }
            if (bundle.containsKey(Constants.ExtraKeys.GALLERY_IMAGES_COUNT_VISIBILITY)) {
                intent.putExtra(Constants.ExtraKeys.GALLERY_IMAGES_COUNT_VISIBILITY, bundle.getBoolean(Constants.ExtraKeys.GALLERY_IMAGES_COUNT_VISIBILITY));
            }
            if (bundle.containsKey(Constants.ExtraKeys.GALLERY_IMAGES_DOT_INDICATOR_VISIBILITY)) {
                intent.putExtra(Constants.ExtraKeys.GALLERY_IMAGES_DOT_INDICATOR_VISIBILITY, bundle.getBoolean(Constants.ExtraKeys.GALLERY_IMAGES_DOT_INDICATOR_VISIBILITY));
            }
        }
        return intent;
    }

    public final Intent C(Context context, IMapLocation iMapLocation, int i, int i2, String str) {
        Intent intent = new Intent(context, (Class<?>) SelectLocationMapActivity.class);
        intent.putExtra(Constants.ExtraKeys.USE_LOCATION_BTN, i2);
        a(iMapLocation, i, false, str, intent);
        return intent;
    }

    public abstract Intent D(String str, String str2);

    public final Intent E(Context context) {
        Intent intent = new Intent();
        d(intent);
        Q(context, intent, O2OChatActivity.class);
        return intent;
    }

    public final Intent F(Place place) {
        Intent intent = new Intent();
        intent.putExtra(Constants.ExtraKeys.PLACE, place);
        return intent;
    }

    public final Intent G(String str) {
        Intent intent = new Intent("android.intent.action.VIEW");
        intent.setData(Uri.parse("sms:" + str));
        return intent;
    }

    public final Intent H(Context context, int i, Place place) {
        Intent intent = new Intent(context, (Class<?>) SearchLocationByNameActivity.class);
        if (place != null) {
            intent.putExtra(Constants.ExtraKeys.PLACE, place);
        }
        intent.putExtra(Constants.ExtraKeys.SOURCE, i);
        return intent;
    }

    public final Intent I(Context context, ChatAd chatAd, ChatProfile chatProfile, MeetingsAction meetingsAction, String str, MessageCTAAction messageCTAAction) {
        return K(this, context, chatAd, chatProfile, meetingsAction, str, messageCTAAction, null, 64, null);
    }

    public final Intent J(Context context, ChatAd chatAd, ChatProfile chatProfile, MeetingsAction meetingsAction, String str, MessageCTAAction messageCTAAction, TestDriveType testDriveType) {
        Conversation a2 = b.a.a(chatAd, chatProfile);
        Intent intent = new Intent();
        intent.putExtra("conversationExtra", a2);
        intent.putExtra(Constants.ExtraKeys.MEETING_ACTION, meetingsAction.ordinal());
        intent.putExtra(Constants.ExtraKeys.MEETING_ORIGIN, str);
        intent.putExtra(Constants.ExtraKeys.MEETING_TRIGGERED_ACTION, messageCTAAction.name());
        intent.putExtra(Constants.ExtraKeys.TEST_DRIVE_TYPE, testDriveType);
        e(intent);
        Q(context, intent, TestDriveActivity.class);
        return intent;
    }

    public final Intent L(Context context, Conversation conversation, MeetingsAction meetingsAction, String str, MessageCTAAction messageCTAAction, TestDriveType testDriveType) {
        Intent intent = new Intent();
        intent.putExtra("conversationExtra", conversation);
        intent.putExtra(Constants.ExtraKeys.MEETING_ACTION, meetingsAction.ordinal());
        intent.putExtra(Constants.ExtraKeys.MEETING_ORIGIN, str);
        intent.putExtra(Constants.ExtraKeys.MEETING_TRIGGERED_ACTION, messageCTAAction.name());
        intent.putExtra(Constants.ExtraKeys.TEST_DRIVE_TYPE, testDriveType);
        e(intent);
        Q(context, intent, TestDriveActivity.class);
        return intent;
    }

    public final Intent N(Context context, String str, String str2, String str3) {
        Intent intent = new Intent();
        intent.putExtra(Constants.ExtraKeys.MEETING_ORIGIN, str);
        intent.putExtra(Constants.ExtraKeys.MEETING_TRIGGERED_ACTION, str2);
        intent.putExtra(Constants.ExtraKeys.CHOSEN_OPTION, str3);
        f(intent);
        Q(context, intent, TestDriveConfirmationActivity.class);
        return intent;
    }

    public final Intent O(Context context, ChatAd chatAd, ChatProfile chatProfile, MeetingsAction meetingsAction, String str, MessageCTAAction messageCTAAction) {
        Conversation a2 = b.a.a(chatAd, chatProfile);
        Intent intent = new Intent();
        intent.putExtra("conversationExtra", a2);
        intent.putExtra(Constants.ExtraKeys.MEETING_ACTION, meetingsAction.ordinal());
        intent.putExtra(Constants.ExtraKeys.MEETING_ORIGIN, str);
        intent.putExtra(Constants.ExtraKeys.MEETING_TRIGGERED_ACTION, messageCTAAction.name());
        g(intent);
        Q(context, intent, VideoCallActivity.class);
        return intent;
    }

    public final Intent P(Context context, ChatAd chatAd, ChatProfile chatProfile, DealerType dealerType, String str, String str2, String str3) {
        Intent intent = new Intent();
        intent.putExtra(Constants.ExtraKeys.VIDEO_CALL_AD, chatAd);
        intent.putExtra(Constants.ExtraKeys.VIDEO_CALL_CHAT_PROFILE, chatProfile);
        intent.putExtra(Constants.ExtraKeys.VIDEO_CALL_DEALER_TYPE, dealerType);
        intent.putExtra(Constants.ExtraKeys.VIDEO_CALL_DATE, str);
        intent.putExtra(Constants.ExtraKeys.VIDEO_CALL_START_TIME, str2);
        intent.putExtra(Constants.ExtraKeys.VIDEO_CALL_END_TIME, str3);
        h(intent);
        Q(context, intent, VideoCallConfirmationActivity.class);
        return intent;
    }

    public abstract Intent b(Intent intent);

    public void c(Intent intent) {
    }

    public abstract void d(Intent intent);

    public abstract void e(Intent intent);

    public void f(Intent intent) {
    }

    public abstract void g(Intent intent);

    public void h(Intent intent) {
    }

    public final Intent i(Context context, ChatAd chatAd, QuickFilter quickFilter, QuickFilterAction quickFilterAction) {
        Intent intent = new Intent(context, (Class<?>) InventoryActivity.class);
        intent.putExtra("chatAdExtra", JsonUtils.getGson().toJson(chatAd));
        intent.putExtra(Constants.ExtraKeys.SELECTED_QUICK_FILTER_EXTRA, JsonUtils.getGson().toJson(quickFilter));
        intent.putExtra(Constants.ExtraKeys.SELECTED_QUICK_FILTER_ACTION, JsonUtils.getGson().toJson(quickFilterAction));
        return intent;
    }

    public final Intent j(String str) {
        return new Intent("android.intent.action.DIAL", Uri.parse("tel:" + str));
    }

    public final Intent l(Context context, ChatAd chatAd, ChatProfile chatProfile) {
        return r(this, context, chatAd, chatProfile, null, 0, null, null, 120, null);
    }

    public final Intent m(Context context, ChatAd chatAd, ChatProfile chatProfile, String str) {
        return r(this, context, chatAd, chatProfile, str, 0, null, null, 112, null);
    }

    public final Intent n(Context context, ChatAd chatAd, ChatProfile chatProfile, String str, int i, HashMap hashMap, com.naspers.ragnarok.universal.ui.ui.c2b.entities.a aVar) {
        Intent b = b.a.b(chatAd, chatProfile, hashMap);
        if (i != -1) {
            b.putExtra("messagePosition", i);
        }
        if (!h.j(str)) {
            b.putExtra(Extras.Constants.CHAT_EXTRAS, new Extras.Builder().addExtra("message", str).build());
        }
        if (aVar != null) {
            b.putExtra(Constants.Intent.Extra.C2B_AD_ITEM_DETAIL, aVar);
        }
        b(b);
        Q(context, b, ChatActivity.class);
        return b;
    }

    public final Intent o(Context context, Conversation conversation) {
        return s(this, context, conversation, null, 0, null, 28, null);
    }

    public final Intent p(Context context, Conversation conversation, String str, int i) {
        return s(this, context, conversation, str, i, null, 16, null);
    }

    public final Intent q(Context context, Conversation conversation, String str, int i, HashMap hashMap) {
        Intent c = b.a.c(conversation, hashMap);
        if (i != -1) {
            c.putExtra("messagePosition", i);
        }
        if (!h.j(str)) {
            c.putExtra(Extras.Constants.CHAT_EXTRAS, new Extras.Builder().addExtra("message", str).build());
        }
        b(c);
        Q(context, c, ChatActivity.class);
        return c;
    }

    public final Intent t(Context context, ChatAd chatAd, ChatProfile chatProfile, String str, HashMap hashMap) {
        Intent b = b.a.b(chatAd, chatProfile, hashMap);
        b.putExtra(Extras.Constants.CHAT_EXTRAS, new Extras.Builder().addExtra("conversationeAction", k(str)).build());
        b(b);
        if (b.getComponent() == null) {
            b.setClass(context, ChatActivity.class);
        }
        return b;
    }

    public final Intent u(Context context, ChatAd chatAd, ChatProfile chatProfile, HashMap hashMap) {
        Intent b = b.a.b(chatAd, chatProfile, hashMap);
        b.putExtra(Extras.Constants.CHAT_EXTRAS, new Extras.Builder().addExtra("conversationeAction", "conversationMakeOffer").build());
        b(b);
        if (b.getComponent() == null) {
            b.setClass(context, ChatActivity.class);
        }
        return b;
    }

    public final Intent v(Context context, Conversation conversation, HashMap hashMap) {
        Intent c = b.a.c(conversation, hashMap);
        c.putExtra(Extras.Constants.CHAT_EXTRAS, new Extras.Builder().addExtra("conversationeAction", "conversationMakeOffer").build());
        b(c);
        Q(context, c, ChatActivity.class);
        return c;
    }

    public final Intent w(Context context, ChatAd chatAd, ChatProfile chatProfile, String str, HashMap hashMap, com.naspers.ragnarok.universal.ui.ui.c2b.entities.a aVar) {
        Intent r = r(this, context, chatAd, chatProfile, str, 0, null, null, 112, null);
        r.putExtra("message_extras", new Extras.Builder().appendExtra(hashMap).build());
        if (aVar != null) {
            r.putExtra(Constants.Intent.Extra.C2B_AD_ITEM_DETAIL, aVar);
        }
        return r;
    }

    public final Intent x(Context context, IMapLocation iMapLocation, Conversation conversation) {
        Intent intent = new Intent(context, (Class<?>) ChatLocationMapActivity.class);
        intent.putExtra("location", iMapLocation);
        intent.putExtra("conversationExtra", JsonUtils.getGson().toJson(conversation));
        return intent;
    }

    public final Conversation y(String str, String str2) {
        a.a aVar = com.naspers.ragnarok.common.a.C;
        ChatAd adByAdId = aVar.a().w().E().getAdByAdId(str);
        ChatProfile profileByProfileId = aVar.a().w().E().getProfileByProfileId(str2);
        ChatAd dummyChatAd = aVar.a().w().U().getDummyChatAd(str);
        ChatProfile dummyChatProfile$default = ChatDefaultDataProvider.DefaultImpls.getDummyChatProfile$default(aVar.a().w().U(), str2, null, false, null, 14, null);
        Conversation conversation = aVar.a().w().G().getConversation(Long.parseLong(str), str2);
        if (profileByProfileId == null) {
            profileByProfileId = dummyChatProfile$default;
        }
        conversation.setProfile(profileByProfileId);
        if (adByAdId == null) {
            adByAdId = dummyChatAd;
        }
        conversation.setCurrentAd(adByAdId);
        return conversation;
    }

    public final Intent z(Context context, String str, String str2, String str3) {
        Intent intent = new Intent();
        intent.putExtra(Constants.ExtraKeys.CHAT_AD_ID, str);
        intent.putExtra(Constants.ExtraKeys.PROFILE_ID, str2);
        intent.putExtra(Constants.ExtraKeys.FEEDBACK_ACTION, str3);
        c(intent);
        Q(context, intent, FeedbackActivity.class);
        return intent;
    }
}