Fix NPE when context.getFilesDir() returns null.
Bug: 16416948 Change-Id: I0fac5ab26d6efbadbd688d033a79f6705e0161a5
This commit is contained in:
parent
ab661e3ef8
commit
79ff803cb0
1 changed files with 1 additions and 0 deletions
|
@ -138,6 +138,7 @@ public class PersonalizationHelper {
|
|||
final File filesDir = context.getFilesDir();
|
||||
if (filesDir == null) {
|
||||
Log.e(TAG, "context.getFilesDir() returned null.");
|
||||
return;
|
||||
}
|
||||
if (!FileUtils.deleteFilteredFiles(filesDir, new DictFilter(dictNamePrefix))) {
|
||||
Log.e(TAG, "Cannot remove all existing dictionary files. filesDir: "
|
||||
|
|
Loading…
Reference in a new issue