Booty Calls v1.2.156版本的 MD5 值为:d19a92661e6cea477b21e833435b8fcf
以下内容为反编译后的 DmmGamesAndroidStoreMenu.java 源代码,内容仅作参考
package com.dmm.games.android.menu.store;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.widget.Toast;
import com.dmm.games.android.menu.DmmGamesAndroidMenu;
import com.dmm.games.android.menu.internal.DmmGamesAndroidInternalMenu;
import com.dmm.games.android.util.store.DmmGamesAndroidStoreUtil;
import com.dmm.games.android.webview.DmmGamesWebViewActivity;
import com.dmm.games.api.mobile.model.ConfigGet;
import com.dmm.games.log.usage.EventKind;
import com.dmm.games.log.usage.UsageLogSender;
import com.dmm.games.sdk.setting.DevelopmentMode;
import com.dmm.games.sdk.setting.DmmGamesSdkSetting;
import com.dmm.games.sdk.setting.Environment;
public class DmmGamesAndroidStoreMenu implements DmmGamesAndroidInternalMenu {
private static final String DMM_ACCOUNT_PAGE_STG_URL_ADULT = "https://stg-accounts.dmm.co.jp/settings";
private static final String DMM_ACCOUNT_PAGE_STG_URL_GENERAL = "https://stg-accounts.dmm.com/settings";
private static final String DMM_ACCOUNT_PAGE_URL_ADULT = "https://accounts.dmm.co.jp/settings";
private static final String DMM_ACCOUNT_PAGE_URL_GENERAL = "https://accounts.dmm.com/settings";
private ConfigGet.Entry configGet;
private String secureId;
private DmmGamesSdkSetting setting;
private String uniqueId;
public ConfigGet.Entry getConfigGet() {
return this.configGet;
}
protected String getUniqueId() {
return this.uniqueId;
}
protected String getSecureId() {
return this.secureId;
}
public DmmGamesSdkSetting getSetting() {
return this.setting;
}
@Override
public void setAuthData(String str, String str2) {
this.uniqueId = str;
this.secureId = str2;
}
@Override
public void setConfigGet(ConfigGet.Entry entry) {
this.configGet = entry;
}
@Override
public void setSetting(DmmGamesSdkSetting dmmGamesSdkSetting) {
this.setting = dmmGamesSdkSetting;
}
@Override
public void openMenuItem(Context context, DmmGamesAndroidMenu.Kind kind) {
if (context == null) {
return;
}
UsageLogSender.sendEvent(EventKind.MENU, kind.name());
switch (AnonymousClass1.$SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind[kind.ordinal()]) {
case 1:
openDmmGamesStore(context);
return;
case 2:
openPointCharge(context);
return;
case 3:
openSettings(context);
return;
case 4:
openMyGame(context);
return;
case 5:
openCommunity(context);
return;
case 6:
openTerms(context);
return;
case 7:
openInquiry(context);
return;
case 8:
openAnnouncement(context);
return;
case 9:
openDmmAccountPage(context);
return;
case 10:
openUpdateView(context);
return;
default:
return;
}
}
static class AnonymousClass1 {
static final int[] $SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind;
static {
int[] iArr = new int[DmmGamesAndroidMenu.Kind.values().length];
$SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind = iArr;
try {
iArr[DmmGamesAndroidMenu.Kind.DMM_GAMES_STORE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind[DmmGamesAndroidMenu.Kind.POINT_CHARGE.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind[DmmGamesAndroidMenu.Kind.SETTINGS.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind[DmmGamesAndroidMenu.Kind.MY_GAME.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind[DmmGamesAndroidMenu.Kind.COMMUNITY.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind[DmmGamesAndroidMenu.Kind.TERM.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind[DmmGamesAndroidMenu.Kind.INQUIRY.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
$SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind[DmmGamesAndroidMenu.Kind.ANNOUNCEMENT.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
$SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind[DmmGamesAndroidMenu.Kind.DMM_ACCOUNT_PAGE.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
try {
$SwitchMap$com$dmm$games$android$menu$DmmGamesAndroidMenu$Kind[DmmGamesAndroidMenu.Kind.APPLICATION_UPDATE.ordinal()] = 10;
} catch (NoSuchFieldError unused10) {
}
}
}
private Intent setFlagIfContextInstance(Context context, Intent intent) {
if (intent == null) {
return null;
}
if (!(context instanceof Activity)) {
intent.setFlags(268435456);
}
return intent;
}
private void openDmmGamesStore(Context context) {
context.startActivity(setFlagIfContextInstance(context, DmmGamesAndroidStoreUtil.getGamesStoreTopIntent(context, this.configGet.getSite() == ConfigGet.Site.ADULT)));
}
private void openPointCharge(Context context) {
openWebView(context, this.configGet.getTitles().getPoint(), this.configGet.getWebView().getPoint());
}
private void openMyGame(Context context) {
context.startActivity(setFlagIfContextInstance(context, DmmGamesAndroidStoreUtil.getGamesStoreMyGameIntent(context, this.configGet.getSite() == ConfigGet.Site.ADULT)));
}
private void openAnnouncement(Context context) {
context.startActivity(setFlagIfContextInstance(context, DmmGamesAndroidStoreUtil.getGamesStoreAnnouncementIntent(context, this.configGet.getSite() == ConfigGet.Site.ADULT)));
}
private void openTerms(Context context) {
openBrowser(context, this.configGet.getPortalApp().getRule());
}
private void openSettings(Context context) {
openWebView(context, this.configGet.getTitles().getSetting(), this.configGet.getWebView().getSetting());
}
private void openCommunity(Context context) {
openBrowser(context, this.configGet.getPortalApp().getCommunity());
}
private void openInquiry(Context context) {
openWebView(context, this.configGet.getTitles().getInquiry(), this.configGet.getWebView().getInquiry());
}
private void openDmmAccountPage(Context context) {
boolean z = this.configGet.getSite() == ConfigGet.Site.ADULT;
boolean z2 = this.setting.getEnvironment() == Environment.PRODUCTION;
openBrowser(context, z ? z2 ? DMM_ACCOUNT_PAGE_URL_ADULT : DMM_ACCOUNT_PAGE_STG_URL_ADULT : z2 ? DMM_ACCOUNT_PAGE_URL_GENERAL : DMM_ACCOUNT_PAGE_STG_URL_GENERAL);
}
public void openBrowser(Context context, String str) {
Intent flagIfContextInstance = setFlagIfContextInstance(context, new Intent());
if (str != null && Uri.parse(str) != null) {
flagIfContextInstance.setAction("android.intent.action.VIEW");
flagIfContextInstance.setData(Uri.parse(str));
context.startActivity(flagIfContextInstance);
return;
}
Toast.makeText(context, R.string.dmm_games_no_community_this_game, 1).show();
}
private void openWebView(Context context, String str, String str2) {
Intent flagIfContextInstance = setFlagIfContextInstance(context, new Intent(context, (Class<?>) DmmGamesWebViewActivity.class));
flagIfContextInstance.putExtra(DmmGamesWebViewActivity.BUNDLE_KEY_PAGE_URL, str2);
flagIfContextInstance.putExtra(DmmGamesWebViewActivity.BUNDLE_KEY_DEVELOPMENT_MODE, this.setting.getDevelopmentMode().name());
flagIfContextInstance.putExtra(DmmGamesWebViewActivity.BUNDLE_KEY_UNIQUE_ID, this.uniqueId);
flagIfContextInstance.putExtra(DmmGamesWebViewActivity.BUNDLE_KEY_SECURE_ID, this.secureId);
flagIfContextInstance.putExtra(DmmGamesWebViewActivity.BUNDLE_KEY_PAGE_TITLE, str);
flagIfContextInstance.putExtra(DmmGamesWebViewActivity.BUNDLE_KEY_TIMEOUT_MILLIS, this.setting.getWebViewTimeoutMillis());
context.startActivity(flagIfContextInstance);
}
public void openUpdateView(Context context) {
if (this.setting.getDevelopmentMode() == DevelopmentMode.SANDBOX) {
Toast.makeText(context, R.string.dmm_games_open_update_sandbox_notice, 1).show();
openDmmGamesStore(context);
} else {
Intent gameDetailIntent = DmmGamesAndroidStoreUtil.getGameDetailIntent(context, this.configGet.getSite() == ConfigGet.Site.ADULT, this.setting.getAppId());
gameDetailIntent.setFlags(268435456);
context.startActivity(gameDetailIntent);
}
}
}