I am trying to identify the display cutout type selected in a programmatic way in android with OS >=9.0.
I tried this way
DisplayCutout displayCutout = getWindow().getDecorView().getRootWindowInsets().getDisplayCutout();
But display cutout always return null.
Also I am tried it in another way too
int mode = ((Activity) context).getWindow().getAttributes().layoutInDisplayCutoutMode;
But this gives me the value of what my application support . I have set to never in my style.
But I want to know whenever user selects different cutout type from the developer options from setting.
Please let me know if this can be achieved!