diff options
| author | Po Lu | 2023-03-02 12:30:36 +0800 |
|---|---|---|
| committer | Po Lu | 2023-03-02 12:30:36 +0800 |
| commit | 09aa948ab48261b13550b76a5820d3473caf200a (patch) | |
| tree | 350a98768e4d76c6d636f54b38363ab68b1e6b6d /java/org | |
| parent | 424077fadf9c952d0da7b56a200cfcba6075931f (diff) | |
| download | emacs-09aa948ab48261b13550b76a5820d3473caf200a.tar.gz emacs-09aa948ab48261b13550b76a5820d3473caf200a.zip | |
Improve criteria for restoring fullscreen state on Android
* java/Makefile.in ($(CLASS_FILES) &): Touch all class files,
even those javac chose not to rebuild.
* java/org/gnu/emacs/EmacsActivity.java (onWindowFocusChanged):
Restore fullscreen state here.
(onResume): And not here.
Diffstat (limited to 'java/org')
| -rw-r--r-- | java/org/gnu/emacs/EmacsActivity.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/java/org/gnu/emacs/EmacsActivity.java b/java/org/gnu/emacs/EmacsActivity.java index c444110de60..bcfee3f7080 100644 --- a/java/org/gnu/emacs/EmacsActivity.java +++ b/java/org/gnu/emacs/EmacsActivity.java | |||
| @@ -241,6 +241,15 @@ public class EmacsActivity extends Activity | |||
| 241 | { | 241 | { |
| 242 | focusedActivities.add (this); | 242 | focusedActivities.add (this); |
| 243 | lastFocusedActivity = this; | 243 | lastFocusedActivity = this; |
| 244 | |||
| 245 | /* Update the window insets as the focus change may have | ||
| 246 | changed the window insets as well, and the system does not | ||
| 247 | automatically restore visibility flags. */ | ||
| 248 | |||
| 249 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN | ||
| 250 | && Build.VERSION.SDK_INT < Build.VERSION_CODES.R | ||
| 251 | && isFullscreen) | ||
| 252 | syncFullscreenWith (window); | ||
| 244 | } | 253 | } |
| 245 | else | 254 | else |
| 246 | focusedActivities.remove (this); | 255 | focusedActivities.remove (this); |
| @@ -264,9 +273,6 @@ public class EmacsActivity extends Activity | |||
| 264 | { | 273 | { |
| 265 | isPaused = false; | 274 | isPaused = false; |
| 266 | 275 | ||
| 267 | /* Update the window insets. */ | ||
| 268 | syncFullscreenWith (window); | ||
| 269 | |||
| 270 | EmacsWindowAttachmentManager.MANAGER.noticeDeiconified (this); | 276 | EmacsWindowAttachmentManager.MANAGER.noticeDeiconified (this); |
| 271 | super.onResume (); | 277 | super.onResume (); |
| 272 | } | 278 | } |