android:extractNativeLibs="true">
<activity android:name="org.gnu.emacs.EmacsActivity"
- android:launchMode="singleTop"
+ android:launchMode="singleInstance"
android:windowSoftInputMode="adjustResize"
android:exported="true"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden">
</activity>
<activity android:name="org.gnu.emacs.EmacsOpenActivity"
+ android:taskAffinity="open.dialog"
+ android:excludeFromRecents="true"
android:exported="true">
<!-- Allow Emacs to open all kinds of files known to Android. -->
<data android:mimeType="image/t38"/>
<data android:mimeType="image/tiff"/>
<data android:mimeType="image/tiff-fx"/>
+ <data android:mimeType="image/xpm"/>
<data android:mimeType="text/*"/>
<data android:mimeType="application/*xml"/>
<data android:mimeType="application/atom+xml"/>
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 ();
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")
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);