@Override
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
...
}
return super.onApplyWindowInsets(insets);
}
So when the app try to initial related function on devices level 16 and 19, 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 16 to 21 to fix this potential issue.
By the way, "@TargetApi(Build.VERSION_CODES.LOLLIPOP)" will be deleted by Android compiler when releasing APKs, so it seems like a not good way to solve those issues.
We confirm a callback compatibility issue which might threaten the robustness of your app and give a detailed suggestion for you.
In ''com.kabouzeid.gramophone.views.StatusBarView" and "StatusBarMarginFrameLayout", you super the framework API "<android.view.View: android.view.WindowInsets onApplyWindowInsets(android.view.WindowInsets)>" in "onApplyWindowInsets" 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#onApplyWindowInsets(android.view.WindowInsets)).
So when the app try to initial related function on devices level 16 and 19, 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 16 to 21 to fix this potential issue. By the way, "@TargetApi(Build.VERSION_CODES.LOLLIPOP)" will be deleted by Android compiler when releasing APKs, so it seems like a not good way to solve those issues.