public void scheduleAfterBackgroundWakeup ( Context context , List < ScanResult > scanResults ) { if ( scanResults != null ) { mBackgroundScanResultQueue . addAll ( scanResults ) ; } synchronized ( this ) { // We typically get a bunch of calls in a row here, separated by a few millis. Only do this once. if ( System . currentTimeMillis ( ) - mScanJobScheduleTime > MIN_MILLIS_BETWEEN_SCAN_JOB_SCHEDULING ) { LogManager . d ( TAG , "scheduling an immediate scan job because last did " + ( System . currentTimeMillis ( ) - mScanJobScheduleTime ) + "seconds ago." ) ; mScanJobScheduleTime = System . currentTimeMillis ( ) ; } else { LogManager . d ( TAG , "Not scheduling an immediate scan job because we just did recently." ) ; return ; } } ScanState scanState = ScanState . restore ( context ) ; schedule ( context , scanState , true ) ; }
must exist on another branch until the SDKs are released .