Back to project page websms.
The source code is released under:
GNU General Public License
If you think the Android project websms listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.ub0r.android.websms; // w w w . j a v a 2s . co m import android.os.Parcel; import android.os.Parcelable; import android.telephony.SmsMessage; import de.ub0r.android.websms.connector.common.SMSLengthCalculator; /** * A SMSLengthCalculator that just delegates to SmsMessage.calculateLength(). * * @author Fintan Fairmichael / Felix Bechstein */ public class DefaultSMSLengthCalculator implements SMSLengthCalculator { /** Serial Version UID. */ private static final long serialVersionUID = -1021281060248896432L; @Override public void writeToParcel(final Parcel dest, final int flags) { } @Override public int describeContents() { return 0; } @Override public int[] calculateLength(final String messageBody, final boolean use7bitOnly) { return SmsMessage.calculateLength(messageBody, use7bitOnly); } /** Parcel stuff. */ public static final Parcelable.Creator<DefaultSMSLengthCalculator> CREATOR = new Parcelable.Creator<DefaultSMSLengthCalculator>() { public DefaultSMSLengthCalculator createFromParcel(final Parcel in) { return new DefaultSMSLengthCalculator(); } public DefaultSMSLengthCalculator[] newArray(final int size) { return new DefaultSMSLengthCalculator[size]; } }; }