Messaging: Remove unused code
Change-Id: I8093bb3e305ae323f7069bf42f9e83f8c8647cc7
This commit is contained in:
@@ -20,7 +20,6 @@ package com.android.messaging.sms;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.ContentUris;
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetFileDescriptor;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
@@ -734,32 +733,6 @@ public class DatabaseMessages {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get media file size
|
||||
*/
|
||||
private long getMediaFileSize() {
|
||||
final Context context = Factory.get().getApplicationContext();
|
||||
final Uri uri = getDataUri();
|
||||
AssetFileDescriptor fd = null;
|
||||
try {
|
||||
fd = context.getContentResolver().openAssetFileDescriptor(uri, "r");
|
||||
if (fd != null) {
|
||||
return fd.getParcelFileDescriptor().getStatSize();
|
||||
}
|
||||
} catch (final FileNotFoundException e) {
|
||||
LogUtil.e(TAG, "DatabaseMessages.MmsPart: cound not find media file: " + e, e);
|
||||
} finally {
|
||||
if (fd != null) {
|
||||
try {
|
||||
fd.close();
|
||||
} catch (final IOException e) {
|
||||
LogUtil.e(TAG, "DatabaseMessages.MmsPart: failed to close " + e, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0L;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return If the type is a text type that stores text embedded (i.e. in db table)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user