正在查看: Cashalo v2.25.0.0 应用的 DynamicLaunchActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cashalo v2.25.0.0 应用的 DynamicLaunchActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.snap.stuffing.lib;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import com.fullstory.FS;
import com.snap.stuffing.api.DynamicAppManager;
import dagger.android.AndroidInjection;
import javax.inject.Inject;
import kotlin.io.path.LinkFollowing$;
public class DynamicLaunchActivity extends Activity {
private static final String TAG = "DynamicLaunchActivity";
@Inject
DynamicAppManager dynamicAppManager;
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
FS.log_d(TAG, String.format("onCreate %s", bundle));
AndroidInjection.inject(this);
String defaultActivityClassName = this.dynamicAppManager.getDefaultActivityClassName();
if (defaultActivityClassName == null) {
throw new IllegalArgumentException("No default activity for appFamily " + this.dynamicAppManager.getApplicationFamily());
}
launchActivity(defaultActivityClassName);
}
@Override
protected void onResume() {
super.onResume();
FS.log_d(TAG, "onResume");
}
@Override
protected void onDestroy() {
super.onDestroy();
FS.log_d(TAG, "onDestroy");
}
@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
FS.log_d(TAG, String.format("onNewIntent %s", intent));
}
private void launchActivity(String str) {
try {
launchActivity(Class.forName(str));
} catch (ClassNotFoundException e) {
FS.log_e(TAG, "Failed to start activity " + str, e);
}
}
private void launchActivity(Class<?> cls) {
Intent intent;
Intent intent2 = getIntent();
if (intent2 != null) {
intent = (Intent) intent2.clone();
intent.setComponent(new ComponentName(this, cls));
if (Build.VERSION.SDK_INT >= 26) {
LinkFollowing$.ExternalSyntheticApiModelOutline0.m(intent, 2097152);
}
} else {
intent = new Intent(this, cls);
}
FS.log_d(TAG, String.format("Dynamically launching activity class: %s with intent %s", cls, intent));
startActivity(intent);
finish();
}
}