]> git.eshelyaron.com Git - emacs.git/commit
Prevent crashes and related issues if initial activity is destroyed on Android
authorPo Lu <luangruo@yahoo.com>
Thu, 27 Jun 2024 03:06:59 +0000 (11:06 +0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 28 Jun 2024 05:48:06 +0000 (07:48 +0200)
commitd3bc43a311d6ac09c4f182a04f45b8bdc51256ff
tree8a2d3d218936bcd2d39facfc11e65d4361797772
parentdc7fe47a4b78b0b4aa5b9804538a44a4f040ac9e
Prevent crashes and related issues if initial activity is destroyed on Android

* java/org/gnu/emacs/EmacsWindow.java
(EmacsWindow) <initialWindowCreated>: New variable.
(EmacsWindow): If the initial frame has not yet been created,
set attachmentToken to -1.

* java/org/gnu/emacs/EmacsWindowManager.java (registerWindow):
When the window's attachment token is -1 (i.e., it is the
default window), start EmacsActivity rather than
EmacsMultitaskActivity.  Catch exceptions around startActivity.

(cherry picked from commit 860840621a1ebe2e4f17ba8ae78d441ea75650b2)
java/org/gnu/emacs/EmacsWindow.java
java/org/gnu/emacs/EmacsWindowManager.java