导航菜单

页面标题

页面副标题

Petal Maps v4.7.0.310001 - EnvironmentSettingActivity.java 源代码

正在查看: Petal Maps v4.7.0.310001 应用的 EnvironmentSettingActivity.java JAVA 源代码文件

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


package com.huawei.maps.app.setting.environment;

import android.app.Activity;
import android.os.Bundle;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.huawei.maps.app.R;
import com.huawei.maps.businessbase.manager.MapHelper;

public class EnvironmentSettingActivity extends Activity {
    public RadioGroup a;
    public RadioButton b;
    public RadioButton c;
    public RadioButton d;
    public RadioGroup e;
    public RadioButton f;
    public RadioButton g;

    public class a implements RadioGroup.OnCheckedChangeListener {
        public final String[] a;
        public final String b;
        public final String c;
        public final String d;

        public a(String[] strArr, String str, String str2, String str3) {
            this.a = strArr;
            this.b = str;
            this.c = str2;
            this.d = str3;
        }

        @Override
        public void onCheckedChanged(RadioGroup radioGroup, int i) {
            if (i == EnvironmentSettingActivity.this.b.getId()) {
                this.a[0] = this.b;
                jj2.m("PetalMapsTest2");
            } else if (i == EnvironmentSettingActivity.this.c.getId()) {
                this.a[0] = this.c;
                jj2.m("PetalMapsTest");
            } else if (i == EnvironmentSettingActivity.this.d.getId()) {
                this.a[0] = this.d;
                jj2.m("PetalMaps");
            } else {
                this.a[0] = this.b;
                jj2.m("PetalMapsTest2");
            }
            MapHelper.F2().X1();
            MapHelper.F2().J8();
            o41.b().updateEnvSetting();
        }
    }

    public class b implements RadioGroup.OnCheckedChangeListener {
        public final String[] a;
        public final String b;
        public final String c;

        public b(String[] strArr, String str, String str2) {
            this.a = strArr;
            this.b = str;
            this.c = str2;
        }

        @Override
        public void onCheckedChanged(RadioGroup radioGroup, int i) {
            if (i == EnvironmentSettingActivity.this.f.getId()) {
                this.a[0] = this.b;
                jj2.n("RealLocation");
            } else if (i == EnvironmentSettingActivity.this.g.getId()) {
                this.a[0] = this.c;
                jj2.n("MockLocation");
            } else {
                this.a[0] = this.b;
                jj2.n("RealLocation");
            }
        }
    }

    public final void f() {
        char c;
        String string = getApplicationContext().getResources().getString(R.string.env_change_stable);
        String string2 = getApplicationContext().getResources().getString(R.string.env_change_mirror);
        String string3 = getApplicationContext().getResources().getString(R.string.env_change_product);
        String a2 = jj2.a();
        String[] strArr = {string};
        if (this.a == null) {
            return;
        }
        int hashCode = a2.hashCode();
        if (hashCode == -2016349377) {
            if (a2.equals("PetalMapsTest2")) {
                c = 0;
            }
            c = 65535;
        } else if (hashCode != -181881055) {
            if (hashCode == 904787795 && a2.equals("PetalMapsTest")) {
                c = 1;
            }
            c = 65535;
        } else {
            if (a2.equals("PetalMaps")) {
                c = 2;
            }
            c = 65535;
        }
        if (c == 0) {
            ((RadioButton) this.a.getChildAt(1)).setChecked(true);
        } else if (c != 1) {
            ((RadioButton) this.a.getChildAt(0)).setChecked(true);
        } else {
            ((RadioButton) this.a.getChildAt(2)).setChecked(true);
        }
        this.a.setOnCheckedChangeListener(new a(strArr, string, string2, string3));
    }

    public final void g() {
        String string = getApplicationContext().getResources().getString(R.string.location_mode_real);
        String string2 = getApplicationContext().getResources().getString(R.string.location_mode_mock);
        String[] strArr = {string};
        String a2 = uk4.a();
        if (this.e == null) {
            return;
        }
        int hashCode = a2.hashCode();
        if (hashCode != -977049729) {
            if (hashCode == -956419181) {
                a2.equals("RealLocation");
            }
        } else if (a2.equals("MockLocation")) {
            ((RadioButton) this.e.getChildAt(1)).setChecked(true);
            this.e.setOnCheckedChangeListener(new b(strArr, string, string2));
        }
        ((RadioButton) this.e.getChildAt(0)).setChecked(true);
        this.e.setOnCheckedChangeListener(new b(strArr, string, string2));
    }

    @Override
    public void onCreate(Bundle bundle) {
        getTheme().applyStyle(com.huawei.maps.businessbase.R.style.AppActivityTheme, true);
        super.onCreate(bundle);
        setContentView(R.layout.activity_environment_settingctivity);
        this.a = (RadioGroup) findViewById(R.id.env_setting_rg);
        this.b = (RadioButton) findViewById(R.id.env_setting_rb_stable);
        this.c = (RadioButton) findViewById(R.id.env_setting_rb_mirror);
        this.d = (RadioButton) findViewById(R.id.env_setting_rb_product);
        this.e = (RadioGroup) findViewById(R.id.location_setting_rg);
        this.f = (RadioButton) findViewById(R.id.location_setting_rb_real);
        this.g = (RadioButton) findViewById(R.id.location_setting_rb_mock);
        f();
        g();
    }
}