[libbluray-devel] BDJLoader.unloadN(): allow xlets to stop in paraller

hpi1 git at videolan.org
Thu Jan 16 20:37:54 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Jan 15 10:38:34 2014 +0200| [911abe4065d9c6d0d85a88089ab75edff2e7e815] | committer: hpi1

BDJLoader.unloadN(): allow xlets to stop in paraller

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=911abe4065d9c6d0d85a88089ab75edff2e7e815
---

 src/libbluray/bdj/java/org/videolan/BDJLoader.java |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/libbluray/bdj/java/org/videolan/BDJLoader.java b/src/libbluray/bdj/java/org/videolan/BDJLoader.java
index 8905197..cb50ac9 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJLoader.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJLoader.java
@@ -211,12 +211,22 @@ public class BDJLoader {
     private static boolean unloadN() {
         try {
             AppsDatabase db = AppsDatabase.getAppsDatabase();
+
+            /* stop xlets first */
             Enumeration ids = db.getAppIDs(new CurrentServiceFilter());
             while (ids.hasMoreElements()) {
                 AppID id = (AppID)ids.nextElement();
                 BDJAppProxy proxy = (BDJAppProxy)db.getAppProxy(id);
+                proxy.stop(true);
+            }
+
+            ids = db.getAppIDs(new CurrentServiceFilter());
+            while (ids.hasMoreElements()) {
+                AppID id = (AppID)ids.nextElement();
+                BDJAppProxy proxy = (BDJAppProxy)db.getAppProxy(id);
                 proxy.release();
             }
+
             ((BDJAppsDatabase)db).newDatabase(null, null);
 
             //GUIManager.shutdown() does not work with J2ME (window can't be opened again)



More information about the libbluray-devel mailing list