javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/ManagerImpl.java
changeset 35 85266cc22c7f
parent 26 dc7c549001d5
child 48 e0d6e9bd3ca7
equal deleted inserted replaced
26:dc7c549001d5 35:85266cc22c7f
   464     {
   464     {
   465         if (aLocator == null)
   465         if (aLocator == null)
   466         {
   466         {
   467             throw new IllegalArgumentException("Locator is null.");
   467             throw new IllegalArgumentException("Locator is null.");
   468         }
   468         }
   469         InternalPlayer player = iProtocolFactory.createPlayer(
   469         InternalPlayer player =null;
   470                                     new Locator(aLocator));
   470         /// Implementation done for java ui 3.x req
       
   471         // in case of AnimationPlayer, we won't be using the ProtocolFactory class.
       
   472         //
       
   473         Enumeration plugins = iPlugIns.elements();
       
   474         AnimationPlayerFactory apf=null;
       
   475         while (plugins.hasMoreElements() && (player == null))
       
   476         {
       
   477             PlugIn temp = (PlugIn) plugins.nextElement();
       
   478             if (temp instanceof AnimationPlayerFactory)
       
   479             {
       
   480                 apf = (AnimationPlayerFactory) temp;
       
   481                 break;
       
   482             }
       
   483         }
       
   484         if (apf!=null)
       
   485         {
       
   486             player=apf.createPlayer(aLocator);
       
   487         }
       
   488         ////////////////////////////////////////////////////////
       
   489         // if player is still null, try to create the native player
       
   490         if (player==null)
       
   491             player =iProtocolFactory.createPlayer(
       
   492                         new Locator(aLocator));
   471         if (player == null)
   493         if (player == null)
   472         {
   494         {
   473             throw new MediaException("Locator not supported: " +
   495             throw new MediaException("Locator not supported: " +
   474                                      aLocator);
   496                                      aLocator);
   475         }
   497         }