我需要帮助才能了解以下两个类中发生了什么。第一个活动类是启动活动。
public class UnityPlayerNativeActivity
extends com.unity3d.player.UnityPlayerNativeActivity
{
private ActivityProxyObjectHelper _proxyHelper;
protected void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
try
{
this._proxyHelper = new ActivityProxyObjectHelper(this);
this._proxyHelper.onCreate(paramBundle);
return;
}
catch (Exception paramBundle)
{
Log.i("Prime31", "Failed to create proxyHelper: " + paramBundle.getMessage());
}
}
}
第二节课是:
public class ActivityProxyObjectHelper
{
private Activity _context;
private List<Class<?>> _proxyClasses = new ArrayList();
public ActivityProxyObjectHelper(Activity paramActivity)
{
this._context = paramActivity;
}
protected void onCreate(Bundle paramBundle)
{
for (;;)
{
try
{
localObject1 = this._context.getPackageManager().getApplicationInfo(this._context.getPackageName(), 128).metaData;
localObject2 = ((Bundle)localObject1).keySet().iterator();
bool = ((Iterator)localObject2).hasNext();
if (bool) {
continue;
}
}
catch (PackageManager.NameNotFoundException localNameNotFoundException)
{
Object localObject1;
boolean bool;
String str;
Log.i("Prime31", "Failed to load meta-data, NameNotFound: " + localNameNotFoundException.getMessage());
continue;
}
catch (NullPointerException localNullPointerException)
{
Log.e("Prime31", "Failed to load meta-data, NullPointer: " + localNullPointerException.getMessage());
continue;
Object localObject2 = (Class)localNullPointerException.next();
try
{
((Class)localObject2).getMethod("onCreate", new Class[] { Bundle.class }).invoke(null, new Object[] { paramBundle });
}
catch (Exception localException1) {}
continue;
}
if (((Iterator)localObject1).hasNext()) {
continue;
}
return;
str = (String)((Iterator)localObject2).next();
}
}
}
我需要了解调用启动活动后最初ActivityProxyObjectHelper类的作用。这堂课的目的是什么?为什么要尝试获取元数据?什么是localObject1和localObject2试图做什么?