what-the-bank/sources/com/huawei/hms/update/note/NotInstalledHmsResolution.java

94 lines
3.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.huawei.hms.update.note;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.view.KeyEvent;
import com.huawei.hms.activity.IBridgeActivityDelegate;
import com.huawei.hms.availableupdate.b;
import com.huawei.hms.support.log.HMSLog;
import com.huawei.hms.update.ui.NotInstalledHmsDialogHelper;
/* loaded from: classes2.dex */
public class NotInstalledHmsResolution implements IBridgeActivityDelegate {
private Dialog a;
private Activity b;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public static class a implements DialogInterface.OnClickListener {
private final Activity a;
public a(Activity activity) {
this.a = activity;
}
@Override // android.content.DialogInterface.OnClickListener
public void onClick(DialogInterface dialogInterface, int i) {
HMSLog.i("NotInstalledHmsResolution", "<Dialog onClick>");
this.a.finish();
}
}
private void a(Activity activity) {
a();
this.a = NotInstalledHmsDialogHelper.getDialogBuilder(activity).setPositiveButton(NotInstalledHmsDialogHelper.getConfirmResId(activity), new a(activity)).show();
}
@Override // com.huawei.hms.activity.IBridgeActivityDelegate
public int getRequestCode() {
HMSLog.i("NotInstalledHmsResolution", "<Resolution getRequestCode>");
return 0;
}
@Override // com.huawei.hms.activity.IBridgeActivityDelegate
public void onBridgeActivityCreate(Activity activity) {
HMSLog.i("NotInstalledHmsResolution", "<Resolution onBridgeActivityCreate>");
if (activity != null && !activity.isFinishing()) {
this.b = activity;
b.b.a(activity);
a(activity);
return;
}
HMSLog.e("NotInstalledHmsResolution", "<Resolution onBridgeActivityCreate> activity is null or finishing");
}
@Override // com.huawei.hms.activity.IBridgeActivityDelegate
public void onBridgeActivityDestroy() {
HMSLog.i("NotInstalledHmsResolution", "<Resolution onBridgeActivityDestroy>");
a();
b.b.b(this.b);
}
@Override // com.huawei.hms.activity.IBridgeActivityDelegate
public boolean onBridgeActivityResult(int i, int i2, Intent intent) {
HMSLog.i("NotInstalledHmsResolution", "<Resolution onBridgeActivityResult>");
return false;
}
@Override // com.huawei.hms.activity.IBridgeActivityDelegate
public void onBridgeConfigurationChanged() {
HMSLog.i("NotInstalledHmsResolution", "<Resolution onBridgeConfigurationChanged>");
Activity activity = this.b;
if (activity != null && !activity.isFinishing()) {
a(this.b);
} else {
HMSLog.e("NotInstalledHmsResolution", "<Resolution onBridgeActivityCreate> mActivity is null or finishing");
}
}
@Override // com.huawei.hms.activity.IBridgeActivityDelegate
public void onKeyUp(int i, KeyEvent keyEvent) {
HMSLog.i("NotInstalledHmsResolution", "<Resolution onKeyUp>");
}
private void a() {
Dialog dialog = this.a;
if (dialog == null || !dialog.isShowing()) {
return;
}
this.a.cancel();
}
}