mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 23:10:47 -08:00
Update Android port
* java/AndroidManifest.xml.in: Prevent the Emacs activity from being overlayed by the emacsclient wrapper. * java/org/gnu/emacs/EmacsOpenActivity.java (run): Likewise. (onCreate): Set an appropriate theme on ICS and up. * java/org/gnu/emacs/EmacsWindow.java (onTouchEvent): Handle ACTION_CANCEL correctly.
This commit is contained in:
parent
7275e32d0b
commit
fc82efc1fe
3 changed files with 16 additions and 3 deletions
|
|
@ -184,7 +184,9 @@ public class EmacsOpenActivity extends Activity
|
|||
|
||||
intent = new Intent (EmacsOpenActivity.this,
|
||||
EmacsActivity.class);
|
||||
intent.addFlags (Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
/* This means only an existing frame will be displayed. */
|
||||
intent.addFlags (Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
startActivity (intent);
|
||||
|
||||
EmacsOpenActivity.this.finish ();
|
||||
|
|
@ -285,6 +287,11 @@ public class EmacsOpenActivity extends Activity
|
|||
return;
|
||||
}
|
||||
|
||||
/* Set an appropriate theme. */
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
|
||||
setTheme (android.R.style.Theme_DeviceDefault);
|
||||
|
||||
/* Now see if the action specified is supported by Emacs. */
|
||||
|
||||
if (action.equals ("android.intent.action.VIEW")
|
||||
|
|
|
|||
|
|
@ -794,7 +794,10 @@ public class EmacsWindow extends EmacsHandleObject
|
|||
|
||||
case MotionEvent.ACTION_UP:
|
||||
case MotionEvent.ACTION_POINTER_UP:
|
||||
/* Touch up event. */
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
/* Touch up event. Android documentation says ACTION_CANCEL
|
||||
should be treated as more or less equivalent to ACTION_UP,
|
||||
so that is what is done here. */
|
||||
EmacsNative.sendTouchUp (this.handle, (int) event.getX (index),
|
||||
(int) event.getY (index),
|
||||
event.getEventTime (), pointerID);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue