Open PSDroid2022 opened 2 years ago
So when the app try to call this API on devices level 19~20, your app will run with an unpredictable results
Where is this ever called for such devices? I only can find it in https://github.com/openboard-team/openboard/blob/e9393dfab01dcdfb0872f360b1afe8092777f5ec/app/src/main/java/org/dslul/openboard/inputmethod/compat/ViewOutlineProviderCompatUtils.kt#L14-L17
OK, it seems like "InsetsOutlineProvider()" is a dead code in ViewOutlineProviderCompatUtilsLXX.
Hi, nice day! This time we confirm a callback compatibility issue which might threaten the robustness of your app and give a detailed suggestion for you.
In ''org.dslul.openboard.inputmethod.compat.ViewOutlineProviderCompatUtilsLXX", you call the framework API "<android.view.View: void invalidateOutline()>" in "InsetsOutlineProvider" method as shown in following. But actually, this method is added in API level 21 (https://developer.android.google.cn/reference/android/view/View?hl=en#invalidateOutline()).
So when the app try to call this API on devices level 19~20, your app will run with an unpredictable results. So we suggest you add an "if(SDK_INT>=21)", " @TargetApi(Build.VERSION_CODES.Lollipop)" or change your app miniSDK from 19 to 21 to fix this potential issue. By the way, "@TargetApi(Build.VERSION_CODES.Lollipop)" will be deleted by Android compiler when extracting APKs, so it seems like a not good way to solve those issues.