Creates a new instance of Config
()
| 212 | |
| 213 | /** Creates a new instance of Config */ |
| 214 | private Config() { |
| 215 | int gmtloc = TimeZone.getDefault().getRawOffset() / 3600000; |
| 216 | gmtOffset = gmtloc; |
| 217 | |
| 218 | //prefetch images |
| 219 | RosterIcons.getInstance(); |
| 220 | |
| 221 | //#ifdef SMILES |
| 222 | if (smiles) { |
| 223 | SmilesIcons.getInstance(); |
| 224 | } |
| 225 | //#endif |
| 226 | //#ifdef CLIENTS_ICONS |
| 227 | if (showClientIcon) { |
| 228 | ClientsIcons.getInstance(); |
| 229 | } |
| 230 | //#endif |
| 231 | |
| 232 | System.gc(); |
| 233 | try { |
| 234 | Thread.sleep(50); |
| 235 | } catch (InterruptedException e) { |
| 236 | } |
| 237 | |
| 238 | int h1 = VirtualCanvas.getInstance().getHeight(); |
| 239 | int h2 = VirtualCanvas.getInstance().getWidth(); |
| 240 | rosterFont = 16; |
| 241 | barFont = 16; |
| 242 | msgFont = 16; |
| 243 | minItemHeight = ((h1 < h2) ? h2 : h1) * 40 / 480; |
| 244 | allowMinimize = true; |
| 245 | loadFromStorage(); |
| 246 | |
| 247 | FontCache.roster = rosterFont; |
| 248 | FontCache.msg = msgFont; |
| 249 | |
| 250 | FontCache.bar = barFont; |
| 251 | FontCache.baloon = baloonFont; |
| 252 | } |
| 253 | |
| 254 | protected final void loadFromStorage() { |
| 255 | DataInputStream inputStream = NvStorage.ReadFileRecord("config", 0); |
nothing calls this directly
no test coverage detected