public class

ImageModel

extends RegionMediaModel
java.lang.Object
   ↳ com.android.mms.model.Model
     ↳ com.android.mms.model.MediaModel
       ↳ com.android.mms.model.RegionMediaModel
         ↳ com.android.mms.model.ImageModel

Summary

[Expand]
Inherited Constants
From class com.android.mms.model.MediaModel
[Expand]
Inherited Fields
From class com.android.mms.model.RegionMediaModel
From class com.android.mms.model.MediaModel
From class com.android.mms.model.Model
Public Constructors
ImageModel(Context context, Uri uri, RegionModel region)
ImageModel(Context context, String contentType, String src, Uri uri, RegionModel region)
ImageModel(Context context, String contentType, String src, DrmWrapper wrapper, RegionModel regionModel)
Public Methods
Bitmap getBitmap()
Bitmap getBitmapWithDrmCheck()
int getHeight()
boolean getMediaResizable()
int getWidth()
void handleEvent(Event evt)
Protected Methods
void checkContentRestriction()
void resizeMedia(int byteLimit, long messageId)
If the attached media is resizeable, resize it to fit within the byteLimit.
[Expand]
Inherited Methods
From class com.android.mms.model.RegionMediaModel
From class com.android.mms.model.MediaModel
From class com.android.mms.model.Model
From class java.lang.Object
From interface org.w3c.dom.events.EventListener

Public Constructors

public ImageModel (Context context, Uri uri, RegionModel region)

Throws
MmsException

public ImageModel (Context context, String contentType, String src, Uri uri, RegionModel region)

Throws
DrmException
MmsException

public ImageModel (Context context, String contentType, String src, DrmWrapper wrapper, RegionModel regionModel)

Throws
IOException

Public Methods

public Bitmap getBitmap ()

public Bitmap getBitmapWithDrmCheck ()

Throws
DrmException

public int getHeight ()

public boolean getMediaResizable ()

Returns
  • whether the media is resizable or not. For instance, a picture can be resized to smaller dimensions or lower resolution. Other media, such as video and sounds, aren't currently able to be resized.

public int getWidth ()

public void handleEvent (Event evt)

Protected Methods

protected void checkContentRestriction ()

protected void resizeMedia (int byteLimit, long messageId)

If the attached media is resizeable, resize it to fit within the byteLimit. Save the new part in the pdu.

Parameters
byteLimit the max size of the media attachment
Throws
MmsException