External display mode limit flag in settings
Use external display mode limit flag and override for the flag in the settings to allow selection of any resolutions with the refresh rate around 60 Change-Id: I180ba97eb9dfa14a386a7517f29504d369268563 Bug: 351831642 Flag: com.android.settings.flags.resolution_and_enable_connected_display_setting Test: atest ResolutionPreferenceFragmentTest
This commit is contained in:
@@ -23,6 +23,8 @@ import static android.hardware.display.DisplayManager.EVENT_FLAG_DISPLAY_CONNECT
|
||||
import static android.hardware.display.DisplayManager.EVENT_FLAG_DISPLAY_REMOVED;
|
||||
import static android.view.Display.INVALID_DISPLAY;
|
||||
|
||||
import static com.android.server.display.feature.flags.Flags.enableModeLimitForExternalDisplay;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.display.DisplayManager;
|
||||
import android.hardware.display.DisplayManagerGlobal;
|
||||
@@ -271,6 +273,13 @@ public class ExternalDisplaySettingsConfiguration {
|
||||
public void setUserPreferredDisplayMode(int displayId, @NonNull Mode mode) {
|
||||
DisplayManagerGlobal.getInstance().setUserPreferredDisplayMode(displayId, mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the display mode limit flag enabled.
|
||||
*/
|
||||
public boolean isModeLimitForExternalDisplayEnabled() {
|
||||
return enableModeLimitForExternalDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract static class DisplayListener implements DisplayManager.DisplayListener {
|
||||
|
||||
Reference in New Issue
Block a user