Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit eabdf5da authored by Songchun Fan's avatar Songchun Fan Committed by Song Chun Fan
Browse files

[SettingsProvider] limit individual setting length

Long settings cannot be preserved due to the size limit of the
serialization. Limit individual setting's length to a certain size to
prevent the loss of data. Also try and catch the serialization exception
so that subsequent settings can still be preserved.

BUG: 260079172
BUG: 285337459
Test: Manual with steps in b/260079172#comment7
Test: Observe the PoC app crashes when trying to attack. Observe the
following exception in the logcat:

05-24 23:29:05.064 21080 22714 E DatabaseUtils:
java.lang.IllegalStateException: The name or the value of your setting:
[notification_sound] is too long. The max length allowed for the name or
the value string is 32768.

Test: atest SettingsStateTest
Merged-In: I9ece88a1c721cfdf2b19ad931b912c83df1a6f85
Change-Id: I9ece88a1c721cfdf2b19ad931b912c83df1a6f85
(cherry picked from commit 83dee204)
parent fcc8bbe3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment