Make miscellaneous improvements to the Android port

* java/org/gnu/emacs/EmacsActivity.java (onCreate): Deal with
omitted calls to onWindowFocusChanged after activity recreation.

* java/org/gnu/emacs/EmacsService.java (clearWindow, clearArea):
Delete redundant wrapper functions.
(getUsefulContentResolver, getContentResolverContext): Delete
functions.
(openContentUri, checkContentUri): Stop searching for an
activity content resolver, as that's actually not necessary.

* src/android.c (android_init_emacs_service)
(android_init_emacs_window, android_clear_window)
(android_clear_area): Adjust to match.
This commit is contained in:
Po Lu
2024-02-10 15:02:39 +08:00
parent 6568a9a009
commit e7d1b12878
3 changed files with 16 additions and 78 deletions

View File

@@ -247,6 +247,10 @@ public class EmacsActivity extends Activity
}
super.onCreate (savedInstanceState);
/* Call `onWindowFocusChanged' to read the focus state, which fails
to be called after an activity is recreated. */
onWindowFocusChanged (false);
}
@Override