am cfd30933: Merge "Fix: NPE when context.getFilesDir() returns null."
* commit 'cfd3093362e2447bca948b94ceabba404b376b4b': Fix: NPE when context.getFilesDir() returns null.main
commit
da1590e32c
|
@ -138,11 +138,13 @@ public class PersonalizationHelper {
|
|||
}
|
||||
}
|
||||
dictionaryMap.clear();
|
||||
if (!FileUtils.deleteFilteredFiles(
|
||||
context.getFilesDir(), new DictFilter(dictNamePrefix))) {
|
||||
final File filesDir = context.getFilesDir();
|
||||
if (filesDir == null) {
|
||||
Log.e(TAG, "context.getFilesDir() returned null.");
|
||||
}
|
||||
if (!FileUtils.deleteFilteredFiles(filesDir, new DictFilter(dictNamePrefix))) {
|
||||
Log.e(TAG, "Cannot remove all existing dictionary files. filesDir: "
|
||||
+ context.getFilesDir().getAbsolutePath() + ", dictNamePrefix: "
|
||||
+ dictNamePrefix);
|
||||
+ filesDir.getAbsolutePath() + ", dictNamePrefix: " + dictNamePrefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue