Perform setup(Activity) just once
Change-Id: Icf77936c4307f816e85cb840d650a4c958a15995
This commit is contained in:
@@ -124,10 +124,17 @@ public class Bootstrap extends NativeActivity
|
|||||||
|
|
||||||
public static native void delete_byte_buffer_wrapper(long bbw);
|
public static native void delete_byte_buffer_wrapper(long bbw);
|
||||||
|
|
||||||
|
static boolean setup_done = false;
|
||||||
|
|
||||||
// This setup() method is called 1) in apps that use *this* class as their activity from onCreate(),
|
// This setup() method is called 1) in apps that use *this* class as their activity from onCreate(),
|
||||||
// and 2) should be called from other kinds of LO code using apps.
|
// and 2) should be called from other kinds of LO code using apps.
|
||||||
public static void setup(Activity activity)
|
public static synchronized void setup(Activity activity)
|
||||||
{
|
{
|
||||||
|
if (setup_done)
|
||||||
|
return;
|
||||||
|
|
||||||
|
setup_done = true;
|
||||||
|
|
||||||
String dataDir = null;
|
String dataDir = null;
|
||||||
|
|
||||||
ApplicationInfo ai = activity.getApplicationInfo();
|
ApplicationInfo ai = activity.getApplicationInfo();
|
||||||
|
Reference in New Issue
Block a user