@@ -164,6 +164,8 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen
privatebooleanwant_no_limits;// whether we want to run with FLAG_LAYOUT_NO_LIMITS
privatebooleanset_window_insets_listener;// whether we've enabled a setOnApplyWindowInsetsListener()
privateintnavigation_gap;// gap for navigation bar along bottom (portrait) or right (landscape)
privateintnavigation_gap_landscape;// gap for navigation bar along left (portrait) or bottom (landscape); only set for edge_to_edge_mode==true
privateintnavigation_gap_reverse_landscape;// gap for navigation bar along right (portrait) or top (landscape); only set for edge_to_edge_mode==true
publicstaticvolatilebooleantest_preview_want_no_limits;// test flag, if set to true then instead use test_preview_want_no_limits_value; needs to be static, as it needs to be set before activity is created to take effect
publicvolatilebooleantest_set_show_under_navigation;// test flag, the value of enable for the last call of showUnderNavigation() (or false if not yet called)
@@ -514,7 +516,7 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen
resetCachedSystemOrientation();// don't want to get cached result - this can sometimes happen e.g. on Pixel 6 Pro when switching between landscape and reverse landscape
// for edge_to_edge_mode==false, we only enter this case if system orientation changes, due to issues where this callback may be called first with 0 navigation gap
// (see notes below)
// for edge_to_edge_mode==true, simpler to always react to updated insets - in particular, in split-window mode, the navigation gaps can
// change when device rotates, even though the application remains in the same orientation
@@ -193,7 +193,13 @@ public interface ApplicationInterface {
booleanallowZoom();// if false, don't allow zoom functionality even if the device supports it - Preview.supportsZoom() will also return false; if true, allow zoom if the device supports it
booleanoptimiseFocusForLatency();// behaviour for taking photos with continuous focus mode: if true, optimise focus for latency (take photo asap); if false, optimise for quality (don't take photo until scene is focused)
voidgetDisplaySize(Pointdisplay_size);// get size of default display, e.g., Activity.getWindowManager().getDefaultDisplay().getSize()
/** Return size of default display, e.g., Activity.getWindowManager().getDefaultDisplay().getSize().
* @param display_size The returned display size.
* @param exclude_insets If the activity is running in edge-to-edge mode, then whether to exclude
* insets. If the activity is not running in edge-to-edge mode, then this should
* be ignored, and insets should always be excluded.