mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-08 08:43:52 -08:00
Android compatibility fixes
* doc/emacs/android.texi (Android Windowing): Document restrictions on number of windows under Android 4.4 and earlier. * java/AndroidManifest.xml.in <EmacsActivity> <EmacsOpenActivity, EmacsMultitaskActivity>: Assign each class of activity a unique task affinity. * java/org/gnu/emacs/EmacsDesktopNotification.java (display1): Remove redundant priority assignment. * java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Handle file URIs when processing attachments from a mailto URI, and check for KitKat before opening content ones. * java/org/gnu/emacs/EmacsWindow.java <pointerMap> (figureChange): Replace coordinate HashMap with a SparseArray. * java/org/gnu/emacs/EmacsWindowAttachmentManager.java (registerWindow): Don't specify FLAG_ACTIVITY_NEW_DOCUMENT on systems where it is absent.
This commit is contained in:
parent
0df28dc00e
commit
ad0492c5a9
6 changed files with 70 additions and 30 deletions
|
|
@ -208,22 +208,6 @@ public final class EmacsDesktopNotification
|
|||
distinct categories, but permit an importance to be
|
||||
assigned to each individual notification. */
|
||||
|
||||
switch (importance)
|
||||
{
|
||||
case 2: /* IMPORTANCE_LOW */
|
||||
default:
|
||||
priority = Notification.PRIORITY_LOW;
|
||||
break;
|
||||
|
||||
case 3: /* IMPORTANCE_DEFAULT */
|
||||
priority = Notification.PRIORITY_DEFAULT;
|
||||
break;
|
||||
|
||||
case 4: /* IMPORTANCE_HIGH */
|
||||
priority = Notification.PRIORITY_HIGH;
|
||||
break;
|
||||
}
|
||||
|
||||
builder = new Notification.Builder (context);
|
||||
builder.setContentTitle (title);
|
||||
builder.setContentText (content);
|
||||
|
|
@ -231,15 +215,28 @@ public final class EmacsDesktopNotification
|
|||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
|
||||
{
|
||||
switch (importance)
|
||||
{
|
||||
case 2: /* IMPORTANCE_LOW */
|
||||
default:
|
||||
priority = Notification.PRIORITY_LOW;
|
||||
break;
|
||||
|
||||
case 3: /* IMPORTANCE_DEFAULT */
|
||||
priority = Notification.PRIORITY_DEFAULT;
|
||||
break;
|
||||
|
||||
case 4: /* IMPORTANCE_HIGH */
|
||||
priority = Notification.PRIORITY_HIGH;
|
||||
break;
|
||||
}
|
||||
|
||||
builder.setPriority (priority);
|
||||
insertActions (context, builder);
|
||||
notification = builder.build ();
|
||||
}
|
||||
else
|
||||
notification = builder.getNotification ();
|
||||
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN)
|
||||
notification.priority = priority;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue