Perfume Of Love v2.14.9版本的 MD5 值为:16011aefc5a55805771706ce3b259b4e
以下内容为反编译后的 HyprMXBrowserActivity.java 源代码,内容仅作参考
package com.hyprmx.android.sdk.overlay;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet;
import androidx.core.app.ActivityCompat;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.viewbinding.ViewBindings;
import com.hyprmx.android.R;
import com.hyprmx.android.sdk.utility.HyprMXLog;
import java.util.Objects;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScope;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0007\b\u0000\u0018\u00002\u00020\u00012\u00020\u00022\u00020\u00032\u00020\u0004B\u0007¢\u0006\u0004\b\f\u0010\rJ\u000e\u0010\b\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u0005J\u000e\u0010\t\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u0005J\u000e\u0010\n\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u0005J\u000e\u0010\u000b\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u0005¨\u0006\u000e"}, d2 = {"Lcom/hyprmx/android/sdk/overlay/HyprMXBrowserActivity;", "Landroidx/appcompat/app/AppCompatActivity;", "Lcom/hyprmx/android/sdk/overlay/b;", "Lcom/hyprmx/android/sdk/overlay/m;", "Lcom/hyprmx/android/sdk/overlay/o;", "Landroid/view/View;", "view", "", "onNavigateForwardClicked", "onNavigateBackClicked", "onCloseClicked", "onShareSheetClicked", "<init>", "()V", "HyprMX-Mobile-Android-SDK_release"}, k = 1, mv = {1, 5, 1})
public final class HyprMXBrowserActivity extends AppCompatActivity implements b, m, o {
public final n b = new n(null, null, false, 7);
public final p c = new p();
public com.hyprmx.android.databinding.a d;
public com.hyprmx.android.sdk.overlay.a e;
public String f;
public String g;
public com.hyprmx.android.sdk.webview.f h;
@DebugMetadata(c = "com.hyprmx.android.sdk.overlay.HyprMXBrowserActivity$onActivityResult$1", f = "HyprMXBrowserActivity.kt", i = {}, l = {154}, m = "invokeSuspend", n = {}, s = {})
public static final class a extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
public int b;
public final int d;
public final int e;
public final Intent f;
public a(int i, int i2, Intent intent, Continuation<? super a> continuation) {
super(2, continuation);
this.d = i;
this.e = i2;
this.f = intent;
}
@Override
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new a(this.d, this.e, this.f, continuation);
}
@Override
public Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return new a(this.d, this.e, this.f, continuation).invokeSuspend(Unit.INSTANCE);
}
@Override
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.b;
if (i == 0) {
ResultKt.throwOnFailure(obj);
HyprMXBrowserActivity hyprMXBrowserActivity = HyprMXBrowserActivity.this;
int i2 = this.d;
int i3 = this.e;
Intent intent = this.f;
com.hyprmx.android.sdk.overlay.a aVar = hyprMXBrowserActivity.e;
Objects.requireNonNull(aVar, "null cannot be cast to non-null type com.hyprmx.android.sdk.presentation.PresentationEventPublisher");
com.hyprmx.android.sdk.presentation.k kVar = (com.hyprmx.android.sdk.presentation.k) aVar;
this.b = 1;
if (hyprMXBrowserActivity.c.a(hyprMXBrowserActivity, i2, i3, intent, kVar, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}
@Override
public Object a(Context context, int i, int i2, Intent intent, com.hyprmx.android.sdk.presentation.k kVar, Continuation<? super Unit> continuation) {
return this.c.a(context, i, i2, intent, kVar, continuation);
}
@Override
public void a(Activity activity) {
Intrinsics.checkNotNullParameter(activity, "activity");
this.c.a(activity);
}
@Override
public void a(boolean z) {
com.hyprmx.android.databinding.a aVar = this.d;
if (aVar == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
aVar = null;
}
aVar.c.c.setEnabled(z);
}
@Override
public void a(String[] permission, int i) {
Intrinsics.checkNotNullParameter(permission, "permission");
ActivityCompat.requestPermissions(this, permission, i);
}
@Override
public void c(boolean z) {
com.hyprmx.android.databinding.a aVar = this.d;
if (aVar == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
aVar = null;
}
aVar.b.c.setEnabled(z);
}
@Override
public void createCalendarEvent(String data) {
Intrinsics.checkNotNullParameter(data, "data");
this.b.createCalendarEvent(data);
}
@Override
public void e(boolean z) {
com.hyprmx.android.databinding.a aVar = this.d;
if (aVar == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
aVar = null;
}
aVar.b.b.setEnabled(z);
}
@Override
public void g() {
Intrinsics.checkNotNullParameter(this, "activity");
this.c.a((Activity) this);
}
public final com.hyprmx.android.sdk.presentation.n j() {
com.hyprmx.android.sdk.core.e eVar = com.hyprmx.android.sdk.core.o.a.g;
if (eVar == null) {
return null;
}
return eVar.b.H();
}
@Override
public void l() {
finish();
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), null, null, new a(i, i2, intent, null), 3, null);
}
@Override
public void onBackPressed() {
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar == null) {
return;
}
aVar.o();
}
public final void onCloseClicked(View view) {
Intrinsics.checkNotNullParameter(view, "view");
if (isFinishing()) {
HyprMXLog.d("Activity already finishing. Ignoring close click.");
return;
}
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar == null) {
return;
}
aVar.s();
}
@Override
public void onCreate(Bundle bundle) {
com.hyprmx.android.sdk.overlay.a aVar;
com.hyprmx.android.sdk.presentation.n j;
com.hyprmx.android.sdk.webview.f a2;
super.onCreate(bundle);
String str = null;
View inflate = getLayoutInflater().inflate(R.layout.hyprmx_browser, (ViewGroup) null, false);
int i = R.id.hyprmx_browser_footer;
View findChildViewById = ViewBindings.findChildViewById(inflate, i);
if (findChildViewById != null) {
int i2 = R.id.hyprmx_navigate_back;
ImageButton imageButton = (ImageButton) ViewBindings.findChildViewById(findChildViewById, i2);
if (imageButton != null) {
i2 = R.id.hyprmx_navigate_forward;
ImageButton imageButton2 = (ImageButton) ViewBindings.findChildViewById(findChildViewById, i2);
if (imageButton2 != null) {
com.hyprmx.android.databinding.b bVar = new com.hyprmx.android.databinding.b((ConstraintLayout) findChildViewById, imageButton, imageButton2);
int i3 = R.id.hyprmx_browser_header;
View findChildViewById2 = ViewBindings.findChildViewById(inflate, i3);
if (findChildViewById2 != null) {
int i4 = R.id.hyprmx_browser_title;
TextView textView = (TextView) ViewBindings.findChildViewById(findChildViewById2, i4);
if (textView != null) {
i4 = R.id.hyprmx_close_button;
ImageButton imageButton3 = (ImageButton) ViewBindings.findChildViewById(findChildViewById2, i4);
if (imageButton3 != null) {
i4 = R.id.hyprmx_share_sheet;
ImageButton imageButton4 = (ImageButton) ViewBindings.findChildViewById(findChildViewById2, i4);
if (imageButton4 != null) {
ConstraintLayout constraintLayout = (ConstraintLayout) inflate;
com.hyprmx.android.databinding.a aVar2 = new com.hyprmx.android.databinding.a(constraintLayout, bVar, new com.hyprmx.android.databinding.c((ConstraintLayout) findChildViewById2, textView, imageButton3, imageButton4), constraintLayout);
Intrinsics.checkNotNullExpressionValue(aVar2, "inflate(layoutInflater)");
this.d = aVar2;
setContentView(constraintLayout);
this.b.b = this;
Intent intent = getIntent();
if (intent != null) {
String stringExtra = intent.getStringExtra("placementName");
Intrinsics.checkNotNull(stringExtra);
Intrinsics.checkNotNullExpressionValue(stringExtra, "it.getStringExtra(PLACEMENT_NAME_KEY)!!");
Intrinsics.checkNotNullParameter(stringExtra, "<set-?>");
this.f = stringExtra;
String stringExtra2 = intent.getStringExtra("baseAdId");
Intrinsics.checkNotNull(stringExtra2);
Intrinsics.checkNotNullExpressionValue(stringExtra2, "it.getStringExtra(BASE_AD_ID_KEY)!!");
Intrinsics.checkNotNullParameter(stringExtra2, "<set-?>");
this.g = stringExtra2;
}
com.hyprmx.android.sdk.presentation.n j2 = j();
if (j2 != null) {
String str2 = this.f;
if (str2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("placementName");
str2 = null;
}
String str3 = this.g;
if (str3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("baseAdId");
str3 = null;
}
aVar = j2.a((b) this, str2, str3);
if (aVar != null) {
String m = aVar.m();
if (m == null) {
HyprMXLog.e("Unable to bind browser view model.");
finish();
} else {
com.hyprmx.android.sdk.presentation.n j3 = j();
if (j3 == null) {
a2 = null;
} else {
Context applicationContext = getApplicationContext();
Intrinsics.checkNotNullExpressionValue(applicationContext, "this@HyprMXBrowserActivity.applicationContext");
String str4 = this.f;
if (str4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("placementName");
str4 = null;
}
a2 = j3.a(applicationContext, str4, m);
}
this.h = a2;
com.hyprmx.android.sdk.presentation.n j4 = j();
if (j4 != null) {
j4.a(m, false);
}
com.hyprmx.android.sdk.webview.f fVar = this.h;
if (fVar != null) {
fVar.setId(R.id.hyprmx_webview);
}
com.hyprmx.android.databinding.a aVar3 = this.d;
if (aVar3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
aVar3 = null;
}
aVar3.a.addView(this.h);
ConstraintSet constraintSet = new ConstraintSet();
com.hyprmx.android.databinding.a aVar4 = this.d;
if (aVar4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
aVar4 = null;
}
constraintSet.clone(aVar4.a);
constraintSet.constrainHeight(R.id.hyprmx_webview, 0);
constraintSet.constrainWidth(R.id.hyprmx_webview, 0);
constraintSet.connect(R.id.hyprmx_webview, 6, R.id.hyprmx_browser_layout, 6);
constraintSet.connect(R.id.hyprmx_webview, 7, R.id.hyprmx_browser_layout, 7);
constraintSet.connect(R.id.hyprmx_webview, 4, R.id.hyprmx_browser_footer, 3);
constraintSet.connect(R.id.hyprmx_webview, 3, R.id.hyprmx_browser_header, 4);
com.hyprmx.android.databinding.a aVar5 = this.d;
if (aVar5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
aVar5 = null;
}
constraintSet.applyTo(aVar5.a);
aVar.a((com.hyprmx.android.sdk.overlay.a) this);
aVar.t();
com.hyprmx.android.sdk.webview.f fVar2 = this.h;
if (fVar2 != null) {
fVar2.setContainingActivity(this);
}
}
Unit unit = Unit.INSTANCE;
this.e = aVar;
j = j();
if (j != null) {
return;
}
String str5 = this.g;
if (str5 != null) {
str = str5;
} else {
Intrinsics.throwUninitializedPropertyAccessException("baseAdId");
}
j.a(str);
return;
}
}
aVar = null;
this.e = aVar;
j = j();
if (j != null) {
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(findChildViewById2.getResources().getResourceName(i4)));
}
i = i3;
}
}
throw new NullPointerException("Missing required view with ID: ".concat(findChildViewById.getResources().getResourceName(i2)));
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
}
@Override
public void onCreate(Bundle bundle, PersistableBundle persistableBundle) {
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar != null) {
aVar.b("onCreate");
}
super.onCreate(bundle, persistableBundle);
}
@Override
public void onDestroy() {
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar != null) {
aVar.b("onDestroy");
}
com.hyprmx.android.sdk.overlay.a aVar2 = this.e;
if (aVar2 != null) {
aVar2.j();
}
this.e = null;
com.hyprmx.android.sdk.webview.f fVar = this.h;
if (fVar != null) {
fVar.j();
}
this.h = null;
super.onDestroy();
}
public final void onNavigateBackClicked(View view) {
Intrinsics.checkNotNullParameter(view, "view");
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar == null) {
return;
}
aVar.k();
}
public final void onNavigateForwardClicked(View view) {
Intrinsics.checkNotNullParameter(view, "view");
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar == null) {
return;
}
aVar.n();
}
@Override
public void onPause() {
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar != null) {
aVar.b("onPause");
}
super.onPause();
}
@Override
public void onRequestPermissionsResult(int i, String[] permissions, int[] grantResults) {
Intrinsics.checkNotNullParameter(permissions, "permissions");
Intrinsics.checkNotNullParameter(grantResults, "grantResults");
super.onRequestPermissionsResult(i, permissions, grantResults);
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar == null) {
return;
}
boolean z = true;
aVar.a((((grantResults.length == 0) ^ true) && grantResults[0] == 0) ? false : false, i);
}
@Override
public void onResume() {
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar != null) {
aVar.b("onResume");
}
super.onResume();
}
public final void onShareSheetClicked(View view) {
Intrinsics.checkNotNullParameter(view, "view");
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar == null) {
return;
}
aVar.f();
}
@Override
public void onStart() {
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar != null) {
aVar.b("onStart");
}
super.onStart();
}
@Override
public void onStop() {
com.hyprmx.android.sdk.overlay.a aVar = this.e;
if (aVar != null) {
aVar.b("onStop");
}
super.onStop();
}
@Override
public void openOutsideApplication(String url) {
Intrinsics.checkNotNullParameter(url, "url");
this.b.openOutsideApplication(url);
}
@Override
public void openShareSheet(String data) {
Intrinsics.checkNotNullParameter(data, "data");
this.b.openShareSheet(data);
}
@Override
public Object savePhoto(String str, Continuation<? super Unit> continuation) {
return this.b.savePhoto(str, continuation);
}
@Override
public void setOverlayPresented(boolean z) {
this.b.e = z;
}
@Override
public void setTitleText(String title) {
Intrinsics.checkNotNullParameter(title, "title");
com.hyprmx.android.databinding.a aVar = this.d;
if (aVar == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
aVar = null;
}
aVar.c.b.setText(title);
}
@Override
public void showHyprMXBrowser(String placementName, String baseAdId) {
Intrinsics.checkNotNullParameter(placementName, "placementName");
Intrinsics.checkNotNullParameter(baseAdId, "baseAdId");
this.b.showHyprMXBrowser(placementName, baseAdId);
}
@Override
public void showPlatformBrowser(String url) {
Intrinsics.checkNotNullParameter(url, "url");
this.b.showPlatformBrowser(url);
}
}