[Contextual Edu] Add corruptionHandler to handle file corruption
When the proto file is corrupted, it should replace it with a new healthy file instead of throwing fatal exception in systemui. Bug: 386211247 Test: manually use below command to create a corrupted file and replace the existing one. It creates a corrupted file by only getting the first 10 bytes of the existing file "head -c 10 USER10_ContextualEducation.preferences_pb > USER10_ContextualEducation.preferences_pb_corrupted" run "adb shell stop && adb shell start". With this change, a new empty proto file replaces the corrupted one. Flag: com.android.systemui.keyboard_touchpad_contextual_education (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:725577915491aa80c30512f87381df3b34d54e27) Merged-In: I9a5a75420a76ff0aefab2e2f9b14770fd7b2ad7a Change-Id: I9a5a75420a76ff0aefab2e2f9b14770fd7b2ad7a
Loading
Please register or sign in to comment