Fix tests crash and fix video call pause button

This commit is contained in:
Margaux Clerc 2016-02-16 10:32:55 +01:00
parent cf63f3fe0c
commit 095d562ed0
2 changed files with 8 additions and 9 deletions

View file

@ -489,6 +489,8 @@ public class CallActivity extends Activity implements OnClickListener, SensorEve
} else {
video.setImageResource(R.drawable.camera_default);
}
} else {
video.setImageResource(R.drawable.camera_default);
}
}

View file

@ -199,9 +199,11 @@ public class AssistantActivity extends Activity implements OnClickListener {
}
public void hideKeyboard(){
InputMethodManager imm = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);
View view = getCurrentFocus();
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
View view = this.getCurrentFocus();
if (imm != null && view != null) {
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
}
private void launchEchoCancellerCalibration(boolean sendEcCalibrationResult) {
@ -219,11 +221,6 @@ public class AssistantActivity extends Activity implements OnClickListener {
}
private void logIn(String username, String password, String displayName, String domain, TransportType transport, boolean sendEcCalibrationResult) {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null && getCurrentFocus() != null) {
imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
}
saveCreatedAccount(username, password, displayName, domain, transport);
}