Fix NPE when context.getFilesDir() returns null.

Bug: 16416948
Change-Id: I0fac5ab26d6efbadbd688d033a79f6705e0161a5
This commit is contained in:
Keisuke Kuroyanagi 2014-07-28 19:25:07 +09:00
parent ab661e3ef8
commit 79ff803cb0

View file

@ -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: "