Commit graph

17 commits

Author SHA1 Message Date
Po Lu
96d26b4936 Fix styling issues on Android 15 QPR1
* java/org/gnu/emacs/EmacsView.java (EmacsView): Guarantee that
frame views are created with the correct theme.

* java/res/values-v20/style.xml (EmacsStyle):

* java/res/values-v29/style.xml (EmacsStyle): Disable a swiping
gesture enabled on certain Android systems.

* java/res/values-v35/style.xml: Rename from `styles'.xml.
2025-03-03 21:59:41 +08:00
Paul Eggert
4da38c6321 Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-01 07:39:17 +00:00
Po Lu
73367ea5c1 Better port to Android 35
* java/INSTALL: Don't refer users to build-tools 33.0.x.

* java/res/values-v35/styles.xml: New dark theme; define status
bar colors properly for this release.
2024-09-05 10:47:51 +08:00
Po Lu
ae38579420 * java/res/mipmap-v26/emacs_icon.xml: Define monospace icon. 2024-07-01 11:22:18 +08:00
Po Lu
64851d101a Improve Android "adaptive icon"
* java/res/drawable/emacs_background.xml:

* java/res/drawable/emacs_foreground.xml: Transform borders and
gradient colors to better align with the original.
2024-06-30 23:11:19 +08:00
Po Lu
070cb32463 ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
Po Lu
b7bd7e92a9 Improve Android adaptive icon
* java/res/drawable/emacs_background.xml: Delete trailing whitespace
and modify gradient offset to match emacs.svg.

* java/res/drawable/emacs_foreground.xml: Delete trailing
whitespace and remove redundant path.
2023-08-22 09:20:47 +08:00
Po Lu
c63f178a30 Make the Emacs icon ``adaptive''
* java/AndroidManifest.xml.in (EmacsApplication): Set icon to
@mipmap/emacs_icon.

* java/org/gnu/emacs/EmacsService.java (onStartCommand): Pick a
better name for the persistent notification channel.

* java/res/drawable/emacs_background.xml:

* java/res/drawable/emacs_foreground.xml:

* java/res/mipmap/emacs_icon.png:

* java/res/mipmap-v26/emacs_icon.xml: New files, comprising an
``adaptive icon'' required by some Android launchers.
2023-08-21 14:39:51 +08:00
Po Lu
b1e498ac8c Enable providing icons for Android desktop notifications
* doc/lispref/os.texi (Desktop Notifications)
<android-notifications-notify>: Mention the :icon parameter.

* java/org/gnu/emacs/EmacsDesktopNotification.java
(EmacsDesktopNotification) <icon>: New field.
(<init>): New argument ICON.  Set this.icon to its value.
(display1): Use provided icon and always supply a pending intent
to open Emacs once the notification is clicked.

* java/res/layout/sdk8_notifications_view.xml
(sdk8_notifications_title, sdk8_notifications_content): Set
foreground color to #000000.

* src/androidselect.c (android_init_emacs_desktop_notification):
Update signature of <init>.
(android_locate_icon): New function.
(android_notifications_notify_1): New arg ICON.
(Fandroid_notifications_notify): New parameter icon.
(syms_of_androidselect): <QCicon>: New symbol.
2023-08-21 09:36:52 +08:00
Po Lu
4f714dc081 Support desktop notifications on Android
* doc/emacs/android.texi (Android Environment): Correct list of
permissions granted by default.

* doc/lispref/os.texi (Desktop Notifications): Document the new
function `android-notifications-notify' and its limitations.

* java/AndroidManifest.xml.in: Request notification permissions.

* java/org/gnu/emacs/EmacsDesktopNotification.java: New file.

* java/res/layout/sdk8_notifications_view.xml: New file holding
substitute notification widget definitions for Android versions
prior to 3.0.

* java/res/values/strings.xml: Remove inadvertently introduced
tag attribute.

* lisp/org/org-clock.el (haiku-notifications-notify): Correct
file name in function declaration.
(android-notifications-notify): New declaration.
(org-show-notification): Use `android-notifications-notify'.

* src/androidselect.c (android_init_emacs_desktop_notification)
(android_notifications_notify_1, Fandroid_notifications_notify):
New functions.
(init_androidselect, syms_of_androidselect): Initialize new
class and define new subr.
2023-08-20 20:25:53 +08:00
Po Lu
11c8a2fa87 Make --with-shared-user-id work
* configure.ac (ANDROID_SHARED_USER_NAME): New variable.
Substitute it.
* java/AndroidManifest.xml.in: Set `sharedUserLabel' if a shared
user ID is enabled.
* java/res/values/strings.xml (shared_user_name): New string
resource.
2023-07-14 20:30:30 +08:00
Po Lu
0eb1f4e571 Allow starting Emacs --debug-init on Android
* doc/emacs/android.texi (Android Troubleshooting): Document
`debug-init' option.
* java/AndroidManifest.xml.in
(EmacsLauncherPreferencesActivity): New activity.  Export on
systems older than Android 7.0.
* java/org/gnu/emacs/EmacsActivity.java (onCreate): Adjust for
string startup argument.
* java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java: New
file.
* java/org/gnu/emacs/EmacsPreferencesActivity.java
(EmacsPreferencesActivity): Don't make final.
(startEmacsQ): Give start-up argument as an argument, not as a
boolean.
(startEmacsDebugInit): New function.
(onCreate): Register new listener; make final.
* java/org/gnu/emacs/EmacsService.java (onCreate): Pass
extraStartupArgument.
* java/org/gnu/emacs/EmacsThread.java (EmacsThread): Rename
startDashQ to extraStartupArgument.
(run): Adjust accordingly.
* java/res/values-v24/bool.xml:
* java/res/values/bool.xml:
* java/res/values/strings.xml: New files.
* java/res/xml/preferences.xml: Add new option.  Move string
resources around.
2023-05-26 15:20:39 +08:00
Po Lu
26b3b8433d Update Android port
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Don't
set the style here.
* java/res/values-v11/style.xml:
* java/res/values-v14/style.xml:
* java/res/values-v29/style.xml:
* java/res/values/style.xml: Define styles for the emacsclient
wrapper.
* src/keyboard.c (read_key_sequence): Don't disable text
conversion if use_mouse_menu or if a menu bar prefix key is
being displayed.
2023-03-05 15:55:24 +08:00
Po Lu
194b3f948c Update Android port
* java/AndroidManifest.xml.in: Specify @style/EmacsStyle.
* java/org/gnu/emacs/EmacsActivity.java (onCreate): Stop setting
the theme here.
* java/res/values-v11/style.xml:
* java/res/values-v14/style.xml:
* java/res/values-v29/style.xml:
* java/res/values/style.xml: Extract style resources into
res/values.
2023-03-01 14:31:57 +08:00
Po Lu
dc120c7ad6 Improve appearance of the Android preferences screen
* .gitignore: Add org/gnu/emacs/R.java.
* cross/Makefile.in (top_builddir): Include verbose.mk.  Rewrite
rules to print nice looking statements.
* doc/emacs/android.texi (Android, Android Startup)
(Android Environment, Android Windowing, Android Fonts):
* doc/emacs/emacs.texi (Top): Add an extra ``Android
Troubleshooting'' node and move troubleshooting details there.
* java/Makefile.in: Generate R.java; improve appearance by using
verbose.mk.

* java/org/gnu/emacs/EmacsPreferencesActivity.java: Reimplement
in terms of PreferencesActivity.
* java/org/gnu/emacs/EmacsView.java (handleDirtyBitmap): Avoid
flicker.
* java/res/xml/preferences.xml: New file.
* src/verbose.mk.in (AM_V_AAPT, AM_V_SILENT): New variables.
2023-02-10 23:03:43 +08:00
Po Lu
209ae003b7 Allow other text editors to edit files in Emacs' home directory
* java/AndroidManifest.xml.in: Declare the new documents
provider.
* java/README: Describe the meaning of files in res/values.
* java/org/gnu/emacs/EmacsDocumentsProvider.java
(EmacsDocumentsProvider): New file.
* java/res/values-v19/bool.xml:
* java/res/values/bool.xml: New files.
2023-02-09 22:56:41 +08:00
Po Lu
718b1d73d7 Add Emacs icon for Android
* java/res/drawable/emacs.png: New file.
2023-02-02 10:30:15 +08:00