mirror of
https://github.com/nextcloud/talk-android
synced 2025-08-04 10:35:04 +01:00
make sure to torn of torch after taking a picture
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
dd9501590b
commit
d0f52c8eba
@ -324,6 +324,7 @@ public class TakePhotoActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
binding.photoPreview.setImageBitmap(bitmap);
|
binding.photoPreview.setImageBitmap(bitmap);
|
||||||
binding.photoPreview.setTag(savedUri);
|
binding.photoPreview.setTag(savedUri);
|
||||||
|
viewModel.disableTorchIfEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getImageOrientation(File imageFile) {
|
public int getImageOrientation(File imageFile) {
|
||||||
|
@ -64,6 +64,12 @@ public class TakePictureViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void disableTorchIfEnabled() {
|
||||||
|
if (this.torchEnabled.getValue()) {
|
||||||
|
toggleTorchEnabled();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void toggleTorchEnabled() {
|
public void toggleTorchEnabled() {
|
||||||
//noinspection ConstantConditions
|
//noinspection ConstantConditions
|
||||||
this.torchEnabled.postValue(!this.torchEnabled.getValue());
|
this.torchEnabled.postValue(!this.torchEnabled.getValue());
|
||||||
|
Loading…
Reference in New Issue
Block a user