Code example for TelephonyManager

Methods: getCallState

0
		** Force a volume-set if we switched to incall mode         ** 
		** This is racy, but it seems that we always get called     ** 
		** after libcallvolume.so finished the initial setup        ** 
		**************************************************************/ 
		private void checkPhoneState() { 
			if(tMgr.getCallState() == tMgr.CALL_STATE_OFFHOOK) { 
				xlog("we are IN_CALL - forcing audio setting"); 
				lastvol = -1; 
				updateIncallVolume(); 
			} 
		} 
		 
		 
		/************************************************************** 
		** Tell pollyd that it should exit/restart itself            ** 
		** This is needed to re-connect to gsmmux                    ** 
		**************************************************************/ 
		private void checkAirplaneState(Intent intent) { 
			boolean going_offline = intent.getExtras().getBoolean("state"); 
			 
			if(going_offline == false) {