Merge pull request #6520 from 21pages/wakelock
wake lock for all connection type
This commit is contained in:
commit
b8f7259fbd
9 changed files with 102 additions and 87 deletions
|
|
@ -260,6 +260,7 @@ fn init_ndk_context() -> JniResult<()> {
|
|||
unsafe {
|
||||
ndk_context::release_android_context();
|
||||
}
|
||||
*lock = false;
|
||||
}
|
||||
if let (Some(jvm), Some(ctx)) = (
|
||||
JVM.read().unwrap().as_ref(),
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ impl RecorderApi for WebmRecorder {
|
|||
|
||||
impl Drop for WebmRecorder {
|
||||
fn drop(&mut self) {
|
||||
std::mem::replace(&mut self.webm, None).map_or(false, |webm| webm.finalize(None));
|
||||
let _ = std::mem::replace(&mut self.webm, None).map_or(false, |webm| webm.finalize(None));
|
||||
let mut state = RecordState::WriteTail;
|
||||
if !self.written || self.start.elapsed().as_secs() < MIN_SECS {
|
||||
std::fs::remove_file(&self.ctx.filename).ok();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue