Skip to content

Commit

Permalink
8.9.115
Browse files Browse the repository at this point in the history
  • Loading branch information
foobnix committed Dec 12, 2023
1 parent 6c1598c commit f9c2d5d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 60 deletions.
4 changes: 2 additions & 2 deletions Builder/all-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ cd ../
./gradlew copyApks -Pbeta -Prelesae
./gradlew -stop

rm /home/dev/Dropbox/FREE_PDF_APK/testing/.apk
rm /Users/dev/Library/CloudStorage/Dropbox/FREE_PDF_APK/testing/.apk
rm /home/dev/Dropbox/FREE_PDF_APK/testing/*.apk
rm /Users/dev/Library/CloudStorage/Dropbox/FREE_PDF_APK/testing/*.apk

cd Builder
./remove_all.sh
Expand Down
58 changes: 0 additions & 58 deletions Builder/jni/libmupdf-1.21.1.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,67 +808,9 @@ doc->
outline = NULL;
}
}
bool is_valid_utf8(const char * string)
{
if (!string)
return true;

const unsigned char * bytes = (const unsigned char *)string;
unsigned int cp;
int num;

while (*bytes != 0x00)
{
if ((*bytes & 0x80) == 0x00)
{
// U+0000 to U+007F
cp = (*bytes & 0x7F);
num = 1;
}
else if ((*bytes & 0xE0) == 0xC0)
{
// U+0080 to U+07FF
cp = (*bytes & 0x1F);
num = 2;
}
else if ((*bytes & 0xF0) == 0xE0)
{
// U+0800 to U+FFFF
cp = (*bytes & 0x0F);
num = 3;
}
else if ((*bytes & 0xF8) == 0xF0)
{
// U+10000 to U+10FFFF
cp = (*bytes & 0x07);
num = 4;
}
else
return false;

bytes += 1;
for (int i = 1; i < num; ++i)
{
if ((*bytes & 0xC0) != 0x80)
return false;
cp = (cp << 6) | (*bytes & 0x3F);
bytes += 1;
}

if ((cp > 0x10FFFF) ||
((cp >= 0xD800) && (cp <= 0xDFFF)) ||
((cp <= 0x007F) && (num != 1)) ||
((cp >= 0x0080) && (cp <= 0x07FF) && (num != 2)) ||
((cp >= 0x0800) && (cp <= 0xFFFF) && (num != 3)) ||
((cp >= 0x10000) && (cp <= 0x1FFFFF) && (num != 4)))
return false;
}

return true;
}

JNIEXPORT jstring

JNICALL
Java_org_ebookdroid_droids_mupdf_codec_MuPdfOutline_getTitle(JNIEnv *env,
jclass clazz, jlong dochandle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
Expand Down Expand Up @@ -378,8 +379,10 @@ public boolean onLongClick(View v) {
@Override
public void run() {
// BooksService.startForeground(getActivity(), BooksService.ACTION_RUN_SELF_TEST);
getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
OneTimeWorkRequest workRequest = new OneTimeWorkRequest.Builder(SelfTestWorker.class).build();
WorkManager.getInstance(getContext()).enqueue(workRequest);

}
}, null);
}
Expand Down

0 comments on commit f9c2d5d

Please sign in to comment.