package com.mexico.inloancash.activity;

import android.content.Context;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.ButterKnife;
import com.google.gson.Gson;
import com.indiaholacash.holacash.R;
import com.mexico.inloancash.bean.BaseBean;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import ඓ.ඓ.K.㿎.C0701;
import ῲ.ᨨ.㳳.C1841;

public class India_MyBank_Info_Activity extends BaseActivity {
    public Button mIndiaBtnUnBind;
    public ImageView mIndiaGonBack;
    public LinearLayout mIndiaLlBanks;
    public TextView mIndiaTvBankCount;
    public TextView mIndiaTvBankName;
    public TextView mIndiaTvTitle;

    /* renamed from: ඓ  reason: contains not printable characters */
    public String f2531;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public String f2532;

    /* renamed from: 㴹  reason: contains not printable characters */
    public String f2533;

    /* renamed from: 㿎  reason: contains not printable characters */
    public int f2534;

    /* renamed from: com.mexico.inloancash.activity.India_MyBank_Info_Activity$K  reason: contains not printable characters */
    public class C0438 implements Callback<String> {
        public C0438() {
        }

        @Override // retrofit2.Callback
        public void onFailure(Call<String> call, Throwable th) {
            India_MyBank_Info_Activity.this.f2296.m2185();
        }

        @Override // retrofit2.Callback
        public void onResponse(Call<String> call, Response<String> response) {
            if (response.isSuccessful()) {
                BaseBean baseBean = (BaseBean) new Gson().fromJson(response.body(), BaseBean.class);
                if (baseBean.getCode() == 200) {
                    India_MyBank_Info_Activity.this.setResult(0);
                    C1841.m4792((Context) India_MyBank_Info_Activity.this, "Berhasil diangkat");
                    India_MyBank_Info_Activity.this.finish();
                } else {
                    C1841.m4792((Context) India_MyBank_Info_Activity.this, baseBean.getMsg());
                }
            }
            India_MyBank_Info_Activity.this.f2296.m2185();
        }
    }

    @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, com.mexico.inloancash.activity.BaseActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.india_activity_mine_view_bank_layout);
        ButterKnife.m1066(this);
        this.mIndiaTvTitle.setText("Kartu Bank Saya");
        this.f2531 = getIntent().getStringExtra("id");
        this.f2533 = getIntent().getStringExtra("bank");
        this.f2532 = getIntent().getStringExtra("bankno");
        this.f2534 = getIntent().getIntExtra("radom", -1);
        this.mIndiaTvBankName.setText(this.f2533);
        String str = this.f2532;
        String substring = str.substring(str.length() - 4);
        TextView textView = this.mIndiaTvBankCount;
        textView.setText("**** **** **** " + substring);
        if (this.f2534 == 1) {
            this.mIndiaLlBanks.setBackgroundResource(R.mipmap.india_add_picture_bankcard_pic_2bg);
        } else {
            this.mIndiaLlBanks.setBackgroundResource(R.mipmap.india_add_picture_bankcard_pic_1bg);
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity
    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (i == 4) {
            finish();
        }
        return super.onKeyDown(i, keyEvent);
    }

    public void onViewClicked(View view) {
        int id = view.getId();
        if (id == R.id.logon_back) {
            finish();
        } else if (id == R.id.unBind) {
            m1468();
        }
    }

    /* renamed from: ؿ  reason: contains not printable characters */
    public void m1468() {
        this.f2296.m2183();
        C0701.f3707.m2131().m2117(this.f2531).enqueue(new C0438());
    }
}
