After spending more hours to exploring the new Window API on SDK >= 30 I have conclusion with this new Window API. The WindowInsets did not separate from DecorView, but this WindowInsets is inherited from DecorView, so you must calling DecorView first. Thanks for yours helps especially @JoeCFD for remembering me to write the correct return type. Here I gave pieces codes to facing the new Android API as Holiday gift 2022 pieces codes to facing new Android API SDK >= 30