From: Po Lu Date: Thu, 9 Mar 2023 06:50:32 +0000 (+0800) Subject: Update Android port X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=682a6542cd7298e5116cd37651f762e084b6a5c0;p=emacs.git Update Android port * java/debug.sh (is_root): Port to android versions which don't support `chmod +x'. * src/android.c (android_content_name_p): Disable before API level 19. --- diff --git a/java/debug.sh b/java/debug.sh index 83690e0b536..339b3604810 100755 --- a/java/debug.sh +++ b/java/debug.sh @@ -284,7 +284,7 @@ else if (adb -s $device shell ls /system/bin | grep -G tee); then # Copy it to the user directory. adb -s $device shell "$gdbserver_cat" - adb -s $device shell "run-as $package chmod +x gdbserver" + adb -s $device shell "run-as $package chmod 777 gdbserver" gdbserver_cmd="./gdbserver" else # Hopefully this is an old version of Android which allows diff --git a/src/android.c b/src/android.c index 5420fbde9b9..b14d2845544 100644 --- a/src/android.c +++ b/src/android.c @@ -994,6 +994,12 @@ android_get_asset_name (const char *filename) static bool android_content_name_p (const char *filename) { + /* Content URIs aren't supported before Android 4.4, so return + false. */ + + if (android_api_level < 19) + return false; + return (!strcmp (filename, "/content") || !strncmp (filename, "/content/", sizeof "/content/" - 1));