am fb15b768: Merge "Fix NPE when context.getFilesDir() returns null." into lmp-dev

* commit 'fb15b768dd21a7364a541e898886166177617c58':
  Fix NPE when context.getFilesDir() returns null.
main
Keisuke Kuroyanagi 2014-07-28 12:09:09 +00:00 committed by Android Git Automerger
commit 0bad998c52
1 changed files with 1 additions and 0 deletions

View File

@ -138,6 +138,7 @@ public class PersonalizationHelper {
final File filesDir = context.getFilesDir(); final File filesDir = context.getFilesDir();
if (filesDir == null) { if (filesDir == null) {
Log.e(TAG, "context.getFilesDir() returned null."); Log.e(TAG, "context.getFilesDir() returned null.");
return;
} }
if (!FileUtils.deleteFilteredFiles(filesDir, new DictFilter(dictNamePrefix))) { if (!FileUtils.deleteFilteredFiles(filesDir, new DictFilter(dictNamePrefix))) {
Log.e(TAG, "Cannot remove all existing dictionary files. filesDir: " Log.e(TAG, "Cannot remove all existing dictionary files. filesDir: "