summaryrefslogtreecommitdiffstats
path: root/cmds/idmap
diff options
context:
space:
mode:
authorPiotr Jastrzebski <haaawk@google.com>2015-02-12 13:55:23 +0000
committerPiotr Jastrzebski <haaawk@google.com>2015-02-13 13:32:25 +0000
commitda74a628f55fe32a8f8d8542689032f4f6f1c44c (patch)
tree853a12cdf06c770290a7986ebbe170bb329c5b56 /cmds/idmap
parentb4a5c04c305a04a876728397dec7cc809e26b823 (diff)
downloadframeworks_base-da74a628f55fe32a8f8d8542689032f4f6f1c44c.zip
frameworks_base-da74a628f55fe32a8f8d8542689032f4f6f1c44c.tar.gz
frameworks_base-da74a628f55fe32a8f8d8542689032f4f6f1c44c.tar.bz2
Register DDM handlers at the beginning of main method.
Compiler initializes RuntimeInit during compilation and stores an initialized version of the class in oat file. Same thing happens to DdmServer which handles DDM packets in JDWP thread started during JVM creation. This means that after the creation of JVM all DDM packets are handled by DdmServer.dispatch and since it's already initialized during compilation it has all framework related handlers already registered. If a packet arrives before AndroidRuntime.startReg is called then framework native methods are not yet registered and the processing of the packet fails with UnsatisfiedLinkError. To fix this problem the registration of framework related DDM handlers is moved to the beginning of ZygoteInit.main and RuntimeInit.main. This means that the handlers won't be registered until main method is called and that's guaranteed to be after AndroidRuntime.startReg is called. It also guarantees that DDM packets will be properly handled as soon as Java code is executed. Bug: 18081539. Change-Id: I9c674f53f3f62d58c46886e0b60698182e08f0c3
Diffstat (limited to 'cmds/idmap')
0 files changed, 0 insertions, 0 deletions