GoooBet v1.0版本的 MD5 值为:ff9748f16167bfd7735b669c0a9931c5

以下内容为反编译后的 AboutDialogActivity.java 源代码,内容仅作参考


package com.appsgeyser.sdk.ui;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.appsgeyser.sdk.R;
import com.appsgeyser.sdk.configuration.Configuration;
import com.appsgeyser.sdk.configuration.models.ConfigPhp;
import com.appsgeyser.sdk.server.implementation.AppsgeyserServerClient;
import com.mopub.common.AdType;

public class AboutDialogActivity extends Activity {
    private TextView appName;
    private TextView appVersion;
    private ImageView appsgeyserDescriptionLogoImageView;
    private ImageView closeScreenImageView;
    private Configuration config;
    private ConfigPhp configPhp;
    private String description;
    private TextView descriptionTextView;
    private String descriptionType;
    private ImageView logoImageView;
    private Button privacy;
    private TextView templateVersion;
    private Button tos;

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.appsgeysersdk_about_dialog);
        if (bundle != null) {
            this.configPhp = (ConfigPhp) bundle.getParcelable("config_php_key");
        } else {
            Intent intent = getIntent();
            if (intent != null) {
                this.configPhp = (ConfigPhp) intent.getParcelableExtra("config_php_key");
            }
        }
        ConfigPhp configPhp = this.configPhp;
        if (configPhp != null) {
            this.descriptionType = configPhp.getAboutScreenDescriptionType();
            this.description = this.configPhp.getAboutScreenDescription();
        }
        init();
    }

    private void init() {
        try {
            Configuration configuration = Configuration.getInstance(this);
            this.config = configuration;
            String applicationId = configuration.getApplicationId();
            this.logoImageView = (ImageView) findViewById(R.id.logo);
            this.appsgeyserDescriptionLogoImageView = (ImageView) findViewById(R.id.appsgeysersdk_about_appsgeyser_logo);
            this.closeScreenImageView = (ImageView) findViewById(R.id.close_about_screen);
            this.descriptionTextView = (TextView) findViewById(R.id.description);
            this.appName = (TextView) findViewById(R.id.about_app_name);
            this.appVersion = (TextView) findViewById(R.id.app_version);
            this.templateVersion = (TextView) findViewById(R.id.template_version);
            this.tos = (Button) findViewById(R.id.app_tos);
            this.privacy = (Button) findViewById(R.id.app_privacy);
            try {
                PackageManager packageManager = getPackageManager();
                String str = (String) packageManager.getApplicationLabel(packageManager.getApplicationInfo(getPackageName(), 128));
                this.appVersion.setText("Version " + getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
                this.appName.setText(str);
            } catch (PackageManager.NameNotFoundException e) {
                e.printStackTrace();
            }
            final String str2 = "http://www.appsgeyser.com?pn=" + getPackageName();
            this.logoImageView.setImageDrawable(getPackageManager().getApplicationIcon(getPackageName()));
            this.logoImageView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(str2));
                    intent.setFlags(268435456);
                    AboutDialogActivity.this.startActivity(intent);
                    AppsgeyserServerClient.getInstance().sendAboutDialogVisitSite(AboutDialogActivity.this.getApplicationContext());
                }
            });
            this.closeScreenImageView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    AboutDialogActivity.this.finish();
                }
            });
            this.templateVersion.setText(getString(R.string.appsgeysersdk_build, new Object[]{"2.25.s"}));
            String string = getResources().getString(R.string.appsgeysersdk_description_with_publish_name);
            if (this.config.getPublisherName().length() == 0) {
                string = getResources().getString(R.string.appsgeysersdk_description_without_publish_name);
            }
            if (this.descriptionType != null) {
                String str3 = this.descriptionType;
                char c = 65535;
                int hashCode = str3.hashCode();
                if (hashCode != -1349088399) {
                    if (hashCode != 1502878931) {
                        if (hashCode == 1503108181 && str3.equals("appsgeyser_text")) {
                            c = 0;
                        }
                    } else if (str3.equals("appsgeyser_logo")) {
                        c = 1;
                    }
                } else if (str3.equals(AdType.CUSTOM)) {
                    c = 2;
                }
                if (c == 0) {
                    this.appsgeyserDescriptionLogoImageView.setVisibility(8);
                    this.descriptionTextView.setVisibility(0);
                } else if (c == 1) {
                    this.appsgeyserDescriptionLogoImageView.setVisibility(0);
                    this.descriptionTextView.setVisibility(8);
                } else if (c == 2) {
                    string = this.description;
                    this.appsgeyserDescriptionLogoImageView.setVisibility(8);
                    this.descriptionTextView.setVisibility(0);
                } else {
                    this.appsgeyserDescriptionLogoImageView.setVisibility(8);
                    this.descriptionTextView.setVisibility(0);
                }
            }
            this.descriptionTextView.setText(Html.fromHtml(string.replace("PUB_NAME", this.config.getPublisherName()).replace("APPSGEYSER_URL", str2).replace("APP_VERSION", "").replace("APP_ID", applicationId)));
            this.descriptionTextView.setLinksClickable(true);
            this.descriptionTextView.setMovementMethod(LinkMovementMethod.getInstance());
            this.tos.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    Intent data = new Intent("android.intent.action.VIEW").setData(Uri.parse("http://www.appsgeyser.com/tos/?pn=" + AboutDialogActivity.this.getPackageName()));
                    data.setFlags(268435456);
                    AboutDialogActivity.this.startActivity(data);
                }
            });
            this.privacy.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    Intent data = new Intent("android.intent.action.VIEW").setData(Uri.parse("http://www.appsgeyser.com/privacy/app/?pn=" + AboutDialogActivity.this.getPackageName()));
                    data.setFlags(268435456);
                    AboutDialogActivity.this.startActivity(data);
                }
            });
        } catch (Exception e2) {
            e2.printStackTrace();
        }
    }

    @Override
    public void onSaveInstanceState(Bundle bundle) {
        bundle.putParcelable("config_php_key", this.configPhp);
        super.onSaveInstanceState(bundle);
    }
}