Source:
private final void broadcastTimeout ( ) { synchronized ( this ) { if ( ( mOrderedBroadcasts.size ( ) ) == 0 ) { return ; } long now = android.os.SystemClock.uptimeMillis ( ) ; com.android.server.am.BroadcastRecord r = mOrderedBroadcasts.get ( 0 ) ; if ( ( ( r.startTime ) + ( com.android.server.am.ActivityManagerService.BROADCAST_TIMEOUT ) ) > now ) { if ( com.android.server.am.ActivityManagerService.DEBUG_BROADCAST ) android.util.Log.v ( com.android.server.am.ActivityManagerService.TAG , ( ( ( "Premature timeout @ " + now ) + ": resetting BROADCAST_TIMEOUT_MSG for " ) + ( ( r.startTime ) + ( com.android.server.am.ActivityManagerService.BROADCAST_TIMEOUT ) ) ) ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.server.am.ActivityManagerService.BROADCAST_TIMEOUT_MSG ) ; mHandler.sendMessageAtTime ( msg , ( ( r.startTime ) + ( com.android.server.am.ActivityManagerService.BROADCAST_TIMEOUT ) ) ) ; return ; } android.util.Log.w ( com.android.server.am.ActivityManagerService.TAG , ( ( ( "Timeout of broadcast " + r ) + " - receiver=" ) + ( r.receiver ) ) ) ; r.startTime = now ; ( r.anrCount ) ++ ; if ( ( r.nextReceiver ) <= 0 ) { android.util.Log.w ( com.android.server.am.ActivityManagerService.TAG , "Timeout on receiver with nextReceiver <= 0" ) ; return ; } com.android.server.am.ProcessRecord app = null ; java.lang.Object curReceiver = r.receivers.get ( ( ( r.nextReceiver ) - 1 ) ) ; android.util.Log.w ( com.android.server.am.ActivityManagerService.TAG , ( "Receiver during timeout: " + curReceiver ) ) ; logBroadcastReceiverDiscard ( r ) ; if ( curReceiver instanceof com.android.server.am.BroadcastFilter ) { com.android.server.am.BroadcastFilter bf = ( ( com.android.server.am.BroadcastFilter ) ( curReceiver ) ) ; if ( ( ( bf.receiverList.pid ) != 0 ) && ( ( bf.receiverList.pid ) != ( MY_PID ) ) ) { synchronized ( this . mPidsSelfLocked ) { app = this . mPidsSelfLocked.get ( bf.receiverList.pid ) ; } } } else { app = r.curApp ; } if ( app != null ) { appNotRespondingLocked ( app , null , null , ( "Broadcast of " + ( r.intent.toString ( ) ) ) ) ; } if ( ( mPendingBroadcast ) == r ) { mPendingBroadcast = null ; } finishReceiverLocked ( r.receiver , r.resultCode , r.resultData , r.resultExtras , r.resultAbort , true ) ; scheduleBroadcastsLocked ( ) ; } }

Target:
private final void broadcastTimeout ( ) { synchronized ( this ) { if ( ( mOrderedBroadcasts.size ( ) ) == 0 ) { return ; } long now = android.os.SystemClock.uptimeMillis ( ) ; com.android.server.am.BroadcastRecord r = mOrderedBroadcasts.get ( 0 ) ; if ( ( ( r.receiverTime ) + ( com.android.server.am.ActivityManagerService.BROADCAST_TIMEOUT ) ) > now ) { if ( com.android.server.am.ActivityManagerService.DEBUG_BROADCAST ) android.util.Log.v ( com.android.server.am.ActivityManagerService.TAG , ( ( ( "Premature timeout @ " + now ) + ": resetting BROADCAST_TIMEOUT_MSG for " ) + ( ( r.receiverTime ) + ( com.android.server.am.ActivityManagerService.BROADCAST_TIMEOUT ) ) ) ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.server.am.ActivityManagerService.BROADCAST_TIMEOUT_MSG ) ; mHandler.sendMessageAtTime ( msg , ( ( r.receiverTime ) + ( com.android.server.am.ActivityManagerService.BROADCAST_TIMEOUT ) ) ) ; return ; } android.util.Log.w ( com.android.server.am.ActivityManagerService.TAG , ( ( ( "Timeout of broadcast " + r ) + " - receiver=" ) + ( r.receiver ) ) ) ; r.receiverTime = now ; ( r.anrCount ) ++ ; if ( ( r.nextReceiver ) <= 0 ) { android.util.Log.w ( com.android.server.am.ActivityManagerService.TAG , "Timeout on receiver with nextReceiver <= 0" ) ; return ; } com.android.server.am.ProcessRecord app = null ; java.lang.Object curReceiver = r.receivers.get ( ( ( r.nextReceiver ) - 1 ) ) ; android.util.Log.w ( com.android.server.am.ActivityManagerService.TAG , ( "Receiver during timeout: " + curReceiver ) ) ; logBroadcastReceiverDiscard ( r ) ; if ( curReceiver instanceof com.android.server.am.BroadcastFilter ) { com.android.server.am.BroadcastFilter bf = ( ( com.android.server.am.BroadcastFilter ) ( curReceiver ) ) ; if ( ( ( bf.receiverList.pid ) != 0 ) && ( ( bf.receiverList.pid ) != ( MY_PID ) ) ) { synchronized ( this . mPidsSelfLocked ) { app = this . mPidsSelfLocked.get ( bf.receiverList.pid ) ; } } } else { app = r.curApp ; } if ( app != null ) { appNotRespondingLocked ( app , null , null , ( "Broadcast of " + ( r.intent.toString ( ) ) ) ) ; } if ( ( mPendingBroadcast ) == r ) { mPendingBroadcast = null ; } finishReceiverLocked ( r.receiver , r.resultCode , r.resultData , r.resultExtras , r.resultAbort , true ) ; scheduleBroadcastsLocked ( ) ; } }