/*package*/ void onFragmentHostActivityCreate(JRFragmentHostActivity jrfh, JRSession session) { String uiCustomizationName = getArguments().getString(JRFragmentHostActivity.JR_UI_CUSTOMIZATION_CLASS); if (uiCustomizationName != null) { try { Class classRef = Class.forName(uiCustomizationName); final JRCustomInterface customInterface = (JRCustomInterface) classRef.newInstance(); if (customInterface instanceof JRCustomInterfaceConfiguration) { mCustomInterfaceConfiguration = (JRCustomInterfaceConfiguration) customInterface; if (mCustomInterfaceConfiguration.mColorButtons != null) { ColorButton.sEnabled = mCustomInterfaceConfiguration.mColorButtons; } } else if (customInterface instanceof JRCustomInterfaceView) { mCustomInterfaceConfiguration = new JRCustomInterfaceConfiguration() { { // Type safe because the type of the instantiated instance from the // class ref is run time type checked mProviderListHeader = (JRCustomInterfaceView) customInterface; } }; } else { Log.e(TAG, "Unexpected class from: " + uiCustomizationName); // Not possible at the moment, there are only two subclasses of abstract JRCustomInterface } } catch (ClassNotFoundException e) { customSigninReflectionError(uiCustomizationName, e); } catch (ClassCastException e) { customSigninReflectionError(uiCustomizationName, e); } catch (java.lang.InstantiationException e) { customSigninReflectionError(uiCustomizationName, e); } catch (IllegalAccessException e) { customSigninReflectionError(uiCustomizationName, e); } } }