[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-30 67f291ddae3: Correct conditions for iconification on Android
From: |
Po Lu |
Subject: |
emacs-30 67f291ddae3: Correct conditions for iconification on Android |
Date: |
Mon, 8 Jul 2024 03:43:34 -0400 (EDT) |
branch: emacs-30
commit 67f291ddae31cc4623fd93280b141ee8611f3f5a
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Correct conditions for iconification on Android
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity)
<isPaused>: Rename to <isStopped>.
(attachWindow): Adjust to match.
(onPause): Delete function.
(onStop): Deem frames iconified after calls to onStop instead.
---
java/org/gnu/emacs/EmacsActivity.java | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/java/org/gnu/emacs/EmacsActivity.java
b/java/org/gnu/emacs/EmacsActivity.java
index 7d02e4f4834..0c9e8312b90 100644
--- a/java/org/gnu/emacs/EmacsActivity.java
+++ b/java/org/gnu/emacs/EmacsActivity.java
@@ -78,7 +78,7 @@ public class EmacsActivity extends Activity
public static EmacsWindow focusedWindow;
/* Whether or not this activity is paused. */
- private boolean isPaused;
+ private boolean isStopped;
/* Whether or not this activity is fullscreen. */
private boolean isFullscreen;
@@ -196,7 +196,7 @@ public class EmacsActivity extends Activity
window.view.requestFocus ();
/* If the activity is iconified, send that to the window. */
- if (isPaused)
+ if (isStopped)
window.noticeIconified ();
/* Invalidate the focus. Since attachWindow may be called from
@@ -308,8 +308,13 @@ public class EmacsActivity extends Activity
public final void
onStop ()
{
- timeOfLastInteraction = SystemClock.elapsedRealtime ();
+ /* Iconification was previously reported in onPause, but that was
+ misinformed, as `onStop' is the actual callback activated upon
+ changes in an activity's visibility. */
+ isStopped = true;
+ EmacsWindowManager.MANAGER.noticeIconified (this);
+ timeOfLastInteraction = SystemClock.elapsedRealtime ();
super.onStop ();
}
@@ -403,21 +408,11 @@ public class EmacsActivity extends Activity
invalidateFocus (3);
}
- @Override
- public final void
- onPause ()
- {
- isPaused = true;
-
- EmacsWindowManager.MANAGER.noticeIconified (this);
- super.onPause ();
- }
-
@Override
public final void
onResume ()
{
- isPaused = false;
+ isStopped = false;
timeOfLastInteraction = 0;
EmacsWindowManager.MANAGER.noticeDeiconified (this);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-30 67f291ddae3: Correct conditions for iconification on Android,
Po Lu <=