修正无限 update sercet image

This commit is contained in:
seven332 committed 2014-12-27 13:16:46 +08:00
1 parent b90e2b242a
commit 690874b6a9
1 file changed
+6 -1
+6 -1
View File
@@ -72,7 +72,12 @@ public final class Secret {
@Override
public void run() {
// TODO check usable space
if (!hasSecretImage(mContext)) {
File dir = mContext.getExternalFilesDir(DIR_NAME);
File image = new File(dir, IMAGE_NAME);
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inJustDecodeBounds = true;
BitmapFactory.decodeFile(image.getAbsolutePath(), opts);
if (opts.outWidth <= 0 || opts.outHeight <= 0) {
// Get image error, try to get image from internet
HttpHelper hh = new HttpHelper(mContext);
hh.download(SERCET_IMAGE_URL, mContext.getExternalFilesDir(DIR_NAME),