DroidFS v2.1.3

This commit is contained in:
Matéo Duparc 2023-09-28 19:36:55 +02:00
parent b503f134d5
commit a41cde1c53
Signed by untrusted user: hardcoresushi
GPG Key ID: AFE384344A45E13A
6 changed files with 32 additions and 6 deletions

View File

@ -55,7 +55,7 @@ Some available features are considered risky and are therefore disabled by defau
Decrypt and open file using external apps. These apps could save and send the files thus opened. Decrypt and open file using external apps. These apps could save and send the files thus opened.
</li> </li>
<li><h4>Expose open volumes*:</h4> <li><h4>Expose open volumes*:</h4>
Allow open volumes to be browsed in the system file explorer (<a href="https://developer.android.com/guide/topics/providers/document-provider">DocumentProvider</a> API). Encrypted files can then be selected from other applications, potentially with permanent access. Allow open volumes to be browsed in the system file explorer (<a href="https://developer.android.com/guide/topics/providers/document-provider">DocumentProvider</a> API). Encrypted files can then be selected from other applications, potentially with permanent access. This feature requires "*Keep volume open when the app goes in background*" to be enabled.
</li> </li>
<li><h4>Grant write access:</h4> <li><h4>Grant write access:</h4>
Files opened with another applications can be modified by them. This applies to both previous unsafe features. Files opened with another applications can be modified by them. This applies to both previous unsafe features.

View File

@ -37,8 +37,8 @@ android {
applicationId "sushi.hardcore.droidfs" applicationId "sushi.hardcore.droidfs"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 32 targetSdkVersion 32
versionCode 35 versionCode 36
versionName "2.1.2" versionName "2.1.3"
ndk { ndk {
abiFilters "x86", "x86_64", "armeabi-v7a", "arm64-v8a" abiFilters "x86", "x86_64", "armeabi-v7a", "arm64-v8a"
@ -124,7 +124,7 @@ dependencies {
implementation "androidx.concurrent:concurrent-futures:1.1.0" implementation "androidx.concurrent:concurrent-futures:1.1.0"
def camerax_version = "1.3.0-rc01" def camerax_version = "1.3.0-rc02"
implementation "androidx.camera:camera-camera2:$camerax_version" implementation "androidx.camera:camera-camera2:$camerax_version"
implementation "androidx.camera:camera-lifecycle:$camerax_version" implementation "androidx.camera:camera-lifecycle:$camerax_version"
implementation "androidx.camera:camera-view:$camerax_version" implementation "androidx.camera:camera-view:$camerax_version"

View File

@ -35,6 +35,7 @@ import android.media.MediaCodec.BufferInfo;
import android.media.MediaCodecInfo; import android.media.MediaCodecInfo;
import android.media.MediaFormat; import android.media.MediaFormat;
import android.os.Bundle; import android.os.Bundle;
import android.os.SystemClock;
import android.util.Range; import android.util.Range;
import android.view.Surface; import android.view.Surface;
@ -1054,6 +1055,7 @@ public class SucklessEncoderImpl implements Encoder {
if (mIsVideoEncoder) { if (mIsVideoEncoder) {
Timebase inputTimebase; Timebase inputTimebase;
if (DeviceQuirks.get(CameraUseInconsistentTimebaseQuirk.class) != null) { if (DeviceQuirks.get(CameraUseInconsistentTimebaseQuirk.class) != null) {
Logger.w(mTag, "CameraUseInconsistentTimebaseQuirk is enabled");
inputTimebase = null; inputTimebase = null;
} else { } else {
inputTimebase = mInputTimebase; inputTimebase = mInputTimebase;
@ -1065,7 +1067,7 @@ public class SucklessEncoderImpl implements Encoder {
} }
@Override @Override
public void onInputBufferAvailable(MediaCodec mediaCodec, int index) { public void onInputBufferAvailable(@NonNull MediaCodec mediaCodec, int index) {
mEncoderExecutor.execute(() -> { mEncoderExecutor.execute(() -> {
if (mStopped) { if (mStopped) {
Logger.w(mTag, "Receives input frame after codec is reset."); Logger.w(mTag, "Receives input frame after codec is reset.");
@ -1131,6 +1133,15 @@ public class SucklessEncoderImpl implements Encoder {
if (checkBufferInfo(bufferInfo)) { if (checkBufferInfo(bufferInfo)) {
if (!mHasFirstData) { if (!mHasFirstData) {
mHasFirstData = true; mHasFirstData = true;
// Only print the first data to avoid flooding the log.
Logger.d(mTag,
"data timestampUs = " + bufferInfo.presentationTimeUs
+ ", data timebase = " + mInputTimebase
+ ", current system uptimeMs = "
+ SystemClock.uptimeMillis()
+ ", current system realtimeMs = "
+ SystemClock.elapsedRealtime()
);
} }
BufferInfo outBufferInfo = resolveOutputBufferInfo(bufferInfo); BufferInfo outBufferInfo = resolveOutputBufferInfo(bufferInfo);
mLastSentAdjustedTimeUs = outBufferInfo.presentationTimeUs; mLastSentAdjustedTimeUs = outBufferInfo.presentationTimeUs;

View File

@ -35,6 +35,7 @@ import android.media.MediaCodec.BufferInfo;
import android.media.MediaCodecInfo; import android.media.MediaCodecInfo;
import android.media.MediaFormat; import android.media.MediaFormat;
import android.os.Bundle; import android.os.Bundle;
import android.os.SystemClock;
import android.util.Range; import android.util.Range;
import android.view.Surface; import android.view.Surface;
@ -1053,6 +1054,7 @@ public class EncoderImpl implements Encoder {
if (mIsVideoEncoder) { if (mIsVideoEncoder) {
Timebase inputTimebase; Timebase inputTimebase;
if (DeviceQuirks.get(CameraUseInconsistentTimebaseQuirk.class) != null) { if (DeviceQuirks.get(CameraUseInconsistentTimebaseQuirk.class) != null) {
Logger.w(mTag, "CameraUseInconsistentTimebaseQuirk is enabled");
inputTimebase = null; inputTimebase = null;
} else { } else {
inputTimebase = mInputTimebase; inputTimebase = mInputTimebase;
@ -1064,7 +1066,7 @@ public class EncoderImpl implements Encoder {
} }
@Override @Override
public void onInputBufferAvailable(MediaCodec mediaCodec, int index) { public void onInputBufferAvailable(@NonNull MediaCodec mediaCodec, int index) {
mEncoderExecutor.execute(() -> { mEncoderExecutor.execute(() -> {
if (mStopped) { if (mStopped) {
Logger.w(mTag, "Receives input frame after codec is reset."); Logger.w(mTag, "Receives input frame after codec is reset.");
@ -1130,6 +1132,15 @@ public class EncoderImpl implements Encoder {
if (checkBufferInfo(bufferInfo)) { if (checkBufferInfo(bufferInfo)) {
if (!mHasFirstData) { if (!mHasFirstData) {
mHasFirstData = true; mHasFirstData = true;
// Only print the first data to avoid flooding the log.
Logger.d(mTag,
"data timestampUs = " + bufferInfo.presentationTimeUs
+ ", data timebase = " + mInputTimebase
+ ", current system uptimeMs = "
+ SystemClock.uptimeMillis()
+ ", current system realtimeMs = "
+ SystemClock.elapsedRealtime()
);
} }
BufferInfo outBufferInfo = resolveOutputBufferInfo(bufferInfo); BufferInfo outBufferInfo = resolveOutputBufferInfo(bufferInfo);
mLastSentAdjustedTimeUs = outBufferInfo.presentationTimeUs; mLastSentAdjustedTimeUs = outBufferInfo.presentationTimeUs;

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
set -e
for i in "PendingRecording" "Recording" "Recorder"; do for i in "PendingRecording" "Recording" "Recorder"; do
diff3 -m ../Suckless$i.java base/$i.java new/$i.java > Suckless$i.java && mv Suckless$i.java .. diff3 -m ../Suckless$i.java base/$i.java new/$i.java > Suckless$i.java && mv Suckless$i.java ..
done done

View File

@ -0,0 +1,2 @@
- Fix crash on Android 13
- Upgrade CameraX version