mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
Hide camera button if needed
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
a3c54fd854
commit
4541e07b3a
@ -517,15 +517,16 @@ public class CallActivity extends AppCompatActivity {
|
||||
}
|
||||
} else if (EffortlessPermissions.somePermissionPermanentlyDenied(this,
|
||||
PERMISSIONS_CALL)) {
|
||||
|
||||
if (cameraEnumerator.getDeviceNames().length == 0) {
|
||||
cameraControlButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (EffortlessPermissions.hasPermissions(this, PERMISSIONS_CAMERA)) {
|
||||
if (!videoOn) {
|
||||
onCameraClick();
|
||||
}
|
||||
|
||||
if (cameraEnumerator.getDeviceNames().length == 0) {
|
||||
cameraControlButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (cameraSwitchButton != null && cameraEnumerator.getDeviceNames().length > 1) {
|
||||
cameraSwitchButton.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@ -534,6 +535,8 @@ public class CallActivity extends AppCompatActivity {
|
||||
if (cameraSwitchButton != null) {
|
||||
cameraSwitchButton.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
cameraControlButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (EffortlessPermissions.hasPermissions(this, PERMISSIONS_MICROPHONE)) {
|
||||
@ -559,6 +562,11 @@ public class CallActivity extends AppCompatActivity {
|
||||
if (cameraSwitchButton != null) {
|
||||
cameraSwitchButton.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
if (cameraEnumerator.getDeviceNames().length == 0) {
|
||||
cameraControlButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (!inCall) {
|
||||
startCall();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user