Peach VPN v4.0版本的 MD5 值为:44c7a87caba90fec9b7945dd44651111
以下内容为反编译后的 Dialogify.java 源代码,内容仅作参考
package com.peacholo.peach.Dialog;
import android.app.Activity;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import com.peacholo.peach.Helper.IntentHelper;
import com.peacholo.peach.Helper.InternetManager;
import com.peacholo.peach.Listener.OnConfirmListener;
import com.peacholo.peach.Listener.OnRetryRequestedListener;
import com.peacholo.peach.Manager.AppSettingManager;
import com.peacholo.peach.Model.UpdateDetails;
import com.peacholo.peach.R;
import npdcc0.DtcLoader;
import npdcc0.hidden.Hidden0;
public class Dialogify {
class AnonymousClass1 implements View.OnClickListener {
final Activity val$activity;
final Dialog val$dialog;
final OnRetryRequestedListener val$listener;
AnonymousClass1(Dialog dialog, OnRetryRequestedListener onRetryRequestedListener, Activity activity) {
this.val$dialog = dialog;
this.val$listener = onRetryRequestedListener;
this.val$activity = activity;
}
@Override
public void onClick(View view) {
this.val$dialog.dismiss();
int id = view.getId();
if (id == R.id.crdNegative) {
System.exit(0);
return;
}
if (id != R.id.crdPositive) {
return;
}
if (!InternetManager.isNetworkConnected()) {
Dialogify.popInternetAlertUp(this.val$activity, this.val$listener);
return;
}
OnRetryRequestedListener onRetryRequestedListener = this.val$listener;
if (onRetryRequestedListener != null) {
onRetryRequestedListener.onRetryRequested();
}
}
}
class AnonymousClass2 implements View.OnClickListener {
final Dialog val$dialog;
final OnConfirmListener val$onConfirmListener;
AnonymousClass2(Dialog dialog, OnConfirmListener onConfirmListener) {
this.val$dialog = dialog;
this.val$onConfirmListener = onConfirmListener;
}
@Override
public void onClick(View view) {
OnConfirmListener onConfirmListener;
this.val$dialog.dismiss();
int id = view.getId();
if (id != R.id.crdNegative) {
if (id == R.id.crdPositive && (onConfirmListener = this.val$onConfirmListener) != null) {
onConfirmListener.onConfirmClicked();
return;
}
return;
}
OnConfirmListener onConfirmListener2 = this.val$onConfirmListener;
if (onConfirmListener2 != null) {
onConfirmListener2.onRejectClicked();
}
}
}
class AnonymousClass3 implements View.OnClickListener {
final Dialog val$dialog;
final OnConfirmListener val$onConfirmListener;
AnonymousClass3(Dialog dialog, OnConfirmListener onConfirmListener) {
this.val$dialog = dialog;
this.val$onConfirmListener = onConfirmListener;
}
@Override
public void onClick(View view) {
OnConfirmListener onConfirmListener;
this.val$dialog.dismiss();
int id = view.getId();
if (id != R.id.crdNegative) {
if (id == R.id.crdPositive && (onConfirmListener = this.val$onConfirmListener) != null) {
onConfirmListener.onConfirmClicked();
return;
}
return;
}
OnConfirmListener onConfirmListener2 = this.val$onConfirmListener;
if (onConfirmListener2 != null) {
onConfirmListener2.onRejectClicked();
}
}
}
class AnonymousClass4 implements View.OnClickListener {
final Activity val$activity;
final Dialog val$dialog;
final UpdateDetails val$updateDetails;
AnonymousClass4(Activity activity, UpdateDetails updateDetails, Dialog dialog) {
this.val$activity = activity;
this.val$updateDetails = updateDetails;
this.val$dialog = dialog;
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.crdDirect:
IntentHelper.openUrl(this.val$activity, AppSettingManager.getDirectLink(this.val$activity));
break;
case R.id.crdGooglePlay:
Activity activity = this.val$activity;
IntentHelper.openPlayStoreAppPage(activity, activity.getPackageName());
break;
case R.id.crdTelegram:
IntentHelper.openTelegramChannel(this.val$activity, "PeachSoft");
break;
}
if (this.val$updateDetails.isForce()) {
return;
}
this.val$dialog.dismiss();
}
}
class AnonymousClass5 implements View.OnClickListener {
final Activity val$activity;
final Dialog val$dialog;
AnonymousClass5(Dialog dialog, Activity activity) {
this.val$dialog = dialog;
this.val$activity = activity;
}
@Override
public void onClick(View view) {
this.val$dialog.dismiss();
if (view.getId() != R.id.crdPositive) {
return;
}
IntentHelper.shareApplicationUrl(this.val$activity);
}
}
class AnonymousClass6 implements View.OnClickListener {
final Dialog val$dialog;
final OnConfirmListener val$onConfirmListener;
AnonymousClass6(Dialog dialog, OnConfirmListener onConfirmListener) {
this.val$dialog = dialog;
this.val$onConfirmListener = onConfirmListener;
}
@Override
public void onClick(View view) {
OnConfirmListener onConfirmListener;
this.val$dialog.dismiss();
int id = view.getId();
if (id != R.id.crdNegative) {
if (id == R.id.crdPositive && (onConfirmListener = this.val$onConfirmListener) != null) {
onConfirmListener.onConfirmClicked();
return;
}
return;
}
OnConfirmListener onConfirmListener2 = this.val$onConfirmListener;
if (onConfirmListener2 != null) {
onConfirmListener2.onRejectClicked();
}
}
}
class AnonymousClass7 implements OnConfirmListener {
final Activity val$activity;
AnonymousClass7(Activity activity) {
this.val$activity = activity;
}
@Override
public void onConfirmClicked() {
Activity activity = this.val$activity;
Dialogify.popYesOrNoAlertUp(activity, activity.getString(R.string.cdf_title), this.val$activity.getString(R.string.cds_msg), this.val$activity.getString(R.string.cds_positive_lbl), this.val$activity.getString(R.string.cds_negative_lbl), new OnConfirmListener() {
@Override
public void onConfirmClicked() {
String packageName = AnonymousClass7.this.val$activity.getPackageName();
try {
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=" + packageName));
intent.setPackage("com.android.vending");
AnonymousClass7.this.val$activity.startActivity(intent);
} catch (ActivityNotFoundException unused) {
AnonymousClass7.this.val$activity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=" + packageName)));
}
}
@Override
public void onRejectClicked() {
}
});
}
@Override
public void onRejectClicked() {
}
}
class AnonymousClass8 implements View.OnClickListener {
final Dialog val$dialog;
final OnConfirmListener val$onConfirmListener;
AnonymousClass8(Dialog dialog, OnConfirmListener onConfirmListener) {
this.val$dialog = dialog;
this.val$onConfirmListener = onConfirmListener;
}
@Override
public void onClick(View view) {
OnConfirmListener onConfirmListener;
this.val$dialog.dismiss();
int id = view.getId();
if (id != R.id.crdNegative) {
if (id == R.id.crdPositive && (onConfirmListener = this.val$onConfirmListener) != null) {
onConfirmListener.onConfirmClicked();
return;
}
return;
}
OnConfirmListener onConfirmListener2 = this.val$onConfirmListener;
if (onConfirmListener2 != null) {
onConfirmListener2.onRejectClicked();
}
}
}
static {
DtcLoader.registerNativesForClass(42, Dialogify.class);
Hidden0.special_clinit_42_140(Dialogify.class);
}
private static native boolean canPopCommentDialog(Context context);
public static native boolean canShowShareDialog(Activity activity);
public static native Dialog getACProgressDialog(Activity activity);
public static native Dialog getDCProgressDialog(Activity activity);
public static native boolean popCommentDialogUp(Activity activity);
public static native void popConfirmDisconnectAlertUp(Activity activity, OnConfirmListener onConfirmListener);
public static native void popInternetAlertUp(Activity activity, OnRetryRequestedListener onRetryRequestedListener);
public static native void popPermissionGrantAlertUp(Activity activity, OnConfirmListener onConfirmListener);
public static native void popServerNotFoundAlertUp(Activity activity, OnConfirmListener onConfirmListener);
public static native void popShareDialogUp(Activity activity);
public static native void popUpdateDialogUp(Activity activity);
public static native void popYesOrNoAlertUp(Activity activity, String str, String str2, String str3, String str4, OnConfirmListener onConfirmListener);
private static native void showRateDialog(Activity activity);
}