mirror of
				https://github.com/SimpleMobileTools/Simple-Contacts.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	if the user presses Back at the dialer without an established call, hang it up
This commit is contained in:
		@@ -95,6 +95,13 @@ class DialerActivity : SimpleActivity(), SensorEventListener {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    override fun onBackPressed() {
 | 
			
		||||
        super.onBackPressed()
 | 
			
		||||
        if (!isCallActive) {
 | 
			
		||||
            hangUp()
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private fun initProximityWakeLock() {
 | 
			
		||||
        sensorManager = getSystemService(Context.SENSOR_SERVICE) as SensorManager
 | 
			
		||||
        proximity = sensorManager!!.getDefaultSensor(Sensor.TYPE_PROXIMITY)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user