Changeset 1940


Ignore:
Timestamp:
Sep 21, 2012, 11:03:51 PM (5 years ago)
Author:
sam
Message:

android: if current thread is unknown to the JVM, try to register it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/image/codec/android-image.cpp

    r1513 r1940  
    5454    {
    5555#if !LOL_RELEASE
    56         Log::Error("could not get JVM environment\n");
     56        Log::Error("JVM environment not found, trying to attach thread\n");
     57#endif
     58        res = g_vm->AttachCurrentThread(&env, NULL);
     59    }
     60    if (res < 0)
     61    {
     62#if !LOL_RELEASE
     63        Log::Error("JVM environment not found, cannot open image %s\n", path);
    5764#endif
    5865        return false;
     
    106113    {
    107114#if !LOL_RELEASE
    108         Log::Error("could not get JVM environment\n");
     115        Log::Error("JVM environment not found, cannot close image\n");
    109116#endif
    110117        return false;
Note: See TracChangeset for help on using the changeset viewer.