final OutputStream zipOut = new FileOutputStream(targetFile);
copyStream(zipIn, zipOut);
zipFile.close();
+ zipOut.close();
application.backgroundUpdateDictionaries(dictionaryUpdater);
Toast.makeText(context, getString(R.string.installationFinished, dest),
Toast.LENGTH_LONG).show();
\r
import com.hughes.util.StringUtil;\r
\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
import java.io.UnsupportedEncodingException;\r
\r
public final class HtmlDisplayActivity extends ActionBarActivity {\r
final int htmlRes = getIntent().getIntExtra(HTML_RES, -1);\r
String html;\r
if (htmlRes != -1) {\r
- html = StringUtil.readToString(getResources().openRawResource(htmlRes));\r
+ InputStream res = getResources().openRawResource(htmlRes);\r
+ html = StringUtil.readToString(res);\r
+ try {\r
+ res.close();\r
+ } catch (IOException e) {\r
+ }\r
} else {\r
html = getIntent().getStringExtra(HTML);\r
}\r