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

Commit 9a17312d authored by Edward Savage-Jones's avatar Edward Savage-Jones Committed by Ed Savage-Jones
Browse files

Prevent NFE in SystemUI when parsing invalid int

A user can change the sysui_rounded_content_padding setting via adb.

If the value set is not an integer, SystemUI will end up in an exception
loop.

Bug: 117152006
Test: No crash when running:
      adb exec-out settings put secure sysui_rounded_content_padding a
Change-Id: I49cace6087effae20170eab9175fc84ebcd21781
parent 45db25d7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -51,7 +51,9 @@ public class TunablePadding implements Tunable {
    public void onTuningChanged(String key, String newValue) {
        int dimen = mDefaultSize;
        if (newValue != null) {
            try {
                dimen = (int) (Integer.parseInt(newValue) * mDensity);
            } catch (NumberFormatException ex) {}
        }
        int left = mView.isLayoutRtl() ? FLAG_END : FLAG_START;
        int right = mView.isLayoutRtl() ? FLAG_START : FLAG_END;