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

Commit 258f8de2 authored by Adam Powell's avatar Adam Powell
Browse files

Tweak error fallback behavior for view direction resolution

If the required ViewParent methods aren't present for resolving text
direction or alignment, mark them resolved with default results and
skip further resolution steps.

Change-Id: I0ea6b0ce968cc24ffed77a2d1e66dfafbec49f9c
parent 639f37e7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -17206,6 +17206,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                    } catch (AbstractMethodError e) {
                        Log.e(VIEW_LOG_TAG, mParent.getClass().getSimpleName() +
                                " does not fully implement ViewParent", e);
                        mPrivateFlags2 |= PFLAG2_TEXT_DIRECTION_RESOLVED |
                                PFLAG2_TEXT_DIRECTION_RESOLVED_DEFAULT;
                        return true;
                    }
                    // Set current resolved direction to the same value as the parent's one
@@ -17435,6 +17438,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                    } catch (AbstractMethodError e) {
                        Log.e(VIEW_LOG_TAG, mParent.getClass().getSimpleName() +
                                " does not fully implement ViewParent", e);
                        mPrivateFlags2 |= PFLAG2_TEXT_ALIGNMENT_RESOLVED |
                                PFLAG2_TEXT_ALIGNMENT_RESOLVED_DEFAULT;
                        return true;
                    }
                    int parentResolvedTextAlignment;