Toast.LENGTH_LONG).show();
} catch (Exception e) {
String msg = getString(R.string.unzippingFailed, dest);
- if (!application.getDictDir().canWrite()) {
- msg = getString(R.string.notWritable, application.getDictDir().getAbsolutePath());
+ File dir = application.getDictDir();
+ if (!dir.canWrite() || !application.checkFileCreate(dir)) {
+ msg = getString(R.string.notWritable, dir.getAbsolutePath());
}
new AlertDialog.Builder(context).setTitle(getString(R.string.error)).setMessage(msg).setNeutralButton("Close", null).show();
Log.e(LOG, "Failed to unzip.", e);
final boolean updateAvailable = application.updateAvailable(dictionaryInfo);
final Button downloadButton = (Button) row.findViewById(R.id.downloadButton);
+ final DictionaryInfo downloadable = application.getDownloadable(dictionaryInfo.uncompressedFilename);
if (!canLaunch || updateAvailable) {
- final DictionaryInfo downloadable = application.getDownloadable(dictionaryInfo.uncompressedFilename);
downloadButton
.setText(getString(
R.string.downloadButton,
builder.append(getString(R.string.indexInfo, indexInfo.shortName,
indexInfo.mainTokenCount));
}
+ builder.append("; ");
+ builder.append(getString(R.string.downloadButton, downloadable.uncompressedBytes / 1024.0 / 1024.0));
details.setText(builder.toString());
if (canLaunch) {