java_godot_lib_jni.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. /*************************************************************************/
  2. /* java_godot_lib_jni.cpp */
  3. /*************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /*************************************************************************/
  8. /* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
  9. /* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /*************************************************************************/
  30. #include "java_godot_lib_jni.h"
  31. #include "java_godot_io_wrapper.h"
  32. #include "java_godot_wrapper.h"
  33. #include "android/asset_manager_jni.h"
  34. #include "android_input_handler.h"
  35. #include "api/java_class_wrapper.h"
  36. #include "api/jni_singleton.h"
  37. #include "core/config/engine.h"
  38. #include "core/config/project_settings.h"
  39. #include "core/input/input.h"
  40. #include "dir_access_jandroid.h"
  41. #include "display_server_android.h"
  42. #include "file_access_android.h"
  43. #include "jni_utils.h"
  44. #include "main/main.h"
  45. #include "net_socket_android.h"
  46. #include "os_android.h"
  47. #include "string_android.h"
  48. #include "thread_jandroid.h"
  49. #include "tts_android.h"
  50. #include <android/input.h>
  51. #include <unistd.h>
  52. #include <android/native_window_jni.h>
  53. static JavaClassWrapper *java_class_wrapper = nullptr;
  54. static OS_Android *os_android = nullptr;
  55. static AndroidInputHandler *input_handler = nullptr;
  56. static GodotJavaWrapper *godot_java = nullptr;
  57. static GodotIOJavaWrapper *godot_io_java = nullptr;
  58. static bool initialized = false;
  59. static SafeNumeric<int> step; // Shared between UI and render threads
  60. static Size2 new_size;
  61. static Vector3 accelerometer;
  62. static Vector3 gravity;
  63. static Vector3 magnetometer;
  64. static Vector3 gyroscope;
  65. extern "C" {
  66. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHeight(JNIEnv *env, jclass clazz, jint p_height) {
  67. if (godot_io_java) {
  68. godot_io_java->set_vk_height(p_height);
  69. }
  70. }
  71. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jclass clazz, jobject activity, jobject godot_instance, jobject p_asset_manager, jboolean p_use_apk_expansion) {
  72. initialized = true;
  73. JavaVM *jvm;
  74. env->GetJavaVM(&jvm);
  75. // create our wrapper classes
  76. godot_java = new GodotJavaWrapper(env, activity, godot_instance);
  77. godot_io_java = new GodotIOJavaWrapper(env, godot_java->get_member_object("io", "Lorg/godotengine/godot/GodotIO;", env));
  78. init_thread_jandroid(jvm, env);
  79. jobject amgr = env->NewGlobalRef(p_asset_manager);
  80. FileAccessAndroid::asset_manager = AAssetManager_fromJava(env, amgr);
  81. DirAccessJAndroid::setup(godot_io_java->get_instance());
  82. NetSocketAndroid::setup(godot_java->get_member_object("netUtils", "Lorg/godotengine/godot/utils/GodotNetUtils;", env));
  83. TTS_Android::setup(godot_java->get_member_object("tts", "Lorg/godotengine/godot/tts/GodotTTS;", env));
  84. os_android = new OS_Android(godot_java, godot_io_java, p_use_apk_expansion);
  85. char wd[500];
  86. getcwd(wd, 500);
  87. godot_java->on_video_init(env);
  88. }
  89. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_ondestroy(JNIEnv *env, jclass clazz) {
  90. // lets cleanup
  91. if (java_class_wrapper) {
  92. memdelete(java_class_wrapper);
  93. }
  94. if (godot_io_java) {
  95. delete godot_io_java;
  96. }
  97. if (godot_java) {
  98. delete godot_java;
  99. }
  100. if (input_handler) {
  101. delete input_handler;
  102. }
  103. if (os_android) {
  104. os_android->main_loop_end();
  105. delete os_android;
  106. }
  107. }
  108. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jclass clazz, jobjectArray p_cmdline) {
  109. setup_android_thread();
  110. const char **cmdline = nullptr;
  111. jstring *j_cmdline = nullptr;
  112. int cmdlen = 0;
  113. if (p_cmdline) {
  114. cmdlen = env->GetArrayLength(p_cmdline);
  115. if (cmdlen) {
  116. cmdline = (const char **)memalloc((cmdlen + 1) * sizeof(const char *));
  117. ERR_FAIL_NULL_MSG(cmdline, "Out of memory.");
  118. cmdline[cmdlen] = nullptr;
  119. j_cmdline = (jstring *)memalloc(cmdlen * sizeof(jstring));
  120. ERR_FAIL_NULL_MSG(j_cmdline, "Out of memory.");
  121. for (int i = 0; i < cmdlen; i++) {
  122. jstring string = (jstring)env->GetObjectArrayElement(p_cmdline, i);
  123. const char *rawString = env->GetStringUTFChars(string, 0);
  124. cmdline[i] = rawString;
  125. j_cmdline[i] = string;
  126. }
  127. }
  128. }
  129. Error err = Main::setup(OS_Android::ANDROID_EXEC_PATH, cmdlen, (char **)cmdline, false);
  130. if (cmdline) {
  131. if (j_cmdline) {
  132. for (int i = 0; i < cmdlen; ++i) {
  133. env->ReleaseStringUTFChars(j_cmdline[i], cmdline[i]);
  134. }
  135. memfree(j_cmdline);
  136. }
  137. memfree(cmdline);
  138. }
  139. if (err != OK) {
  140. return; // should exit instead and print the error
  141. }
  142. java_class_wrapper = memnew(JavaClassWrapper(godot_java->get_activity()));
  143. GDREGISTER_CLASS(JNISingleton);
  144. }
  145. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jclass clazz, jobject p_surface, jint p_width, jint p_height) {
  146. if (os_android) {
  147. os_android->set_display_size(Size2i(p_width, p_height));
  148. // No need to reset the surface during startup
  149. if (step.get() > 0) {
  150. if (p_surface) {
  151. ANativeWindow *native_window = ANativeWindow_fromSurface(env, p_surface);
  152. os_android->set_native_window(native_window);
  153. DisplayServerAndroid::get_singleton()->reset_window();
  154. DisplayServerAndroid::get_singleton()->notify_surface_changed(p_width, p_height);
  155. }
  156. }
  157. }
  158. }
  159. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *env, jclass clazz, jobject p_surface) {
  160. if (os_android) {
  161. if (step.get() == 0) {
  162. // During startup
  163. if (p_surface) {
  164. ANativeWindow *native_window = ANativeWindow_fromSurface(env, p_surface);
  165. os_android->set_native_window(native_window);
  166. }
  167. } else {
  168. // Rendering context recreated because it was lost; restart app to let it reload everything
  169. step.set(-1); // Ensure no further steps are attempted and no further events are sent
  170. os_android->main_loop_end();
  171. godot_java->restart(env);
  172. }
  173. }
  174. }
  175. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, jclass clazz) {
  176. if (step.get() == 0) {
  177. return;
  178. }
  179. if (DisplayServerAndroid *dsa = Object::cast_to<DisplayServerAndroid>(DisplayServer::get_singleton())) {
  180. dsa->send_window_event(DisplayServer::WINDOW_EVENT_GO_BACK_REQUEST);
  181. }
  182. }
  183. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_ttsCallback(JNIEnv *env, jclass clazz, jint event, jint id, jint pos) {
  184. TTS_Android::_java_utterance_callback(event, id, pos);
  185. }
  186. JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jclass clazz) {
  187. if (step.get() == -1) {
  188. return true;
  189. }
  190. if (step.get() == 0) {
  191. // Since Godot is initialized on the UI thread, main_thread_id was set to that thread's id,
  192. // but for Godot purposes, the main thread is the one running the game loop
  193. Main::setup2(Thread::get_caller_id());
  194. input_handler = new AndroidInputHandler();
  195. step.increment();
  196. return true;
  197. }
  198. if (step.get() == 1) {
  199. if (!Main::start()) {
  200. return true; // should exit instead and print the error
  201. }
  202. godot_java->on_godot_setup_completed(env);
  203. os_android->main_loop_begin();
  204. godot_java->on_godot_main_loop_started(env);
  205. step.increment();
  206. }
  207. DisplayServerAndroid::get_singleton()->process_accelerometer(accelerometer);
  208. DisplayServerAndroid::get_singleton()->process_gravity(gravity);
  209. DisplayServerAndroid::get_singleton()->process_magnetometer(magnetometer);
  210. DisplayServerAndroid::get_singleton()->process_gyroscope(gyroscope);
  211. bool should_swap_buffers = false;
  212. if (os_android->main_loop_iterate(&should_swap_buffers)) {
  213. godot_java->force_quit(env);
  214. }
  215. return should_swap_buffers;
  216. }
  217. void touch_preprocessing(JNIEnv *env, jclass clazz, jint input_device, jint ev, jint pointer, jint pointer_count, jfloatArray positions, jint buttons_mask, jfloat vertical_factor, jfloat horizontal_factor) {
  218. if (step.get() <= 0) {
  219. return;
  220. }
  221. Vector<AndroidInputHandler::TouchPos> points;
  222. for (int i = 0; i < pointer_count; i++) {
  223. jfloat p[3];
  224. env->GetFloatArrayRegion(positions, i * 3, 3, p);
  225. AndroidInputHandler::TouchPos tp;
  226. tp.pos = Point2(p[1], p[2]);
  227. tp.id = (int)p[0];
  228. points.push_back(tp);
  229. }
  230. if ((input_device & AINPUT_SOURCE_MOUSE) == AINPUT_SOURCE_MOUSE || (input_device & AINPUT_SOURCE_MOUSE_RELATIVE) == AINPUT_SOURCE_MOUSE_RELATIVE) {
  231. input_handler->process_mouse_event(input_device, ev, buttons_mask, points[0].pos, vertical_factor, horizontal_factor);
  232. } else {
  233. input_handler->process_touch(ev, pointer, points);
  234. }
  235. }
  236. // Called on the UI thread
  237. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch__IIII_3F(JNIEnv *env, jclass clazz, jint input_device, jint ev, jint pointer, jint pointer_count, jfloatArray position) {
  238. touch_preprocessing(env, clazz, input_device, ev, pointer, pointer_count, position);
  239. }
  240. // Called on the UI thread
  241. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch__IIII_3FI(JNIEnv *env, jclass clazz, jint input_device, jint ev, jint pointer, jint pointer_count, jfloatArray position, jint buttons_mask) {
  242. touch_preprocessing(env, clazz, input_device, ev, pointer, pointer_count, position, buttons_mask);
  243. }
  244. // Called on the UI thread
  245. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch__IIII_3FIFF(JNIEnv *env, jclass clazz, jint input_device, jint ev, jint pointer, jint pointer_count, jfloatArray position, jint buttons_mask, jfloat vertical_factor, jfloat horizontal_factor) {
  246. touch_preprocessing(env, clazz, input_device, ev, pointer, pointer_count, position, buttons_mask, vertical_factor, horizontal_factor);
  247. }
  248. // Called on the UI thread
  249. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_hover(JNIEnv *env, jclass clazz, jint p_type, jfloat p_x, jfloat p_y) {
  250. if (step.get() <= 0) {
  251. return;
  252. }
  253. input_handler->process_hover(p_type, Point2(p_x, p_y));
  254. }
  255. // Called on the UI thread
  256. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_doubleTap(JNIEnv *env, jclass clazz, jint p_button_mask, jint p_x, jint p_y) {
  257. if (step.get() <= 0) {
  258. return;
  259. }
  260. input_handler->process_double_tap(p_button_mask, Point2(p_x, p_y));
  261. }
  262. // Called on the UI thread
  263. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_scroll(JNIEnv *env, jclass clazz, jint p_x, jint p_y) {
  264. if (step.get() <= 0) {
  265. return;
  266. }
  267. input_handler->process_scroll(Point2(p_x, p_y));
  268. }
  269. // Called on the UI thread
  270. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joybutton(JNIEnv *env, jclass clazz, jint p_device, jint p_button, jboolean p_pressed) {
  271. if (step.get() <= 0) {
  272. return;
  273. }
  274. AndroidInputHandler::JoypadEvent jevent;
  275. jevent.device = p_device;
  276. jevent.type = AndroidInputHandler::JOY_EVENT_BUTTON;
  277. jevent.index = p_button;
  278. jevent.pressed = p_pressed;
  279. input_handler->process_joy_event(jevent);
  280. }
  281. // Called on the UI thread
  282. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyaxis(JNIEnv *env, jclass clazz, jint p_device, jint p_axis, jfloat p_value) {
  283. if (step.get() <= 0) {
  284. return;
  285. }
  286. AndroidInputHandler::JoypadEvent jevent;
  287. jevent.device = p_device;
  288. jevent.type = AndroidInputHandler::JOY_EVENT_AXIS;
  289. jevent.index = p_axis;
  290. jevent.value = p_value;
  291. input_handler->process_joy_event(jevent);
  292. }
  293. // Called on the UI thread
  294. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyhat(JNIEnv *env, jclass clazz, jint p_device, jint p_hat_x, jint p_hat_y) {
  295. if (step.get() <= 0) {
  296. return;
  297. }
  298. AndroidInputHandler::JoypadEvent jevent;
  299. jevent.device = p_device;
  300. jevent.type = AndroidInputHandler::JOY_EVENT_HAT;
  301. HatMask hat = HatMask::CENTER;
  302. if (p_hat_x != 0) {
  303. if (p_hat_x < 0) {
  304. hat |= HatMask::LEFT;
  305. } else {
  306. hat |= HatMask::RIGHT;
  307. }
  308. }
  309. if (p_hat_y != 0) {
  310. if (p_hat_y < 0) {
  311. hat |= HatMask::UP;
  312. } else {
  313. hat |= HatMask::DOWN;
  314. }
  315. }
  316. jevent.hat = hat;
  317. input_handler->process_joy_event(jevent);
  318. }
  319. // Called on the UI thread
  320. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyconnectionchanged(JNIEnv *env, jclass clazz, jint p_device, jboolean p_connected, jstring p_name) {
  321. if (os_android) {
  322. String name = jstring_to_string(p_name, env);
  323. Input::get_singleton()->joy_connection_changed(p_device, p_connected, name);
  324. }
  325. }
  326. // Called on the UI thread
  327. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jclass clazz, jint p_keycode, jint p_scancode, jint p_unicode_char, jboolean p_pressed) {
  328. if (step.get() <= 0) {
  329. return;
  330. }
  331. input_handler->process_key_event(p_keycode, p_scancode, p_unicode_char, p_pressed);
  332. }
  333. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_accelerometer(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z) {
  334. accelerometer = Vector3(x, y, z);
  335. }
  336. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gravity(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z) {
  337. gravity = Vector3(x, y, z);
  338. }
  339. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_magnetometer(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z) {
  340. magnetometer = Vector3(x, y, z);
  341. }
  342. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gyroscope(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z) {
  343. gyroscope = Vector3(x, y, z);
  344. }
  345. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusin(JNIEnv *env, jclass clazz) {
  346. if (step.get() <= 0) {
  347. return;
  348. }
  349. os_android->main_loop_focusin();
  350. }
  351. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusout(JNIEnv *env, jclass clazz) {
  352. if (step.get() <= 0) {
  353. return;
  354. }
  355. os_android->main_loop_focusout();
  356. }
  357. JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *env, jclass clazz, jstring path) {
  358. String js = jstring_to_string(path, env);
  359. return env->NewStringUTF(ProjectSettings::get_singleton()->get(js).operator String().utf8().get_data());
  360. }
  361. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *env, jclass clazz, jlong ID, jstring method, jobjectArray params) {
  362. Object *obj = ObjectDB::get_instance(ObjectID(ID));
  363. ERR_FAIL_COND(!obj);
  364. int res = env->PushLocalFrame(16);
  365. ERR_FAIL_COND(res != 0);
  366. String str_method = jstring_to_string(method, env);
  367. int count = env->GetArrayLength(params);
  368. Variant *vlist = (Variant *)alloca(sizeof(Variant) * count);
  369. Variant **vptr = (Variant **)alloca(sizeof(Variant *) * count);
  370. for (int i = 0; i < count; i++) {
  371. jobject obj = env->GetObjectArrayElement(params, i);
  372. Variant v;
  373. if (obj) {
  374. v = _jobject_to_variant(env, obj);
  375. }
  376. memnew_placement(&vlist[i], Variant);
  377. vlist[i] = v;
  378. vptr[i] = &vlist[i];
  379. env->DeleteLocalRef(obj);
  380. }
  381. Callable::CallError err;
  382. obj->callp(str_method, (const Variant **)vptr, count, err);
  383. // something
  384. env->PopLocalFrame(nullptr);
  385. }
  386. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv *env, jclass clazz, jlong ID, jstring method, jobjectArray params) {
  387. Object *obj = ObjectDB::get_instance(ObjectID(ID));
  388. ERR_FAIL_COND(!obj);
  389. int res = env->PushLocalFrame(16);
  390. ERR_FAIL_COND(res != 0);
  391. String str_method = jstring_to_string(method, env);
  392. int count = env->GetArrayLength(params);
  393. Variant *args = (Variant *)alloca(sizeof(Variant) * count);
  394. const Variant **argptrs = (const Variant **)alloca(sizeof(Variant *) * count);
  395. for (int i = 0; i < count; i++) {
  396. jobject obj = env->GetObjectArrayElement(params, i);
  397. if (obj) {
  398. args[i] = _jobject_to_variant(env, obj);
  399. }
  400. env->DeleteLocalRef(obj);
  401. argptrs[i] = &args[i];
  402. }
  403. MessageQueue::get_singleton()->push_callp(obj, str_method, (const Variant **)argptrs, count);
  404. // something
  405. env->PopLocalFrame(nullptr);
  406. }
  407. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_requestPermissionResult(JNIEnv *env, jclass clazz, jstring p_permission, jboolean p_result) {
  408. String permission = jstring_to_string(p_permission, env);
  409. if (permission == "android.permission.RECORD_AUDIO" && p_result) {
  410. AudioDriver::get_singleton()->capture_start();
  411. }
  412. if (os_android->get_main_loop()) {
  413. os_android->get_main_loop()->emit_signal(SNAME("on_request_permissions_result"), permission, p_result == JNI_TRUE);
  414. }
  415. }
  416. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_onRendererResumed(JNIEnv *env, jclass clazz) {
  417. if (step.get() <= 0) {
  418. return;
  419. }
  420. // We force redraw to ensure we render at least once when resuming the app.
  421. Main::force_redraw();
  422. if (os_android->get_main_loop()) {
  423. os_android->get_main_loop()->notification(MainLoop::NOTIFICATION_APPLICATION_RESUMED);
  424. }
  425. }
  426. JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_onRendererPaused(JNIEnv *env, jclass clazz) {
  427. if (step.get() <= 0) {
  428. return;
  429. }
  430. if (os_android->get_main_loop()) {
  431. os_android->get_main_loop()->notification(MainLoop::NOTIFICATION_APPLICATION_PAUSED);
  432. }
  433. }
  434. }