public RbnfLenientScannerProvider getLenientScannerProvider ( ) { // there's a potential race condition if two threads try to set/get the scanner at // the same time, but you get what you get, and you shouldn't be using this from // multiple threads anyway. if ( scannerProvider == null && lenientParse && ! lookedForScanner ) { try { lookedForScanner = true ; Class < ? > cls = Class . forName ( "android.icu.impl.text.RbnfScannerProviderImpl" ) ; RbnfLenientScannerProvider provider = ( RbnfLenientScannerProvider ) cls . newInstance ( ) ; setLenientScannerProvider ( provider ) ; } catch ( Exception e ) { // any failure, we just ignore and return null } } return scannerProvider ; }
Returns the lenient scanner provider . If none was set and lenient parse is enabled this will attempt to instantiate a default scanner setting it if it was successful . Otherwise this returns false .