// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package org.xwalk.core.extension;
+package org.xwalk.core.internal.extension;
import android.os.Environment;
+import java.io.File;
import java.util.ArrayList;
import org.chromium.base.CalledByNative;
Environment.DIRECTORY_RINGTONES
};
for (int i = 0; i < names.length; ++i) {
- nativeSetDirectory(names[i],
- Environment.getExternalStoragePublicDirectory(dirs[i]).getPath());
+ File dir = Environment.getExternalStoragePublicDirectory(dirs[i]);
+ if (null != dir) {
+ nativeSetDirectory(names[i], dir.getPath());
+ }
}
}