Code example for AudioManager

Methods: setRingerMode

0
                                    SensorManager.SENSOR_DELAY_UI); 
                            mSecondReg = true; 
                        } 
                    } 
                    if (wentSilentFromRing) { 
                        am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); 
                        wentSilentFromRing = false; 
                    } 
                } 
 
            } 
        } 
    }; 
 
    private Runnable faceDownTimer = new Runnable() {
        public void run() { 
            faceDownIsRunning = true; 
            if (cancelRunDown) { 
                switch (getUserFlipAudioMode(service)) { 
                    case MODE_SILENT: 
                        if (am.getRingerMode() == AudioManager.RINGER_MODE_NORMAL) {