Fixing a bug on Samsung devices with proximity sensor
This commit is contained in:
parent
41bbf3592c
commit
fc12c9643c
2 changed files with 6 additions and 4 deletions
|
@ -1235,6 +1235,8 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
|
|||
mControlsHandler.removeCallbacks(mControls);
|
||||
}
|
||||
mControls = null;
|
||||
// Workaround for proximity sensor bug on Samsung devices
|
||||
if (lc.getCurrentCall() != null && lc.getCurrentCall().getState() != State.StreamsRunning)
|
||||
enableProximitySensing(false);
|
||||
}
|
||||
|
||||
|
@ -1546,7 +1548,7 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
|
|||
|
||||
final float distanceInCm = event.values[0];
|
||||
final float maxDistance = event.sensor.getMaximumRange();
|
||||
Log.d("Proximity sensor report [",distanceInCm,"] , for max range [",maxDistance,"]");
|
||||
Log.d("Proximity sensor report ["+distanceInCm+"] , for max range ["+maxDistance+"]");
|
||||
|
||||
if (maxDistance <= threshold) {
|
||||
// Case binary 0/1 and short sensors
|
||||
|
|
|
@ -1096,8 +1096,8 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
|
|||
}
|
||||
} else if (resultCode == Activity.RESULT_FIRST_USER && requestCode == CALL_ACTIVITY) {
|
||||
getIntent().putExtra("PreviousActivity", CALL_ACTIVITY);
|
||||
callTransfer = data == null ? false : data.getBooleanExtra("Transfer", false);
|
||||
boolean chat = data == null ? false : data.getBooleanExtra("chat", false);
|
||||
callTransfer = data != null && data.getBooleanExtra("Transfer", false);
|
||||
boolean chat = data != null && data.getBooleanExtra("chat", false);
|
||||
if(chat){
|
||||
pendingFragmentTransaction = FragmentsAvailable.CHAT_LIST;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue