导航菜单

页面标题

页面副标题

OVO v3.139.0 - SeeAllRecommendationActivity.java 源代码

正在查看: OVO v3.139.0 应用的 SeeAllRecommendationActivity.java JAVA 源代码文件

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


package ovo.id.home.presentation;

import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import androidx.activity.ComponentActivity;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.recyclerview.widget.GridLayoutManager;
import java.util.HashMap;
import kotlin.Metadata;
import o.i.Function110;
import o.i.a9;
import o.i.ava;
import o.i.bfa;
import o.i.c27;
import o.i.drd;
import o.i.e00;
import o.i.f8g;
import o.i.fqe;
import o.i.fxa;
import o.i.jt2;
import o.i.p1g;
import o.i.pvm;
import o.i.pw5;
import o.i.rig;
import o.i.sh2;
import o.i.sid;
import o.i.ua8;
import o.i.uh;
import o.i.v11;
import o.i.vk7;
import o.i.vuc;
import o.i.w33;
import o.i.wh7;
import o.i.xc;
import o.i.xh;
import o.i.xh7;
import o.i.zu5;
import ovo.id.analytics.AnalyticType;
import ovo.id.base.BaseActivity;
import ovo.id.home.domain.entity.models.HomeCategoryItem;

@Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u00012\u00020\u0002B\u0007¢\u0006\u0004\b\u0003\u0010\u0004¨\u0006\u0005"}, d2 = {"Lovo/id/home/presentation/SeeAllRecommendationActivity;", "Lovo/id/base/BaseActivity;", "Lo/i/bfa;", "<init>", "()V", "app_productionRelease"}, k = 1, mv = {1, 8, 0})
public final class SeeAllRecommendationActivity extends BaseActivity implements bfa {
    public static final int K = 0;
    public sid G;
    public ViewModelProvider.Factory H;
    public final ViewModelLazy I = new ViewModelLazy(vuc.a(drd.class), new b(this), new d(), new c(this));
    public xc J;

    public class a extends pw5 implements Function110<xh, p1g> {
        public a(Object obj) {
            super(1, obj, SeeAllRecommendationActivity.class, "trackAnalytics", "trackAnalytics(Lovo/id/analytics/AnalyticPayload;)V", 0);
        }

        public final Object invoke(Object obj) {
            xh xhVar = (xh) obj;
            vk7.f(xhVar, "p0");
            BaseActivity baseActivity = (SeeAllRecommendationActivity) ((v11) this).receiver;
            int i = SeeAllRecommendationActivity.K;
            baseActivity.getClass();
            uh.a(baseActivity, xhVar);
            return p1g.a;
        }
    }

    public static final class b extends ua8 implements zu5<ViewModelStore> {
        public final ComponentActivity b;

        public b(ComponentActivity componentActivity) {
            super(0);
            this.b = componentActivity;
        }

        public final Object invoke() {
            return this.b.getViewModelStore();
        }
    }

    public static final class c extends ua8 implements zu5<sh2> {
        public final ComponentActivity b;

        public c(ComponentActivity componentActivity) {
            super(0);
            this.b = componentActivity;
        }

        public final Object invoke() {
            return this.b.getDefaultViewModelCreationExtras();
        }
    }

    public static final class d extends ua8 implements zu5<ViewModelProvider.Factory> {
        public d() {
            super(0);
        }

        public final Object invoke() {
            ViewModelProvider.Factory factory = SeeAllRecommendationActivity.this.H;
            if (factory != null) {
                return factory;
            }
            vk7.m("factory");
            throw null;
        }
    }

    public final void G0() {
        e00 a2 = a9.a(this);
        ava avaVar = new ava(new jt2(a2), 1);
        sid F = a2.F();
        pvm.p(F);
        this.G = F;
        this.H = new rig(c27.g(drd.class, avaVar));
    }

    @Override
    public final void i0(HomeCategoryItem homeCategoryItem) {
        vk7.f(homeCategoryItem, "homeCategoryItem");
        String deeplink = homeCategoryItem.getDeeplink();
        if (deeplink != null) {
            String a2 = f8g.a(deeplink, new fxa("referrer", "impression/product_recommendation_list_view"));
            if (!fqe.A(deeplink)) {
                sid sidVar = this.G;
                if (sidVar == null) {
                    vk7.m("screenRouter");
                    throw null;
                }
                w33.d(this, sidVar, a2, (Bundle) null, 12);
                drd drdVar = (drd) this.I.getValue();
                drdVar.getClass();
                HashMap hashMap = new HashMap();
                String id = homeCategoryItem.getId();
                if (id == null) {
                    id = "";
                }
                hashMap.put("PRODUCT_RECOMMENDATION_ID", id);
                String header = homeCategoryItem.getHeader();
                if (header == null) {
                    header = "";
                }
                hashMap.put("PRODUCT_RECOMMENDATION_HEADER", header);
                String deeplink2 = homeCategoryItem.getDeeplink();
                if (deeplink2 == null) {
                    deeplink2 = "";
                }
                hashMap.put("PRODUCT_RECOMMENDATION_DEEPLINK", deeplink2);
                String category = homeCategoryItem.getCategory();
                hashMap.put("PRODUCT_RECOMMENDATION_CATEGORY", category != null ? category : "");
                hashMap.put("PRODUCT_RECOMMENDATION_POSITION", Integer.valueOf(homeCategoryItem.getPosition() + 1));
                drdVar.f308o.setValue(new xh(AnalyticType.LEANPLUM_EVENT, "MAIN_PRODUCT_RECOMMENDATION_LIST", hashMap, 8));
            }
        }
    }

    public final void onBackPressed() {
        if (((BaseActivity) this).D) {
            Object systemService = getSystemService("input_method");
            vk7.d(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
            InputMethodManager inputMethodManager = (InputMethodManager) systemService;
            View currentFocus = getCurrentFocus();
            if (currentFocus == null) {
                currentFocus = new View(this);
            }
            inputMethodManager.hideSoftInputFromWindow(currentFocus.getWindowToken(), 0);
            E0();
        }
    }

    public final void onCreate(android.os.Bundle r8) {
        throw new UnsupportedOperationException("Method not decompiled: ovo.id.home.presentation.SeeAllRecommendationActivity.onCreate(android.os.Bundle):void");
    }

    public final boolean onOptionsItemSelected(MenuItem menuItem) {
        vk7.f(menuItem, "item");
        if (menuItem.getItemId() != 16908332) {
            return super/*android.app.Activity*/.onOptionsItemSelected(menuItem);
        }
        Object systemService = getSystemService("input_method");
        vk7.d(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
        InputMethodManager inputMethodManager = (InputMethodManager) systemService;
        View currentFocus = getCurrentFocus();
        if (currentFocus == null) {
            currentFocus = new View(this);
        }
        inputMethodManager.hideSoftInputFromWindow(currentFocus.getWindowToken(), 0);
        E0();
        return true;
    }

    public final void onResume() {
        super.onResume();
        xc xcVar = this.J;
        if (xcVar == null) {
            vk7.m("binding");
            throw null;
        }
        GridLayoutManager layoutManager = xcVar.f1531u.getLayoutManager();
        GridLayoutManager gridLayoutManager = layoutManager instanceof GridLayoutManager ? layoutManager : null;
        if (gridLayoutManager != null) {
            int W0 = gridLayoutManager.W0();
            int X0 = gridLayoutManager.X0();
            if (W0 == -1 || X0 == -1) {
                return;
            }
            drd drdVar = (drd) this.I.getValue();
            drdVar.getClass();
            wh7 i = new xh7(W0, X0).i();
            while (i.c) {
                HomeCategoryItem homeCategoryItem = (HomeCategoryItem) drdVar.n.get(i.a());
                if (homeCategoryItem != null) {
                    HashMap hashMap = new HashMap();
                    String id = homeCategoryItem.getId();
                    if (id == null) {
                        id = "";
                    }
                    hashMap.put("PRODUCT_RECOMMENDATION_ID", id);
                    String header = homeCategoryItem.getHeader();
                    if (header == null) {
                        header = "";
                    }
                    hashMap.put("PRODUCT_RECOMMENDATION_HEADER", header);
                    String deeplink = homeCategoryItem.getDeeplink();
                    if (deeplink == null) {
                        deeplink = "";
                    }
                    hashMap.put("PRODUCT_RECOMMENDATION_DEEPLINK", deeplink);
                    String category = homeCategoryItem.getCategory();
                    hashMap.put("PRODUCT_RECOMMENDATION_CATEGORY", category != null ? category : "");
                    hashMap.put("PRODUCT_RECOMMENDATION_POSITION", Integer.valueOf(homeCategoryItem.getPosition() + 1));
                    drdVar.f308o.setValue(new xh(AnalyticType.LEANPLUM_EVENT, "impression/product_recommendation_list_view", hashMap, 8));
                }
            }
        }
    }
}