package com.ss.android.ugc.aweme.setting.page.datasave;

import X.2nK;
import X.2uR;
import X.367;
import X.3tP;
import X.3xi;
import X.42r;
import X.7he;
import X.9VI;
import X.C5122OJh;
import X.C5123OJi;
import X.C5125OJk;
import X.C5288OPr;
import X.C5289OPs;
import X.C5314OQr;
import X.CZv;
import X.Crj;
import X.ESC;
import X.M12;
import android.app.Activity;
import android.util.SparseArray;
import android.view.View;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.net.mutli.network.SpeedModeServiceImpl;
import com.ss.android.ugc.aweme.setting.page.BasePage;
import kotlin.h.b.n;

@CZv
public final class DataSaverSettingPage extends BasePage {
    public final Crj LJ = 7he.LIZ(new C5289OPs(this));
    public final String LJFF = "enter_data_use";
    public SparseArray LJI;

    static {
        Covode.recordClassIndex(105972);
    }

    private final 42r LIZIZ() {
        return (42r) this.LJ.getValue();
    }

    public final int LIZ() {
        return 2131561242;
    }

    public final View LIZ(int i) {
        if (this.LJI == null) {
            this.LJI = new SparseArray();
        }
        View view = (View) this.LJI.get(i);
        if (view != null) {
            return view;
        }
        View view2 = getView();
        if (view2 == null) {
            return null;
        }
        View findViewById = view2.findViewById(i);
        this.LJI.put(i, findViewById);
        return findViewById;
    }

    public final void LJI() {
        SparseArray sparseArray = this.LJI;
        if (sparseArray != null) {
            sparseArray.clear();
        }
    }

    public final /* synthetic */ void onDestroyView() {
        DataSaverSettingPage.super.onDestroyView();
        LJI();
    }

    public final void LIZ(Activity activity) {
        int i;
        M12.LIZ(activity);
        boolean LIZIZ = SpeedModeServiceImpl.LIZLLL().LIZIZ();
        if (!LIZIZ) {
            i = 2131823662;
        } else {
            i = 2131822407;
        }
        2uR r2 = new 2uR();
        String string = activity.getString(i);
        n.LIZIZ(string, "");
        367.LIZ(r2, string, new C5288OPr(this));
        activity.findViewById(2131371289).setNavActions(r2);
        if (LIZIZ) {
            LIZIZ().LIZ(new C5122OJh(this));
        }
        LIZIZ().LIZ(new C5123OJi(this));
        if (9VI.LIZ() && !ESC.LJ()) {
            42r LIZIZ2 = LIZIZ();
            String string2 = activity.getString(2131820864);
            n.LIZIZ(string2, "");
            LIZIZ2.LIZ(new 3xi(new 3tP(string2, true, false, 12)));
            LIZIZ().LIZ(new C5125OJk(this));
            LIZIZ().LIZ(new C5314OQr(this));
        }
        2nK.onEventV3(this.LJFF);
    }
}
