History log of /frameworks/base/core/java/android/app/NativeActivity.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a55c7f15a3c386ec643f21eeb2f4e9fd7b03ba70 23-Feb-2016 Dimitry Ivanov <dimitry@google.com> Create linker-namespace for the classloader

With this change ApplicationLoaders.getClassLoader()
creates linker-namespace for the classloader at the
construction time. Before this change the namespace
was created on first load of a jni library.

With this change we ensure that every classloader
has initialized namespace associated with it.

As an additional advantage we now can avoid storing
namespace-specific fields in the classloaders.

Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: I3b160bd478a55171008682c40b2ebc13bdbd9882
/frameworks/base/core/java/android/app/NativeActivity.java
b9c9026bdd0076014aeca62b088053d8fbce2326 19-Feb-2016 Dimitry Ivanov <dimitry@google.com> Construct classloader for apps with no java code

The commit 6f06ad7df1362e9e5b252689f452bdeee2e5af46
fixed a way to load native library for NativeActivity
by using classloader logic to find the library; which
also fixed the problem of native activity not working
when library is supposed to be opened directly from
the apk.

As a side effect it introduced regression - apps without
java code did not have correctly initialized classloader.
This change fixes this by constructing classloader with
empty dexpath but valid nativeLibrarySearchPath.

Bug: http://b/26015561
Bug: http://b/27250344
Change-Id: I50f1119f0976a95edd75d88efb9fcdedc57efbc3
/frameworks/base/core/java/android/app/NativeActivity.java
048a0db7b512326d0fae0efa7fef7ea2d17a3dd8 15-Nov-2015 Dmitriy Ivanov <dimitry@google.com> Use nativeloader to load NativeActivity

System apps are the exception and they can
access internal platform libraries (this
is needed for bundled apps to work correctly).

Also fix the way NativeActivity loads the native
library to correspond to the way BaseDexClassloader
does it.

Bug: http://b/22548808
Bub: http://b/25777936
Change-Id: Idc94cdded182ea2cb1cbebc76c336cc3394c7ebe
(cherry picked from commit 6f06ad7df1362e9e5b252689f452bdeee2e5af46)
/frameworks/base/core/java/android/app/NativeActivity.java
777ef95ebf18c61ff09e7567a06058d351c530ca 26-Nov-2015 Yohei Yukawa <yukawa@google.com> Use Context.getSystemService(Class<T>) for InputMethodManager.

This is a mechanical replacement of Context.getSystemService(String)
with Context.getSystemService(Class<T>) when retrieving
InputMethodManager. Note those are bundled code. Hence we don't need
to make sure Build.VERSION.SDK_INT >= 23.

Change-Id: Icc64942ad8f11e44bf84f8d4fe476b2fdd1257f3
/frameworks/base/core/java/android/app/NativeActivity.java
58b8b24256bdc2b613b7fda9151845ed9898a4c7 02-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Use long for pointers in App/Backup

For storing pointers, long is used, as
native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: I7aee49dc26cf6c86af8f1d882e9cd1cc145a1977
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
/frameworks/base/core/java/android/app/NativeActivity.java
e0475c828773aae42bf6bf54422df996d6b0fcef 15-Aug-2013 Jeff Sharkey <jsharkey@android.com> Gracefully handle missing directories.

Bug: 10295932
Change-Id: I9d18682d0ba57bf7f77d043ee8dab286ee80ba2a
/frameworks/base/core/java/android/app/NativeActivity.java
1abdb7123025e52512b2ed7a518f8c754c35f50a 12-Aug-2013 Jeff Sharkey <jsharkey@android.com> APIs for multiple external storage devices.

Provide developer APIs to discover application-specific paths on
secondary external storage devices. Covers files, cache, and OBB
directories. Apps will not have write access outside their package-
specific directories on secondary devices, so only primary storage is
exposed through Environment.

Creation of .nomedia files will be handled by FUSE daemon in future
change.

Change-Id: Ifcce6201a686d80269d7285adb597c008cf8fa7c
/frameworks/base/core/java/android/app/NativeActivity.java
a44dd26a75e24cc021802288fb81f4761e47be6b 11-Apr-2013 Michael Wright <michaelwr@google.com> Rewrite input handling for native applications

Bug: 8473020
Change-Id: Ic4353d8924ab877bec21aff8c2dba9fe725bf906
/frameworks/base/core/java/android/app/NativeActivity.java
f9e989d5f09e72f5c9a59d713521f37d3fdd93dd 05-Apr-2013 Jeff Brown <jeffbrown@google.com> Queues, queues, queues and input.

Redesigned how ViewRootImpl delivers input events to views,
the IME and to native activities to fix several issues.

The prior change to make IME input event delegation use
InputChannels failed to take into account that InputMethodManager
is a singleton attached to the main looper whereas UI may be
attached to any looper. Consequently interactions with the
InputChannel might occur on the wrong thread. Fixed this
problem by checking the current thread and posting input
events or callbacks to the correct looper when necessary.

NativeActivity has also been broken for a while because the
default event handling logic for joysticks and touch navigation
was unable to dispatch events back into the native activity.
In particular, this meant that DPad synthesis from touch navigation
would not work in any native activity. The plan is to fix
this problem by passing all events through ViewRootImpl as usual
then forwarding them to native activity as needed. This should
greatly simplify IME pre-dispatch and system key handling
and make everything more robust overall.

Fixed issues related to when input events are synthesized.
In particular, added a more robust mechanism to ensure that
synthetic events are canceled appropriately when we discover
that events are no longer being resynthesized (because the
application or IME is handling or dropping them).

The new design is structured as a pipeline with a chain of
responsibility consisting of InputStage objects. Each InputStage
is responsible for some part of handling each input event
such as dispatching to the view hierarchy or to the IME.
As a stage processes an input event, it has the option of
finishing the event, forwarding the event to the next stage
or handling the event asynchronously. Some queueing logic
takes care to ensure that events are forwarded downstream in
the correct order even if they are handled out of order
by a given stage.

Cleaned up the InputMethodManager singleton initialization logic
to make it clearer that it must be attached to the main looper.
We don't actually need to pass this looper around.

Deleted the LatencyTimer class since no one uses it and we have
better ways of measuring latency these days using systrace.

Added a hidden helper to Looper to determine whether the current
thread is the indicated Looper thread.

Note: NativeActivity's IME dispatch is broken by this patch.
This will be fixed later in another patch.

Bug: 8473020
Change-Id: Iac2a1277545195a7a0137bbbdf04514c29165c60
/frameworks/base/core/java/android/app/NativeActivity.java
c28867a1d67121ce5963de135e3ae2b1dbd9a33d 26-Mar-2013 Jeff Brown <jeffbrown@google.com> Use input transport for communications between app and IME.

The input method manager service now supplies an input channel for
communication while creating an IME session on behalf of the
application.

This change significanly reduces the overhead of IME event dispatch
by using a standard input channel to send input events rather than
using binder. This results in fewer thread context switches
and fewer object allocations.

What's more, the IME may perform additional batching of the motion
events that it receives which may help it catch up if it is
getting behind while processing them.

Bug: 7984576
Bug: 8473020
Change-Id: Ibe26311edd0060cdcae80194f1753482e635786f
/frameworks/base/core/java/android/app/NativeActivity.java
04ddf3c0508f3d50e6ab82cecc0adc92f52b7803 14-Jun-2012 Jeff Brown <jeffbrown@google.com> Allow applications to recover from IME related ANRs.

Timeout after 2.5 seconds.

Because communication with an IME occurs asynchronously
using oneway binder calls, it's possible for an input event
that was delegated to the IME to be dropped on the floor.
When this happens, the app (not the IME!) will get blamed
for the problem and will ANR forever.

Even if an event is not dropped on the floor, we should
eventually time out event dispatch to the IME if it's
being too slow.

This patch implements a timeout on all events delegated
to the IME. When the timeout expires, the event is marked
as having not been handled by the IME and the application
gets a crack at it. We also write a message to the log when
this occurs.

Ensure that we do not invoke the event finished callback
while holding the InputMethodManager's lock to avoid
potential deadlocks.

Fixed a minor bug where the InputMethodManager would not
remember the id of the current input method. This caused
the log messages and dumpsys state to print "null" as the
current input method id.

Bug: 6662465
Change-Id: Ibb3ddeb087ee6998996b0b845134e16a18aa3057
/frameworks/base/core/java/android/app/NativeActivity.java
805fd7ee0e5dc2939e85c84f78d9890a51982bc0 17-Jan-2011 Dianne Hackborn <hackbod@google.com> Add API to get path to OBBs.

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
/frameworks/base/core/java/android/app/NativeActivity.java
3915bb845b032dc184dba5e60970b803390ca3ed 05-Nov-2010 Jeff Brown <jeffbrown@google.com> Tell system server whether the app handled input events.

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
/frameworks/base/core/java/android/app/NativeActivity.java
e21d91c694e828e6285cc50e79b2a6be6e8c692b 24-Oct-2010 Dianne Hackborn <hackbod@google.com> Fix issue #3126018: No way to specify NativeActivity's native method

Change-Id: I59de6a543e7f7f45d963a905829a3f56f32bf8cf
/frameworks/base/core/java/android/app/NativeActivity.java
74b1ed3231b8cafcf4e5cb3f03d794acd5080004 20-Oct-2010 Dianne Hackborn <hackbod@google.com> Fix issue #3113219: NativeActivity using wrong lib path with Java code

Use the same path whether the .apk has dalvik code or not.

Change-Id: I66397d7f7e328d5580565ceb17a941afac0e0f8b
/frameworks/base/core/java/android/app/NativeActivity.java
6798b62e9230b744d877c4fcab2a0d949eab9f8f 03-Sep-2010 Kenny Root <kroot@google.com> Use new nativeLibraryPath field for NativeActivity

Instead of being naughty and guessing the native library path from
dataDir, use the new nativeLibraryPath field because it can be on SD
card now.

Change-Id: I284bde42e0b0114366e412eb7212af22b47208d8
/frameworks/base/core/java/android/app/NativeActivity.java
08d5b8fad8d46ccb64db2fdcb4d66972ec87bf48 04-Aug-2010 Dianne Hackborn <hackbod@google.com> More native work.

Implement save/restore of state, and add native APIs for
configuration information.

Change-Id: I2a3ddc2ba605db58d7c8b2b31b9215fb323f90b5
/frameworks/base/core/java/android/app/NativeActivity.java
2c6081ce3593712f30dacd990a97209c791d6ced 16-Jul-2010 Dianne Hackborn <hackbod@google.com> Implement native key pre-dispatching to IMEs.

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
/frameworks/base/core/java/android/app/NativeActivity.java
6cce32b6adbb3a9725fc730ba0e0068a74657e60 13-Jul-2010 Christopher Tate <ctate@google.com> Add native C APIs for working with the Asset Manager

Change-Id: I493b142c4b35e5cc1a1e85283bb5dfb306a6d261
/frameworks/base/core/java/android/app/NativeActivity.java
d76b67c340d1564abf8d14d976fdaf83bf2b3320 14-Jul-2010 Dianne Hackborn <hackbod@google.com> IME events are now dispatched to native applications.

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
/frameworks/base/core/java/android/app/NativeActivity.java
682674154e3fe88f6061245145f934f25f1a2eb8 03-Jul-2010 Dianne Hackborn <hackbod@google.com> Add new native Looper API.

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
/frameworks/base/core/java/android/app/NativeActivity.java
54a181b1a2b1517a9479b21fbf7705a688232faf 01-Jul-2010 Dianne Hackborn <hackbod@google.com> Make real API for native code to get its window.

Added implementation to use ANativeWindow and provide
it to a NativeActivity.

Change-Id: I890d71b6e15d4af71e6cf81b327961d7061ec1c2
/frameworks/base/core/java/android/app/NativeActivity.java
3c80a4a044865bdf1289c7896baffa1c082d835c 30-Jun-2010 Dianne Hackborn <hackbod@google.com> Implement default key handling for native code.

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
/frameworks/base/core/java/android/app/NativeActivity.java
1e4b9f3936d6f357e89360293e05a0e16d5fa440 23-Jun-2010 Dianne Hackborn <hackbod@google.com> Remove InputConsumer, replacing with InputQueue.

Change-Id: Ib06907278457aaee842b123adc072840ca3602d8
/frameworks/base/core/java/android/app/NativeActivity.java
a95e4cb62f3642cb190d032dbf7dc40d9ecc6973 19-Jun-2010 Dianne Hackborn <hackbod@google.com> First stab at attaching native event dispatching.

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
/frameworks/base/core/java/android/app/NativeActivity.java
74323fd1ab8eb11beea286d5c213c63e4b803141 19-May-2010 Dianne Hackborn <hackbod@google.com> Update NativeActivity to allow direct surface access.

No actual native API for using a surface, but it's a step.

Change-Id: I627f26b705abc7a05edf9117411abfacf0fae64a
/frameworks/base/core/java/android/app/NativeActivity.java
69969e48f2bca9339662dddfacff0bbf6374ed7f 04-May-2010 Dianne Hackborn <hackbod@google.com> First pass at NativeActivity.

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
/frameworks/base/core/java/android/app/NativeActivity.java