File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
WordPressUtils/src/main/java/org/wordpress/android/util Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,8 @@ public static boolean dropAllTables(SQLiteDatabase db) throws SQLiteException {
129129 * https://github.com/android/platform_frameworks_base/blob/b77bc869241644a662f7e615b0b00ecb5aee373d/core/res/res/values/config.xml#L1268
130130 * https://github.com/android/platform_frameworks_base/blob/3bdbf644d61f46b531838558fabbd5b990fc4913/core/java/android/database/CursorWindow.java#L103
131131 */
132- private static final int MAX_TEXT_LEN = 1024 * 1024 ;
132+ // Max 512K characters (a UTF-8 char is 4 bytes max, so a 512K characters string is always < 2Mb)
133+ private static final int MAX_TEXT_LEN = 1024 * 1024 / 2 ;
133134 public static String maxSQLiteText (final String text ) {
134135 if (text .length () <= MAX_TEXT_LEN ) {
135136 return text ;
You can’t perform that action at this time.
0 commit comments