private boolean initAndReportSuccess ( ) { // Load configuration. Config . loadConfig ( ) ; // Initialize storer, hashes, and analyzer. mDependencyAnalyzer = Config . createDepenencyAnalyzer ( ) ; // Establish if Tool is enabled. boolean isEnabled = establishIfEnabled ( ) ; // Return if not enabled or code should not be instrumented. if ( ! isEnabled || ! Config . X_INSTRUMENT_CODE_V || isEkstaziSystemClassLoader ( ) ) { return isEnabled ; } // Set the agent at runtime if not already set. Instrumentation instrumentation = EkstaziAgent . getInstrumentation ( ) ; if ( instrumentation == null ) { Log . d ( "Agent has not been set previously" ) ; instrumentation = DynamicEkstazi . initAgentAtRuntimeAndReportSuccess ( ) ; if ( instrumentation == null ) { Log . d ( "No Instrumentation object found; enabling Ekstazi without using any instrumentation" ) ; return true ; } } else { Log . d ( "Agent has been set previously" ) ; } return true ; }
Initializes this facade . This method should be invoked only once .