summaryrefslogtreecommitdiffstats
path: root/core/jni/android_app_NativeActivity.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add API to get path to OBBs.Dianne Hackborn2011-01-161-11/+17
| | | | | | | | | Also hide the bitmap thumbnail stuff, we can't support it in its current form. And fix some bugs with propagating paths to native code. Yikes! Change-Id: I13ab37ddbdba5c073489cba5eab035117d3c1574
* Ensure the ShortcutManager uses the correct key character map.Jeff Brown2010-11-301-9/+24
| | | | | | | | | | | | | | | | | The ShortcutManager used to only receive the key code of the key event that triggered the shortcut. This change now provides the shortcut manager with the whole key event so it can look up the associated character using the correct key character map. To make this more efficient, added a mechanism for recycling key events. At the moment it is only used by key events owned by the system process, since clients of the existing API (such as Views) might continue to hold on to key events after dispatch has finished so they would break if the key event were recycled by the framework. Deprecated KeyCharacterMap.BUILT_IN_KEYBOARD. Change-Id: I4313725dd63f2be01c350c005a41c7fde9bc67e8
* Tell system server whether the app handled input events.Jeff Brown2010-11-081-9/+13
| | | | | | | | | | Refactored ViewRoot, NativeActivity and related classes to tell the dispatcher whether an input event was actually handled by the application. This will be used to move more of the global default key processing into the system server instead of the application. Change-Id: If06b98b6f45c543e5ac5b1eae2b3baf9371fba28
* Fix debug statements and aapt assert.Patrick Scott2010-10-261-1/+1
| | | | | | ENABLE_PSEUDOLOCALIZE seems to not exist. Change-Id: Ifef771a96938c7ff0f8b664142bb502030b8c543
* Fix issue #3126018: No way to specify NativeActivity's native methodDianne Hackborn2010-10-241-3/+7
| | | | Change-Id: I59de6a543e7f7f45d963a905829a3f56f32bf8cf
* Fix issue #3117918: No way to finish a native activityDianne Hackborn2010-10-211-2/+32
| | | | Change-Id: Ic53e712f7ab5412d72a31b96ecba252344b91644
* Replace epoll() with poll() and rename PollLoop to Looper.Jeff Brown2010-09-141-20/+20
| | | | | | | | | | | | | | | As part of this change, consolidated and cleaned up the Looper API so that there are fewer distinctions between the NDK and non-NDK declarations (no need for two callback types, etc.). Removed the dependence on specific constants from sys/poll.h such as POLLIN. Instead looper.h defines events like LOOPER_EVENT_INPUT for the events that it supports. That should help make any future under-the-hood implementation changes easier. Fixed a couple of compiler warnings along the way. Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
* Modify native ALooper to take an explicit ident.Dianne Hackborn2010-09-071-3/+4
| | | | | | | | The ALooper API now uses an explicit "identifier" for the integer that is returned rather than implicitly using the fd. This allows the APIs that had the fd to be a little more sane. Change-Id: I8507f535ad484c0bdc4a1bd016d87bb09acd7ff0
* More native work.Dianne Hackborn2010-08-111-6/+44
| | | | | | | Implement save/restore of state, and add native APIs for configuration information. Change-Id: I2a3ddc2ba605db58d7c8b2b31b9215fb323f90b5
* Implement native key pre-dispatching to IMEs.Dianne Hackborn2010-07-151-44/+208
| | | | | | | | | | | | | | | | This significantly re-works the native key dispatching code to allow events to be pre-dispatched to the current IME before being processed by native code. It introduces one new public API, which must be called after retrieving an event if the app wishes for it to be pre-dispatched. Currently the native code will only do pre-dispatching of system keys, to avoid significant overhead for gaming input. This should be improved to be smarted, filtering for only keys that the IME is interested in. Unfortunately IMEs don't currently provide this information. :p Change-Id: Ic1c7aeec8b348164957f2cd88119eb5bd85c2a9f
* Add support for new input sources.Jeff Brown2010-07-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Added several new coordinate values to MotionEvents to capture touch major/minor area, tool major/minor area and orientation. Renamed NDK input constants per convention. Added InputDevice class in Java which will eventually provide useful information about available input devices. Added APIs for manufacturing new MotionEvent objects with multiple pointers and all necessary coordinate data. Fixed a bug in the input dispatcher where it could get stuck with a pointer down forever. Fixed a bug in the WindowManager where the input window list could end up containing stale removed windows. Fixed a bug in the WindowManager where the input channel was being removed only after the final animation transition had taken place which caused spurious WINDOW DIED log messages to be printed. Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68
* Fix jni registration typoChristopher Tate2010-07-151-1/+1
| | | | Change-Id: I930fe00edec4e19f643a6de5b1bfd0d59e0846db
* Add native C APIs for working with the Asset ManagerChristopher Tate2010-07-151-4/+8
| | | | Change-Id: I493b142c4b35e5cc1a1e85283bb5dfb306a6d261
* IME events are now dispatched to native applications.Dianne Hackborn2010-07-131-34/+303
| | | | | | | | | | | | | | | And also: - APIs to show and hide the IME, and control its interaction with the app. - APIs to tell the app when its window resizes and needs to be redrawn. - API to tell the app the content rectangle of its window (to layout around the IME or status bar). There is still a problem with IME interaction -- we need a way for the app to deliver events to the IME before it handles them, so that for example the back key will close the IME instead of finishing the app. Change-Id: I37b75fc2ec533750ef36ca3aedd2f0cc0b5813cd
* Add ANativeWindow API for directly drawing to the surface bits.Dianne Hackborn2010-07-091-49/+122
| | | | | | | | | | | Also other cleanup and fixes: - We now properly set the default window format to 565. - New APIs to set the window format and flags from native code. - Tweaked glue for simpler handling of the "destroy" message. - Um, other stuff. Change-Id: Id7790a21a2fa9a19b91854d225324a7c1e7c6ade
* Add new native Looper API.Dianne Hackborn2010-07-021-2/+20
| | | | | | | | | | | This allows us to avoid exposing the file descriptor of the event queue; instead, you attach an event queue to a looper. This will also should allow native apps to be written without the need for a separate thread, by attaching the event queue to the main thread's looper and scheduling their own messages there. Change-Id: I38489282635895ae2cbfacb88599c1b1cad9b239
* Get to the point of being able to do native drawing.Dianne Hackborn2010-07-011-2/+6
| | | | | | A little cleanup. Change-Id: I37ef0557abf330d91d6fe47e81d062206b3bc346
* Make real API for native code to get its window.Dianne Hackborn2010-07-011-22/+56
| | | | | | | Added implementation to use ANativeWindow and provide it to a NativeActivity. Change-Id: I890d71b6e15d4af71e6cf81b327961d7061ec1c2
* Implement default key handling for native code.Dianne Hackborn2010-06-301-13/+124
| | | | | | | | | The native code now maintains a list of all keys that may use default handling. If the app finishes one of these keys without handling it, the key will be passed back off to Java for default treatment. Change-Id: I6a842a0d728eeafa4de7142fae573f8c11099e18
* Update native activity & event APIs to follow correct conventions.Dianne Hackborn2010-06-291-12/+17
| | | | Change-Id: Ie64fb3a9c68bc9c117fa5621b75d1f609e304e0e
* First stab at attaching native event dispatching.Dianne Hackborn2010-06-221-1/+68
| | | | | | | | | | | | Provides the basic infrastructure for a NativeActivity's native code to get an object representing its event stream that can be used to read input events. Still work to do, probably some API changes, and reasonable default key handling (so that for example back will still work). Change-Id: I6db891bc35dc9683181d7708eaed552b955a077e
* Update NativeActivity to allow direct surface access.Dianne Hackborn2010-05-181-13/+74
| | | | | | No actual native API for using a surface, but it's a step. Change-Id: I627f26b705abc7a05edf9117411abfacf0fae64a
* First pass at NativeActivity.Dianne Hackborn2010-05-051-0/+190
This is a rough sketch of the new pure-native API, which you can use through a NativeActivity in your manifest (no Java code in the .apk needed!). Intentionally no docs yet, the API is still being seriously messed with. But it works. Change-Id: I0e916d58a0d159ecaf3689e41834eb8dc681c0c0