Methods Summary |
---|
public void | checkAudioContentType(java.lang.String contentType)
if (null == contentType) {
throw new ContentRestrictionException("Null content type to be check");
}
if (!sSupportedAudioTypes.contains(contentType)) {
throw new UnsupportContentTypeException("Unsupported audio content type : "
+ contentType);
}
|
public void | checkImageContentType(java.lang.String contentType)
if (null == contentType) {
throw new ContentRestrictionException("Null content type to be check");
}
if (!sSupportedImageTypes.contains(contentType)) {
throw new UnsupportContentTypeException("Unsupported image content type : "
+ contentType);
}
|
public void | checkMessageSize(int messageSize, int increaseSize, android.content.ContentResolver resolver)
if ( (messageSize < 0) || (increaseSize < 0) ) {
throw new ContentRestrictionException("Negative message size"
+ " or increase size");
}
int messageSizeLimit;
try {
// Don't cache the max message size. Grab it each time so we'll dynamically
// respond to changes made on the server.
messageSizeLimit = Integer.parseInt(
Settings.Gservices.getString(resolver,
Settings.Gservices.MMS_MAXIMUM_MESSAGE_SIZE));
} catch (java.lang.NumberFormatException e) {
messageSizeLimit = MESSAGE_SIZE_LIMIT;
}
int newSize = messageSize + increaseSize;
if ( (newSize < 0) || (newSize > messageSizeLimit) ) {
throw new ExceedMessageSizeException("Exceed message size limitation");
}
|
public void | checkResolution(int width, int height)
if ( (width > IMAGE_WIDTH_LIMIT) || (height > IMAGE_HEIGHT_LIMIT) ) {
throw new ResolutionException("content resolution exceeds restriction.");
}
|
public void | checkVideoContentType(java.lang.String contentType)
if (null == contentType) {
throw new ContentRestrictionException("Null content type to be check");
}
if (!sSupportedVideoTypes.contains(contentType)) {
throw new UnsupportContentTypeException("Unsupported video content type : "
+ contentType);
}
|