Code example for AudioManager

Methods: getRingerModegetVibrateSetting

0
				Log.i(tag, "modifying=======================================================");
				Log.i(tag, "MID=" + (int)(event.getEventId() * 2));
				Log.i(tag, formatter.format(event.getStartTime()));
				 
				//保存当前的情景模式到数据库 
				if(audio.getRingerMode() == AudioManager.RINGER_MODE_NORMAL){
					curMode.setVolume(1);
				} 
				else{ 
					curMode.setVolume(0);
				} 
				if(audio.getVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER) == AudioManager.VIBRATE_SETTING_ON){
					curMode.setVibrate(1);
				} 
				else{ 
					curMode.setVibrate(0);
				}				 
				helper.updateModeById(curMode);
				 
				Intent eIntent = new Intent(context, ModifyReceiver.class);
				Log.i(tag, helper.getModeByEventId((int) event.getEventId()).getName());