AppBundlesVisibilityManager { public boolean shouldEnableAppBundles() { return !isDeviceMIUI || !hardwareSpecsFilterProvider.isOnlyShowCompatibleApps() || (isDeviceMIUI && isMIUIWithAABFix); } AppBundlesVisibilityManager(boolean isMIUIWithAABFix, boolean isDeviceMIUI,
      HardwareSpecsFilterProvider hardwareSpecsFilterProvider); boolean shouldEnableAppBundles();  }
@Test public void shouldEnableAppBundles_MIUI_CompatibleAppsOnly() { AppBundlesVisibilityManager appBundlesVisibilityManager = new AppBundlesVisibilityManager(false, true, () -> true); assertFalse(appBundlesVisibilityManager.shouldEnableAppBundles()); }
@Test public void shouldEnableAppBundles_MIUI_ShowNonCompatibleApps() { AppBundlesVisibilityManager appBundlesVisibilityManager = new AppBundlesVisibilityManager(false, true, () -> false); assertTrue(appBundlesVisibilityManager.shouldEnableAppBundles()); }
@Test public void shouldEnableAppBundles_NonMIUI_ShowNonCompatibleApps() { AppBundlesVisibilityManager appBundlesVisibilityManager = new AppBundlesVisibilityManager(false, false, () -> false); assertTrue(appBundlesVisibilityManager.shouldEnableAppBundles()); }
@Test public void shouldEnableAppBundles_NonMIUI_CompatibleAppsOnly() { AppBundlesVisibilityManager appBundlesVisibilityManager = new AppBundlesVisibilityManager(false, false, () -> true); assertTrue(appBundlesVisibilityManager.shouldEnableAppBundles()); }