pass selected audio device to proximity sensor toggle
This commit is contained in:
		
							parent
							
								
									61aac78af0
								
							
						
					
					
						commit
						1f77d5e115
					
				@ -281,8 +281,8 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    private void putProximityWakeLockInProperState() {
 | 
					    private void putProximityWakeLockInProperState(final AppRTCAudioManager.AudioDevice audioDevice) {
 | 
				
			||||||
        if (requireRtpConnection().getAudioManager().getSelectedAudioDevice() == AppRTCAudioManager.AudioDevice.EARPIECE) {
 | 
					        if (audioDevice == AppRTCAudioManager.AudioDevice.EARPIECE) {
 | 
				
			||||||
            acquireProximityWakeLock();
 | 
					            acquireProximityWakeLock();
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            releaseProximityWakeLock();
 | 
					            releaseProximityWakeLock();
 | 
				
			||||||
@ -1037,7 +1037,7 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
 | 
				
			|||||||
            } else if (END_CARD.contains(endUserState)) {
 | 
					            } else if (END_CARD.contains(endUserState)) {
 | 
				
			||||||
                Log.d(Config.LOGTAG, "onAudioDeviceChanged() nothing to do because end card has been reached");
 | 
					                Log.d(Config.LOGTAG, "onAudioDeviceChanged() nothing to do because end card has been reached");
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                putProximityWakeLockInProperState();
 | 
					                putProximityWakeLockInProperState(selectedAudioDevice);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        } catch (IllegalStateException e) {
 | 
					        } catch (IllegalStateException e) {
 | 
				
			||||||
            Log.d(Config.LOGTAG, "RTP connection was not available when audio device changed");
 | 
					            Log.d(Config.LOGTAG, "RTP connection was not available when audio device changed");
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user