volume up and down

 

 

~/桌面/magus7-gjl/Eclair/frameworks/base/services/java/com/android/server/status# 

StatusBarService.java

 

boolean interceptTouchEvent(MotionEvent event, int check){ boolean action = false; final StatusBarView view = mStatusBarView; switch (event.getAction()){ case MotionEvent.ACTION_DOWN: action = false; break; case MotionEvent.ACTION_UP: action = true; break; default: action = false; break; } if(action){ synchronized (this) { if (mAudioManager == null) { mAudioManager = (AudioManager) view.getContext().getSystemService( Context.AUDIO_SERVICE); } } mAudioManager.adjustStreamVolume( AudioManager.STREAM_MUSIC, check, AudioManager.FLAG_SHOW_UI); //| AudioManager.FLAG_VIBRATE | AudioManager.FLAG_PLAY_SOUND); } return false; }  

 

你可能感兴趣的:(UI,service,null,UP,action)