Closed david-allison closed 2 weeks ago
@criticalAY Can't reproduce
Could you check 0a629925b427cc21a8c7877d19d31fe3522a8343 and 7879edfa469178e5d974cdadbd7a13846e44845e to find the bad commit
You'll need gh pr checkout --force 16248
https://github.com/ankidroid/Anki-Android/assets/62114487/f7d82d2f-7610-4770-80f8-a460d658370b
I tested it on my physical device and to no amaze it's an emulator issue, you can ignore it, looks good to me
Is the emulator issue introduced in this PR, or reproducible on main
?
This PR too
For clarity: And also main
?
Yes, both main and this PR have issue on emulator
My concerns:
Replay
icon stops the audio instead of replaying it, which is unintuitive to me, so I suggest using another icon.My concerns:
- The
Replay
icon stops the audio instead of replaying it, which is unintuitive to me, so I suggest using another icon.
If I can find an icon similar to this, would it be acceptable?
- There shouldn't be a delay between long pressing the record button and the recording start.
So this would be moving 'record' to ACTION_DOWN
?
Crash on closing the screen while recording is playing back
Process: com.ichi2.anki.debug, PID: 9262
java.lang.IllegalStateException
at android.media.MediaPlayer._pause(Native Method)
at android.media.MediaPlayer.pause(MediaPlayer.java:1573)
at com.ichi2.audio.AudioRecordingController.controlAudioRecorder(AudioRecordingController.kt:483)
at com.ichi2.audio.AudioRecordingController.createUI$lambda$4(AudioRecordingController.kt:190)
at com.ichi2.audio.AudioRecordingController.$r8$lambda$Kt6IrF7armXMsCjnga1mPK4zvx0(Unknown Source:0)
at com.ichi2.audio.AudioRecordingController$$ExternalSyntheticLambda1.onClick(Unknown Source:2)
at android.view.View.performClick(View.java:8043)
at android.widget.TextView.performClick(TextView.java:17816)
at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1218)
at android.view.View.performClickInternal(View.java:8020)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:31850)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8893)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
If I can find an icon similar to this, would it be acceptable?
I won't block because of the icon, so choose what you like more.
So this would be moving 'record' to ACTION_DOWN?
Yes. Either record while pressing, or press once then stop when pressed again
I'll propose to drop the final commit so this can go in, would that be acceptable?
I'll propose to drop the final commit so this can go in, would that be acceptable?
Yeah. Add an issue for the holding feature then
Purpose / Description
A few issues/suggestions were raised in #16185 about the audio recorder changes introduced for #13043
Fixes
Approach
1) Major refactor to improve the state handling logic 2) Simplify the Reviewer state to the following, add a new layout and changes to the Waveform control:
3) Add 'on hold' logic for long presses
How Has This Been Tested?
https://github.com/ankidroid/Anki-Android/assets/62114487/6fb5c329-152e-4c89-b231-f2ac2ac4395c
Learning (optional, can help others)
onStop
Checklist