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 | |
| 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')
| -rw-r--r-- | java/Makefile.in | 1 | ||||
| -rw-r--r-- | java/org/gnu/emacs/EmacsActivity.java | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/java/Makefile.in b/java/Makefile.in index 994ffdd0828..c7fe6e07c77 100644 --- a/java/Makefile.in +++ b/java/Makefile.in | |||
| @@ -261,6 +261,7 @@ $(CLASS_FILES): $(RESOURCE_FILE) | |||
| 261 | .SUFFIXES: .java .class | 261 | .SUFFIXES: .java .class |
| 262 | $(CLASS_FILES) &: $(JAVA_FILES) | 262 | $(CLASS_FILES) &: $(JAVA_FILES) |
| 263 | $(AM_V_JAVAC) $(JAVAC) $(JAVAFLAGS) $(JAVA_FILES) | 263 | $(AM_V_JAVAC) $(JAVAC) $(JAVAFLAGS) $(JAVA_FILES) |
| 264 | $(AM_V_SILENT) touch $(CLASS_FILES) | ||
| 264 | 265 | ||
| 265 | # N.B. that find must be called all over again in case javac generated | 266 | # N.B. that find must be called all over again in case javac generated |
| 266 | # nested classes. | 267 | # nested classes. |
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 | } |