@Override public ActivityInfo getActivityInfo(ComponentName className, int flags) throws NameNotFoundException { String packageName = className.getPackageName(); AndroidManifest androidManifest = androidManifests.get(packageName); String activityName = className.getClassName(); ActivityData activityData = androidManifest.getActivityData(activityName); ActivityInfo activityInfo = new ActivityInfo(); activityInfo.packageName = packageName; activityInfo.name = activityName; if (activityData != null) { activityInfo.parentActivityName = activityData.getParentActivityName(); activityInfo.metaData = metaDataToBundle(activityData.getMetaData().getValueMap()); ResourceIndex resourceIndex = shadowsAdapter.getResourceLoader().getResourceIndex(); String themeRef; // Based on ShadowActivity if (activityData.getThemeRef() != null) { themeRef = activityData.getThemeRef(); } else { themeRef = androidManifest.getThemeRef(); } if (themeRef != null) { ResName style = ResName.qualifyResName(themeRef.replace("@", ""), packageName, "style"); activityInfo.theme = resourceIndex.getResourceId(style); } } activityInfo.applicationInfo = getApplicationInfo(packageName, flags); return activityInfo; }
private IntentServiceController( final ShadowsAdapter shadowsAdapter, final T service, final Intent intent) { super(shadowsAdapter, service, intent); shadowActivityThreadClassName = shadowsAdapter.getShadowActivityThreadClassName(); }