summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorfelkachang <felkachang@google.com>2018-05-25 10:41:17 +0800
committerfelkachang <felkachang@google.com>2018-05-31 12:36:14 +0800
commite2cf7c8a8ccd289a6f505adbeac5fc3c47e2e1ed (patch)
treed36bd5eda13be2784245c5315f24eafcd24e4379 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent0a93a3530da35e22d1c85d59099b8c903b399e24 (diff)
Fix text is cut off in corner cut out condition
There is a todo that it needs to handle the corner cut out. In the condition of RTL and Corner Cut out, HeadsUpStatusBarView's padding is wrong because displayCutout.getSafeInsetRight() is 0 but corner cut out actually impact HeadsUpStatusBar's layout. Corner cut out make icon's start more big but mCutOutInset is 0 so the newPadding is a negative number. The handle method is to detect the part of overlaying with corner cut out. i.e. center cut out is exclude. To count the cut out start as cutOutStart and compare cutOutStart with icon's start. The cut out is not corner cut out if cutOutStart < icon's start. icon's minus the width of overlay part to prevent from negative padding. move the get screen size from onLayout to fitSystemWindows and onAttachToWindow because there is a chance to new object in onLayout. To new object in onLayout is not good practice. And, there is an chance to invoke ANR because Display.getRealSize() may do IPC. Fixes: 80271465 Test: atest SystemUITests Change-Id: I36fa5c880f5e624747133e46950c1c1695a5fa58
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions