Bug 956716 - Use exclusive bounds for substring. r=bnicholson

This commit is contained in:
Wes Johnston 2014-03-25 22:43:12 -07:00
parent 2a40007161
commit 82f160e5f7

View File

@ -104,7 +104,7 @@ public class Prompt implements OnClickListener, OnCancelListener, OnItemClickLis
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
if (!TextUtils.isEmpty(title)) {
// Long strings can delay showing the dialog, so we cap the number of characters shown to 256.
builder.setTitle(title.substring(0, Math.min(title.length(), 256) - 1));
builder.setTitle(title.substring(0, Math.min(title.length(), 256)));
}
if (!TextUtils.isEmpty(text)) {