mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Fix in-app camera rotation in multiview.
This commit is contained in:
committed by
Cody Henthorne
parent
e24c951d83
commit
7d5627b17b
@@ -143,6 +143,20 @@ public class CameraXFragment extends LoggingFragment implements CameraFragment {
|
||||
return inflater.inflate(R.layout.camerax_fragment, container, false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
if (cameraController != null) {
|
||||
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
orientationListener.enable();
|
||||
} else {
|
||||
orientationListener.disable();
|
||||
cameraController.setImageRotation(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
|
||||
Reference in New Issue
Block a user