20 |
20 |
21 import com.nokia.mj.impl.installer.applicationregistrator.SifNotifier; |
21 import com.nokia.mj.impl.installer.applicationregistrator.SifNotifier; |
22 import com.nokia.mj.impl.installer.exetable.ExeBall; |
22 import com.nokia.mj.impl.installer.exetable.ExeBall; |
23 import com.nokia.mj.impl.installer.exetable.ExeStep; |
23 import com.nokia.mj.impl.installer.exetable.ExeStep; |
24 import com.nokia.mj.impl.installer.storagehandler.ApplicationInfo; |
24 import com.nokia.mj.impl.installer.storagehandler.ApplicationInfo; |
|
25 import com.nokia.mj.impl.installer.utils.FileRoots; |
|
26 import com.nokia.mj.impl.installer.utils.FileUtils; |
25 import com.nokia.mj.impl.installer.utils.InstallerException; |
27 import com.nokia.mj.impl.installer.utils.InstallerException; |
26 import com.nokia.mj.impl.installer.utils.Log; |
28 import com.nokia.mj.impl.installer.utils.Log; |
|
29 import com.nokia.mj.impl.utils.Uid; |
27 |
30 |
|
31 import java.io.IOException; |
|
32 import java.util.Enumeration; |
28 import java.util.Vector; |
33 import java.util.Vector; |
29 |
34 |
30 public class StartProgressNotifications extends ExeStep |
35 public class StartProgressNotifications extends ExeStep |
31 { |
36 { |
32 public void execute(ExeBall aBall) |
37 public void execute(ExeBall aBall) |
58 { |
63 { |
59 appNames[i] = |
64 appNames[i] = |
60 ((ApplicationInfo)appNamesVector.elementAt(i)).getName(); |
65 ((ApplicationInfo)appNamesVector.elementAt(i)).getName(); |
61 } |
66 } |
62 |
67 |
63 // Use default icon for now. |
68 // Initialize icon filenames and icon dir. |
64 String componentIconPath = |
69 String iconDir = FileRoots.getRegisteredIconDir( |
65 ball.iApplicationRegistrator.getDefaultIconPath(); |
70 FileUtils.getDrive(ball.iSuite.getRootDir())) + |
|
71 ball.iSuite.getUid().toString(); |
|
72 String componentIcon = null; |
|
73 String[] appIcons = ball.iSuite.getRegisteredAppIcons(); |
|
74 if (appIcons != null) |
|
75 { |
|
76 for (int i = 0; i < appIcons.length; i++) |
|
77 { |
|
78 Log.log("App icon " + appIcons[i] + |
|
79 " for "+ appNames[i] + " from " + iconDir); |
|
80 } |
|
81 } |
66 |
82 |
67 try |
83 try |
68 { |
84 { |
69 ball.iSifNotifier.notifyStart( |
85 ball.iSifNotifier.notifyStart( |
70 ball.iSifNotifier.OP_UNINSTALL, |
86 ball.iSifNotifier.OP_UNINSTALL, |
71 ball.iSuite.getGlobalId(), ball.iSuite.getName(), |
87 ball.iSuite.getGlobalId(), ball.iSuite.getName(), |
72 appNames, ball.iSuite.calculateInitialSize(), |
88 appNames, appIcons, ball.iSuite.calculateInitialSize(), |
73 componentIconPath); |
89 iconDir, componentIcon); |
74 } |
90 } |
75 catch (Throwable t) |
91 catch (Throwable t) |
76 { |
92 { |
77 Log.logError("StartProgressNotifications: SifNotifier.notifyStart failed", t); |
93 Log.logError("StartProgressNotifications: SifNotifier.notifyStart failed", t); |
78 } |
94 } |