os_android.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  1. /*************************************************************************/
  2. /* os_android.cpp */
  3. /*************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* http://www.godotengine.org */
  7. /*************************************************************************/
  8. /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
  9. /* */
  10. /* Permission is hereby granted, free of charge, to any person obtaining */
  11. /* a copy of this software and associated documentation files (the */
  12. /* "Software"), to deal in the Software without restriction, including */
  13. /* without limitation the rights to use, copy, modify, merge, publish, */
  14. /* distribute, sublicense, and/or sell copies of the Software, and to */
  15. /* permit persons to whom the Software is furnished to do so, subject to */
  16. /* the following conditions: */
  17. /* */
  18. /* The above copyright notice and this permission notice shall be */
  19. /* included in all copies or substantial portions of the Software. */
  20. /* */
  21. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  22. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  23. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
  24. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  25. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  26. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  27. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  28. /*************************************************************************/
  29. #include "os_android.h"
  30. #include "drivers/gles2/rasterizer_gles2.h"
  31. #include "drivers/gles1/rasterizer_gles1.h"
  32. #include "core/io/file_access_buffered_fa.h"
  33. #include "drivers/unix/file_access_unix.h"
  34. #include "drivers/unix/dir_access_unix.h"
  35. #include "servers/visual/visual_server_raster.h"
  36. #include "main/main.h"
  37. #include "core/globals.h"
  38. #ifdef ANDROID_NATIVE_ACTIVITY
  39. #include "file_access_android.h"
  40. #include "dir_access_android.h"
  41. #else
  42. #include "file_access_jandroid.h"
  43. #include "dir_access_jandroid.h"
  44. #endif
  45. int OS_Android::get_video_driver_count() const {
  46. return 2;
  47. }
  48. const char * OS_Android::get_video_driver_name(int p_driver) const {
  49. return p_driver==0?"GLES2":"GLES1";
  50. }
  51. OS::VideoMode OS_Android::get_default_video_mode() const {
  52. return OS::VideoMode();
  53. }
  54. int OS_Android::get_audio_driver_count() const {
  55. return 1;
  56. }
  57. const char * OS_Android::get_audio_driver_name(int p_driver) const {
  58. return "Android";
  59. }
  60. void OS_Android::initialize_core() {
  61. OS_Unix::initialize_core();
  62. #ifdef ANDROID_NATIVE_ACTIVITY
  63. FileAccess::make_default<FileAccessAndroid>(FileAccess::ACCESS_RESOURCES);
  64. FileAccess::make_default<FileAccessUnix>(FileAccess::ACCESS_USERDATA);
  65. FileAccess::make_default<FileAccessUnix>(FileAccess::ACCESS_FILESYSTEM);
  66. //FileAccessBufferedFA<FileAccessUnix>::make_default();
  67. DirAccess::make_default<DirAccessAndroid>(DirAccess::ACCESS_RESOURCES);
  68. DirAccess::make_default<DirAccessUnix>(DirAccess::ACCESS_USERDATA);
  69. DirAccess::make_default<DirAccessUnix>(DirAccess::ACCESS_FILESYSTEM);
  70. #else
  71. FileAccess::make_default<FileAccessBufferedFA<FileAccessJAndroid> >(FileAccess::ACCESS_RESOURCES);
  72. FileAccess::make_default<FileAccessUnix>(FileAccess::ACCESS_USERDATA);
  73. FileAccess::make_default<FileAccessUnix>(FileAccess::ACCESS_FILESYSTEM);
  74. //FileAccessBufferedFA<FileAccessUnix>::make_default();
  75. DirAccess::make_default<DirAccessJAndroid>(DirAccess::ACCESS_RESOURCES);
  76. DirAccess::make_default<DirAccessUnix>(DirAccess::ACCESS_USERDATA);
  77. DirAccess::make_default<DirAccessUnix>(DirAccess::ACCESS_FILESYSTEM);
  78. #endif
  79. }
  80. void OS_Android::set_opengl_extensions(const char* p_gl_extensions) {
  81. ERR_FAIL_COND(!p_gl_extensions);
  82. gl_extensions=p_gl_extensions;
  83. }
  84. void OS_Android::initialize(const VideoMode& p_desired,int p_video_driver,int p_audio_driver) {
  85. use_gl2=p_video_driver!=1;
  86. if (gfx_init_func)
  87. gfx_init_func(gfx_init_ud,use_gl2);
  88. AudioDriverManagerSW::add_driver(&audio_driver_android);
  89. if (use_gl2) {
  90. RasterizerGLES2 *rasterizer_gles22=memnew( RasterizerGLES2(false,use_reload_hooks,false,use_reload_hooks ) );
  91. if (gl_extensions)
  92. rasterizer_gles22->set_extensions(gl_extensions);
  93. rasterizer = rasterizer_gles22;
  94. } else {
  95. rasterizer = memnew( RasterizerGLES1(use_reload_hooks, use_reload_hooks) );
  96. }
  97. visual_server = memnew( VisualServerRaster(rasterizer) );
  98. visual_server->init();
  99. visual_server->cursor_set_visible(false, 0);
  100. AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
  101. if (AudioDriverManagerSW::get_driver(p_audio_driver)->init()!=OK) {
  102. ERR_PRINT("Initializing audio failed.");
  103. }
  104. sample_manager = memnew( SampleManagerMallocSW );
  105. audio_server = memnew( AudioServerSW(sample_manager) );
  106. audio_server->set_mixer_params(AudioMixerSW::INTERPOLATION_LINEAR,false);
  107. audio_server->init();
  108. spatial_sound_server = memnew( SpatialSoundServerSW );
  109. spatial_sound_server->init();
  110. spatial_sound_2d_server = memnew( SpatialSound2DServerSW );
  111. spatial_sound_2d_server->init();
  112. //
  113. physics_server = memnew( PhysicsServerSW );
  114. physics_server->init();
  115. physics_2d_server = memnew( Physics2DServerSW );
  116. physics_2d_server->init();
  117. input = memnew( InputDefault );
  118. }
  119. void OS_Android::set_main_loop( MainLoop * p_main_loop ) {
  120. main_loop=p_main_loop;
  121. input->set_main_loop(p_main_loop);
  122. #if 0
  123. print_line("preGS");
  124. FileAccess *f=memnew( FileAccessAndroid );
  125. print("made f %p\n",f);
  126. Error err = f->open("AndroidManifest.xml",FileAccess::READ);
  127. if (err) {
  128. print("************NO FILE!!\n");
  129. } else {
  130. print("************YES FILE!!\n");
  131. }
  132. f->close();
  133. print_line("end");
  134. AAssetDir* aad = AAssetManager_openDir(FileAccessAndroid::asset_manager,".");
  135. if (aad) {
  136. print_line("DIR OPEN OK");
  137. const char *fn= AAssetDir_getNextFileName(aad);
  138. while(fn) {
  139. print_line("FNAME: "+String(fn));
  140. fn= AAssetDir_getNextFileName(aad);
  141. }
  142. AAssetDir_close(aad);
  143. } else {
  144. print_line("DIR NO OPEN");
  145. }
  146. #endif
  147. }
  148. void OS_Android::delete_main_loop() {
  149. memdelete( main_loop );
  150. }
  151. void OS_Android::finalize() {
  152. memdelete(input);
  153. }
  154. void OS_Android::vprint(const char* p_format, va_list p_list, bool p_stderr) {
  155. __android_log_vprint(p_stderr?ANDROID_LOG_ERROR:ANDROID_LOG_INFO,"godot",p_format,p_list);
  156. }
  157. void OS_Android::print(const char *p_format, ... ) {
  158. va_list argp;
  159. va_start(argp, p_format);
  160. __android_log_vprint(ANDROID_LOG_INFO,"godot",p_format,argp);
  161. va_end(argp);
  162. }
  163. void OS_Android::alert(const String& p_alert) {
  164. print("ALERT: %s\n",p_alert.utf8().get_data());
  165. }
  166. void OS_Android::set_mouse_show(bool p_show) {
  167. //android has no mouse...
  168. }
  169. void OS_Android::set_mouse_grab(bool p_grab) {
  170. //it really has no mouse...!
  171. }
  172. bool OS_Android::is_mouse_grab_enabled() const {
  173. //*sigh* technology has evolved so much since i was a kid..
  174. return false;
  175. }
  176. Point2 OS_Android::get_mouse_pos() const {
  177. return Point2();
  178. }
  179. int OS_Android::get_mouse_button_state() const {
  180. return 0;
  181. }
  182. void OS_Android::set_window_title(const String& p_title) {
  183. }
  184. //interesting byt not yet
  185. //void set_clipboard(const String& p_text);
  186. //String get_clipboard() const;
  187. void OS_Android::set_video_mode(const VideoMode& p_video_mode,int p_screen) {
  188. }
  189. OS::VideoMode OS_Android::get_video_mode(int p_screen) const {
  190. return default_videomode;
  191. }
  192. void OS_Android::get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen) const {
  193. p_list->push_back(default_videomode);
  194. }
  195. String OS_Android::get_name() {
  196. return "Android";
  197. }
  198. MainLoop *OS_Android::get_main_loop() const {
  199. return main_loop;
  200. }
  201. bool OS_Android::can_draw() const {
  202. return true; //always?
  203. }
  204. void OS_Android::set_cursor_shape(CursorShape p_shape) {
  205. //android really really really has no mouse.. how amazing..
  206. }
  207. void OS_Android::main_loop_begin() {
  208. if (main_loop)
  209. main_loop->init();
  210. }
  211. bool OS_Android::main_loop_iterate() {
  212. if (!main_loop)
  213. return false;
  214. return Main::iteration();
  215. }
  216. void OS_Android::main_loop_end() {
  217. if (main_loop)
  218. main_loop->finish();
  219. }
  220. void OS_Android::main_loop_focusout() {
  221. if (main_loop)
  222. main_loop->notification(MainLoop::NOTIFICATION_WM_FOCUS_OUT);
  223. audio_driver_android.set_pause(true);
  224. }
  225. void OS_Android::main_loop_focusin(){
  226. if (main_loop)
  227. main_loop->notification(MainLoop::NOTIFICATION_WM_FOCUS_IN);
  228. audio_driver_android.set_pause(false);
  229. }
  230. void OS_Android::process_event(InputEvent p_event) {
  231. p_event.ID = last_id++;
  232. input->parse_input_event(p_event);
  233. };
  234. void OS_Android::process_touch(int p_what,int p_pointer, const Vector<TouchPos>& p_points) {
  235. // print_line("ev: "+itos(p_what)+" pnt: "+itos(p_pointer)+" pointc: "+itos(p_points.size()));
  236. switch(p_what) {
  237. case 0: { //gesture begin
  238. if (touch.size()) {
  239. //end all if exist
  240. InputEvent ev;
  241. ev.type=InputEvent::MOUSE_BUTTON;
  242. ev.ID=last_id++;
  243. ev.mouse_button.button_index=BUTTON_LEFT;
  244. ev.mouse_button.button_mask=BUTTON_MASK_LEFT;
  245. ev.mouse_button.pressed=false;
  246. ev.mouse_button.x=touch[0].pos.x;
  247. ev.mouse_button.y=touch[0].pos.y;
  248. ev.mouse_button.global_x=touch[0].pos.x;
  249. ev.mouse_button.global_y=touch[0].pos.y;
  250. input->parse_input_event(ev);
  251. for(int i=0;i<touch.size();i++) {
  252. InputEvent ev;
  253. ev.type=InputEvent::SCREEN_TOUCH;
  254. ev.ID=last_id++;
  255. ev.screen_touch.index=touch[i].id;
  256. ev.screen_touch.pressed=false;
  257. ev.screen_touch.x=touch[i].pos.x;
  258. ev.screen_touch.y=touch[i].pos.y;
  259. input->parse_input_event(ev);
  260. }
  261. }
  262. touch.resize(p_points.size());
  263. for(int i=0;i<p_points.size();i++) {
  264. touch[i].id=p_points[i].id;
  265. touch[i].pos=p_points[i].pos;
  266. }
  267. {
  268. //send mouse
  269. InputEvent ev;
  270. ev.type=InputEvent::MOUSE_BUTTON;
  271. ev.ID=last_id++;
  272. ev.mouse_button.button_index=BUTTON_LEFT;
  273. ev.mouse_button.button_mask=BUTTON_MASK_LEFT;
  274. ev.mouse_button.pressed=true;
  275. ev.mouse_button.x=touch[0].pos.x;
  276. ev.mouse_button.y=touch[0].pos.y;
  277. ev.mouse_button.global_x=touch[0].pos.x;
  278. ev.mouse_button.global_y=touch[0].pos.y;
  279. last_mouse=touch[0].pos;
  280. input->parse_input_event(ev);
  281. }
  282. //send touch
  283. for(int i=0;i<touch.size();i++) {
  284. InputEvent ev;
  285. ev.type=InputEvent::SCREEN_TOUCH;
  286. ev.ID=last_id++;
  287. ev.screen_touch.index=touch[i].id;
  288. ev.screen_touch.pressed=true;
  289. ev.screen_touch.x=touch[i].pos.x;
  290. ev.screen_touch.y=touch[i].pos.y;
  291. input->parse_input_event(ev);
  292. }
  293. } break;
  294. case 1: { //motion
  295. if (p_points.size()) {
  296. //send mouse, should look for point 0?
  297. InputEvent ev;
  298. ev.type=InputEvent::MOUSE_MOTION;
  299. ev.ID=last_id++;
  300. ev.mouse_motion.button_mask=BUTTON_MASK_LEFT;
  301. ev.mouse_motion.x=p_points[0].pos.x;
  302. ev.mouse_motion.y=p_points[0].pos.y;
  303. input->set_mouse_pos(Point2(ev.mouse_motion.x,ev.mouse_motion.y));
  304. ev.mouse_motion.speed_x=input->get_mouse_speed().x;
  305. ev.mouse_motion.speed_y=input->get_mouse_speed().y;
  306. ev.mouse_motion.relative_x=p_points[0].pos.x-last_mouse.x;
  307. ev.mouse_motion.relative_y=p_points[0].pos.y-last_mouse.y;
  308. last_mouse=p_points[0].pos;
  309. input->parse_input_event(ev);
  310. }
  311. ERR_FAIL_COND(touch.size()!=p_points.size());
  312. for(int i=0;i<touch.size();i++) {
  313. int idx=-1;
  314. for(int j=0;j<p_points.size();j++) {
  315. if (touch[i].id==p_points[j].id) {
  316. idx=j;
  317. break;
  318. }
  319. }
  320. ERR_CONTINUE(idx==-1);
  321. if (touch[i].pos==p_points[idx].pos)
  322. continue; //no move unncesearily
  323. InputEvent ev;
  324. ev.type=InputEvent::SCREEN_DRAG;
  325. ev.ID=last_id++;
  326. ev.screen_drag.index=touch[i].id;
  327. ev.screen_drag.x=p_points[idx].pos.x;
  328. ev.screen_drag.y=p_points[idx].pos.y;
  329. ev.screen_drag.relative_x=p_points[idx].pos.x - touch[i].pos.x;
  330. ev.screen_drag.relative_y=p_points[idx].pos.y - touch[i].pos.y;
  331. input->parse_input_event(ev);
  332. touch[i].pos=p_points[idx].pos;
  333. }
  334. } break;
  335. case 2: { //release
  336. if (touch.size()) {
  337. //end all if exist
  338. InputEvent ev;
  339. ev.type=InputEvent::MOUSE_BUTTON;
  340. ev.ID=last_id++;
  341. ev.mouse_button.button_index=BUTTON_LEFT;
  342. ev.mouse_button.button_mask=BUTTON_MASK_LEFT;
  343. ev.mouse_button.pressed=false;
  344. ev.mouse_button.x=touch[0].pos.x;
  345. ev.mouse_button.y=touch[0].pos.y;
  346. ev.mouse_button.global_x=touch[0].pos.x;
  347. ev.mouse_button.global_y=touch[0].pos.y;
  348. input->parse_input_event(ev);
  349. for(int i=0;i<touch.size();i++) {
  350. InputEvent ev;
  351. ev.type=InputEvent::SCREEN_TOUCH;
  352. ev.ID=last_id++;
  353. ev.screen_touch.index=touch[i].id;
  354. ev.screen_touch.pressed=false;
  355. ev.screen_touch.x=touch[i].pos.x;
  356. ev.screen_touch.y=touch[i].pos.y;
  357. input->parse_input_event(ev);
  358. }
  359. touch.clear();
  360. }
  361. } break;
  362. case 3: { // add tuchi
  363. ERR_FAIL_INDEX(p_pointer,p_points.size());
  364. TouchPos tp=p_points[p_pointer];
  365. touch.push_back(tp);
  366. InputEvent ev;
  367. ev.type=InputEvent::SCREEN_TOUCH;
  368. ev.ID=last_id++;
  369. ev.screen_touch.index=tp.id;
  370. ev.screen_touch.pressed=true;
  371. ev.screen_touch.x=tp.pos.x;
  372. ev.screen_touch.y=tp.pos.y;
  373. input->parse_input_event(ev);
  374. } break;
  375. case 4: {
  376. for(int i=0;i<touch.size();i++) {
  377. if (touch[i].id==p_pointer) {
  378. InputEvent ev;
  379. ev.type=InputEvent::SCREEN_TOUCH;
  380. ev.ID=last_id++;
  381. ev.screen_touch.index=touch[i].id;
  382. ev.screen_touch.pressed=false;
  383. ev.screen_touch.x=touch[i].pos.x;
  384. ev.screen_touch.y=touch[i].pos.y;
  385. input->parse_input_event(ev);
  386. touch.remove(i);
  387. i--;
  388. }
  389. }
  390. } break;
  391. }
  392. }
  393. void OS_Android::process_accelerometer(const Vector3& p_accelerometer) {
  394. input->set_accelerometer(p_accelerometer);
  395. }
  396. bool OS_Android::has_touchscreen_ui_hint() const {
  397. return true;
  398. }
  399. bool OS_Android::has_virtual_keyboard() const {
  400. return true;
  401. };
  402. void OS_Android::show_virtual_keyboard(const String& p_existing_text,const Rect2& p_screen_rect) {
  403. if (show_virtual_keyboard_func) {
  404. show_virtual_keyboard_func(p_existing_text);
  405. } else {
  406. ERR_PRINT("Virtual keyboard not available");
  407. };
  408. };
  409. void OS_Android::hide_virtual_keyboard() {
  410. if (hide_virtual_keyboard_func) {
  411. hide_virtual_keyboard_func();
  412. } else {
  413. ERR_PRINT("Virtual keyboard not available");
  414. };
  415. };
  416. void OS_Android::init_video_mode(int p_video_width,int p_video_height) {
  417. default_videomode.width=p_video_width;
  418. default_videomode.height=p_video_height;
  419. default_videomode.fullscreen=true;
  420. default_videomode.resizable=false;
  421. }
  422. void OS_Android::main_loop_request_quit() {
  423. if (main_loop)
  424. main_loop->notification(MainLoop::NOTIFICATION_WM_QUIT_REQUEST);
  425. }
  426. void OS_Android::set_display_size(Size2 p_size) {
  427. default_videomode.width=p_size.x;
  428. default_videomode.height=p_size.y;
  429. }
  430. void OS_Android::reload_gfx() {
  431. if (gfx_init_func)
  432. gfx_init_func(gfx_init_ud,use_gl2);
  433. if (rasterizer)
  434. rasterizer->reload_vram();
  435. }
  436. Error OS_Android::shell_open(String p_uri) {
  437. if (open_uri_func)
  438. return open_uri_func(p_uri)?ERR_CANT_OPEN:OK;
  439. return ERR_UNAVAILABLE;
  440. };
  441. String OS_Android::get_resource_dir() const {
  442. return "/"; //android has it's own filesystem for resources inside the APK
  443. }
  444. String OS_Android::get_locale() const {
  445. if (get_locale_func)
  446. return get_locale_func();
  447. return OS_Unix::get_locale();
  448. }
  449. String OS_Android::get_model_name() const {
  450. if (get_model_func)
  451. return get_model_func();
  452. return OS_Unix::get_model_name();
  453. }
  454. void OS_Android::set_need_reload_hooks(bool p_needs_them) {
  455. use_reload_hooks=p_needs_them;
  456. }
  457. String OS_Android::get_data_dir() const {
  458. if (get_data_dir_func)
  459. return get_data_dir_func();
  460. return ".";
  461. //return Globals::get_singleton()->get_singleton_object("GodotOS")->call("get_data_dir");
  462. };
  463. void OS_Android::set_screen_orientation(ScreenOrientation p_orientation) {
  464. if (set_screen_orientation_func)
  465. set_screen_orientation_func(p_orientation);
  466. }
  467. String OS_Android::get_unique_ID() const {
  468. if (get_unique_id_func)
  469. return get_unique_id_func();
  470. return OS::get_unique_ID();
  471. }
  472. OS_Android::OS_Android(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func,GetLocaleFunc p_get_locale_func,GetModelFunc p_get_model_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, SetScreenOrientationFunc p_screen_orient,GetUniqueIDFunc p_get_unique_id) {
  473. default_videomode.width=800;
  474. default_videomode.height=600;
  475. default_videomode.fullscreen=true;
  476. default_videomode.resizable=false;
  477. gfx_init_func=p_gfx_init_func;
  478. gfx_init_ud=p_gfx_init_ud;
  479. main_loop=NULL;
  480. last_id=1;
  481. gl_extensions=NULL;
  482. rasterizer=NULL;
  483. use_gl2=false;
  484. open_uri_func=p_open_uri_func;
  485. get_data_dir_func=p_get_data_dir_func;
  486. get_locale_func=p_get_locale_func;
  487. get_model_func=p_get_model_func;
  488. get_unique_id_func=p_get_unique_id;
  489. show_virtual_keyboard_func = p_show_vk;
  490. hide_virtual_keyboard_func = p_hide_vk;
  491. set_screen_orientation_func=p_screen_orient;
  492. use_reload_hooks=false;
  493. }
  494. OS_Android::~OS_Android() {
  495. }