@Override public void onResume() { super.onResume(); for (ITitaniumLifecycle listener : mediaObjects) { try { listener.onResume(); } catch (Throwable t) { Log.e(LCAT, "Error in onResume", t); } } }
@Override public void onDestroy() { super.onDestroy(); try { for (ITitaniumLifecycle listener : mediaObjects) { try { listener.onDestroy(); } catch (Throwable t) { Log.e(LCAT, "Error in onDestroy", t); } } } finally { mediaObjects.clear(); mediaObjects = null; } }