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; |
27 |
29 |
28 import java.util.Vector; |
30 import java.util.Vector; |
29 |
31 |
51 return; |
53 return; |
52 } |
54 } |
53 |
55 |
54 // Init application names array. |
56 // Init application names array. |
55 Vector appNamesVector = ball.iSuite.getApplications(); |
57 Vector appNamesVector = ball.iSuite.getApplications(); |
|
58 if (ball.iOldSuite != null) |
|
59 { |
|
60 // In update get the names of previously installed applications. |
|
61 appNamesVector = ball.iOldSuite.getApplications(); |
|
62 } |
56 String[] appNames = new String[appNamesVector.size()]; |
63 String[] appNames = new String[appNamesVector.size()]; |
57 for (int i = 0; i < appNamesVector.size(); i++) |
64 for (int i = 0; i < appNamesVector.size(); i++) |
58 { |
65 { |
59 appNames[i] = |
66 appNames[i] = |
60 ((ApplicationInfo)appNamesVector.elementAt(i)).getName(); |
67 ((ApplicationInfo)appNamesVector.elementAt(i)).getName(); |
61 } |
68 } |
62 |
69 |
63 // Use default icon for now. |
70 // Initialize icon filenames and icon dir. |
64 String componentIconPath = |
71 String iconDir = null; |
65 ball.iApplicationRegistrator.getDefaultIconPath(); |
72 String componentIcon = null; |
|
73 String[] appIcons = null; |
|
74 if (ball.iOldSuite != null) |
|
75 { |
|
76 // In update get the icons of previously installed applications. |
|
77 iconDir = FileRoots.getRegisteredIconDir( |
|
78 FileUtils.getDrive(ball.iOldSuite.getRootDir())) + |
|
79 ball.iOldSuite.getUid().toString(); |
|
80 appIcons = ball.iOldSuite.getRegisteredAppIcons(); |
|
81 if (appIcons != null) |
|
82 { |
|
83 for (int i = 0; i < appIcons.length; i++) |
|
84 { |
|
85 Log.log("Old app icon " + appIcons[i] + |
|
86 " for "+ appNames[i] + " from " + iconDir); |
|
87 } |
|
88 } |
|
89 } |
66 |
90 |
67 try |
91 try |
68 { |
92 { |
69 ball.iSifNotifier.notifyStart( |
93 ball.iSifNotifier.notifyStart( |
70 (ball.iOldSuite != null? |
94 (ball.iOldSuite != null? |
71 ball.iSifNotifier.OP_UPDATE: ball.iSifNotifier.OP_INSTALL), |
95 ball.iSifNotifier.OP_UPDATE: ball.iSifNotifier.OP_INSTALL), |
72 ball.iSuite.getGlobalId(), ball.iSuite.getName(), |
96 ball.iSuite.getGlobalId(), ball.iSuite.getName(), |
73 appNames, ball.iSuite.calculateInitialSize(), |
97 appNames, appIcons, ball.iSuite.calculateInitialSize(), |
74 componentIconPath); |
98 iconDir, componentIcon); |
75 } |
99 } |
76 catch (Throwable t) |
100 catch (Throwable t) |
77 { |
101 { |
78 Log.logError("StartProgressNotifications: SifNotifier.notifyStart failed", t); |
102 Log.logError("StartProgressNotifications: SifNotifier.notifyStart failed", t); |
79 } |
103 } |