Skip to content

Commit

Permalink
Fix rotation locked after voice record cancel and allow rotation when…
Browse files Browse the repository at this point in the history
… recording locked.
  • Loading branch information
alan-signal committed Jan 25, 2021
1 parent 49535f6 commit b9a1a50
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2950,6 +2950,7 @@ public void onRecorderStarted() {
@Override
public void onRecorderLocked() {
updateToggleButtonState();
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
}

@Override
Expand Down Expand Up @@ -3014,6 +3015,7 @@ public void onRecorderCanceled() {
vibrator.vibrate(50);

getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);

ListenableFuture<Pair<Uri, Long>> future = audioRecorder.stopRecording();
future.addListener(new ListenableFuture.Listener<Pair<Uri, Long>>() {
Expand Down

0 comments on commit b9a1a50

Please sign in to comment.