summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2024-03-28 19:56:31 +0800
committerPo Lu <luangruo@yahoo.com>2024-03-29 08:26:48 +0800
commit755665d95adbba07335f400f1090e53b66c41ff5 (patch)
tree03dbc80da010992a04e52f7119338e28ba9bed36 /doc
parent4cee95815b9d7d56f6f77abb1cc17e346c038685 (diff)
downloademacs-755665d95adbba07335f400f1090e53b66c41ff5.tar.gz
Prevent Android OS task trimming from deleting Emacs frames
* doc/emacs/android.texi (Android Windowing): Document proviso on Android 7.0 and later. * java/org/gnu/emacs/EmacsActivity.java (EmacsActivity) <timeOfLastInteraction>: New field. (onStop, onResume): Set and clear timeOfLastInteraction. (isReallyFinishing): New function. (onDestroy): Don't delete frame even in the event isFinishing returns true if more than 4 hours have elapsed since the activity last moved into the background.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/android.texi12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi
index b367515cb35..01732961998 100644
--- a/doc/emacs/android.texi
+++ b/doc/emacs/android.texi
@@ -858,6 +858,18 @@ When the user closes the window created during application startup,
and the window was not previously closed by the system in order to
save resources, Emacs deletes any frame displayed within that window.
+However, on Android 7.0 and later, such frames are not deleted if the
+window is closed four or more hours after the window moves into the
+background, as the system automatically removes open windows once a
+certain period of inactivity elapses when the number of windows retained
+by the window manager surpasses a specific threshold, and window
+deletion by this mechanism is indistinguishable from window deletion by
+the user. Emacs begins to ignore window deletion after two hours less
+than the default value of this threshold both to err on the side of
+caution, in case the system's record of inactivity and Emacs's differ,
+and for the reason that this threshold is open to customization by OS
+distributors.
+
@item
When the user or the system closes any window created by Emacs on
behalf of a specific frame, Emacs deletes the frame displayed within