Code example for TelephonyManager

Methods: getCallState

0
		if(intent == null) {
			stopSelf();
			return START_NOT_STICKY;
		} 
		playAlarm(); 
		mInitialCallState = mTelephonyManager.getCallState();
		return START_STICKY;
	} 
	 
	private void playAlarm() { 
		mPlaying = true;
		mVibrator.vibrate(sVibratePattern, 0);
		enableKiller(); 
	} 
	 
	private void enableKiller() { 
        mHandler.sendMessageDelayed(mHandler.obtainMessage(KILLER),
                1000 * ALARM_TIMEOUT_SECONDS);
    } 
	 
	private Handler mHandler = new Handler() {