package com.ifpdos.debugmenu.config;

import android.content.Context;
import android.os.Build;
import c.l.n;
import com.ifpdos.debugmenu.R;
import com.ifpdos.debugmenu.action.AdbSwitchAction;
import com.ifpdos.debugmenu.action.EMMCLifeAction;
import com.ifpdos.debugmenu.action.EnterSubPageAction;
import com.ifpdos.debugmenu.action.ShowBoardTypeAction;
import com.ifpdos.debugmenu.action.ShowCPUFreqVmanAction;
import com.ifpdos.debugmenu.action.ShowCPUtemperatureVmanAction;
import com.ifpdos.debugmenu.action.ShowCountryCode;
import com.ifpdos.debugmenu.action.ShowDdrSizeInformationAction;
import com.ifpdos.debugmenu.action.ShowFlashSizeInformationAction;
import com.ifpdos.debugmenu.action.ShowFreeRamAction;
import com.ifpdos.debugmenu.action.ShowHDCP1VmanAction;
import com.ifpdos.debugmenu.action.ShowHDCP2VmanAction;
import com.ifpdos.debugmenu.action.ShowHDCPTX1Action;
import com.ifpdos.debugmenu.action.ShowMacSocAction;
import com.ifpdos.debugmenu.action.ShowMacVmanAction;
import com.ifpdos.debugmenu.action.ShowNoOperationSleepSwitchStatus;
import com.ifpdos.debugmenu.action.ShowPwmDutyCycleAction;
import com.ifpdos.debugmenu.action.ShowPwmFrequencyAction;
import com.ifpdos.debugmenu.action.ShowScreenDisplayTimeAction;
import com.ifpdos.debugmenu.action.ShowSerialNumberVmanAction;
import com.ifpdos.debugmenu.action.ShowWidevineKeyAction;
import d.f.a.j2.b;
import d.f.a.j2.e.d;
import d.f.a.j2.e.f;
import d.f.a.j2.e.h;
import d.f.a.j2.e.j;
import java.util.ArrayList;
import java.util.List;

/* JADX INFO: loaded from: classes.dex */
public class RedLineConfig implements IConfig {
    private Context mContext;
    private List<d> mMainPageItems;
    private b mMenu;
    private n mOwner;

    public RedLineConfig(Context context, n nVar, b bVar) {
        this.mContext = context;
        this.mOwner = nVar;
        this.mMenu = bVar;
        ArrayList arrayList = new ArrayList();
        this.mMainPageItems = arrayList;
        arrayList.add(new f(nVar, getString(R.string.str_factory_ddr_size), new ShowDdrSizeInformationAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_flash_size), new ShowFlashSizeInformationAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_emmc_life_time), new EMMCLifeAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_board_type), new ShowBoardTypeAction(this.mContext)));
        if (Build.VERSION.SDK_INT < 33) {
            this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_mac), new ShowMacVmanAction(this.mContext)));
        } else {
            this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_mac_soc), new ShowMacSocAction(this.mContext)));
        }
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_hdcp1), new ShowHDCP1VmanAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_hdcp2), new ShowHDCP2VmanAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_hdcp_tx1), new ShowHDCPTX1Action(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_serial_number), new ShowSerialNumberVmanAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_pwm_frequency), new ShowPwmFrequencyAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_pwm_duty_cycle), new ShowPwmDutyCycleAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_cpu_temperature), new ShowCPUtemperatureVmanAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_cpu_freq), new ShowCPUFreqVmanAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_widevine_key), new ShowWidevineKeyAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_country_code), new ShowCountryCode(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_free_ram), new ShowFreeRamAction(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_factory_no_operation_sleep_switch_status), new ShowNoOperationSleepSwitchStatus(this.mContext)));
        this.mMainPageItems.add(new f(nVar, getString(R.string.str_screen_display_time), new ShowScreenDisplayTimeAction(this.mContext)));
        this.mMainPageItems.add(new h());
    }

    private String getString(int i2) {
        return this.mContext.getString(i2);
    }

    private EnterSubPageAction otherInfoPageAction() {
        ArrayList arrayList = new ArrayList();
        Context context = this.mContext;
        return new EnterSubPageAction(context, this.mMenu, context.getString(R.string.str_debug_open_settings), arrayList);
    }

    private EnterSubPageAction softwareInfoPageAction() {
        ArrayList arrayList = new ArrayList();
        Context context = this.mContext;
        return new EnterSubPageAction(context, this.mMenu, context.getString(R.string.str_software_info), arrayList);
    }

    private EnterSubPageAction softwareUpgradePageAction() {
        ArrayList arrayList = new ArrayList();
        Context context = this.mContext;
        return new EnterSubPageAction(context, this.mMenu, context.getString(R.string.str_debug_upgrade), arrayList);
    }

    private EnterSubPageAction systemDebugPageAction() {
        ArrayList arrayList = new ArrayList();
        arrayList.add(new j(this.mOwner, this.mContext.getString(R.string.str_facmenu_debug_adb_enable), new AdbSwitchAction(this.mContext)));
        Context context = this.mContext;
        return new EnterSubPageAction(context, this.mMenu, context.getString(R.string.str_debug_system_debug), arrayList);
    }

    @Override // com.ifpdos.debugmenu.config.IConfig
    public List<d> getMainPageItems() {
        return this.mMainPageItems;
    }

    @Override // com.ifpdos.debugmenu.config.IConfig
    public List<d> getPageItemsById(String str) {
        return null;
    }

    @Override // com.ifpdos.debugmenu.config.IConfig
    public String getPageName() {
        return getString(R.string.str_facmenu_red_line_menu);
    }
}
