Do not show entry point when no CD attached
Do not show External Displays entry point unless one (or more) external displays is actually attached. Flag: com.android.settings.flags.display_topology_pane_in_display_list Bug: b/352648432 Test: atest ExternalDisplayPreferenceFragmentTest.java Test: attach one external display and open CD settings - verify the topology pane is shown Test: add and remove an external display and verify the connected device entry point is added and removed Change-Id: If263e98aeaf7be2778c1e8a1cbafc7e2345bb0c5
This commit is contained in:
@@ -323,14 +323,6 @@ public class ExternalDisplaySettingsConfiguration {
|
||||
|| flags.displayTopologyPaneInDisplayList();
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, indicates the display list activity should be shown even if there is only one
|
||||
* display.
|
||||
*/
|
||||
public static boolean forceShowDisplayList(@NonNull FeatureFlags flags) {
|
||||
return flags.displayTopologyPaneInDisplayList();
|
||||
}
|
||||
|
||||
static boolean isDisplayAllowed(@NonNull Display display,
|
||||
@NonNull SystemServicesProvider props) {
|
||||
return display.getType() == Display.TYPE_EXTERNAL
|
||||
@@ -338,6 +330,10 @@ public class ExternalDisplaySettingsConfiguration {
|
||||
|| isVirtualDisplayAllowed(display, props);
|
||||
}
|
||||
|
||||
static boolean isTopologyPaneEnabled(@Nullable Injector injector) {
|
||||
return injector != null && injector.getFlags().displayTopologyPaneInDisplayList();
|
||||
}
|
||||
|
||||
static boolean isVirtualDisplayAllowed(@NonNull Display display,
|
||||
@NonNull SystemServicesProvider properties) {
|
||||
var sysProp = properties.getSystemProperty(VIRTUAL_DISPLAY_PACKAGE_NAME_SYSTEM_PROPERTY);
|
||||
|
||||
Reference in New Issue
Block a user