Create new sections for developer options

To group desktop experience and window management options

Test: Build and check
Bug: 390625230
Flag: EXEMPT (refactor)

Change-Id: Ie076501da68045fa5f1098423a42d32f16a02838
This commit is contained in:
Pierre Barbier de Reuille
2025-01-23 20:38:30 +00:00
parent ea1cad3776
commit bf50c0baef
18 changed files with 98 additions and 54 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.settings.development;
package com.android.settings.development.desktopexperience;
import static android.provider.Settings.Global.DEVELOPMENT_OVERRIDE_DESKTOP_EXPERIENCE_FEATURES;
import static android.window.DesktopModeFlags.ToggleOverride.OVERRIDE_OFF;
@@ -44,6 +44,8 @@ import androidx.preference.SwitchPreference;
import androidx.test.core.app.ApplicationProvider;
import com.android.settings.R;
import com.android.settings.development.DevelopmentSettingsDashboardFragment;
import com.android.settings.development.RebootConfirmationDialogFragment;
import com.android.window.flags.Flags;
import org.junit.Before;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.settings.development;
package com.android.settings.development.desktopexperience;
import static android.provider.Settings.Global.DEVELOPMENT_OVERRIDE_DESKTOP_MODE_FEATURES;
import static android.window.DesktopModeFlags.ToggleOverride.OVERRIDE_ON;
@@ -44,6 +44,8 @@ import androidx.preference.SwitchPreference;
import androidx.test.core.app.ApplicationProvider;
import com.android.internal.R;
import com.android.settings.development.DevelopmentSettingsDashboardFragment;
import com.android.settings.development.RebootConfirmationDialogFragment;
import com.android.window.flags.Flags;
import org.junit.Before;

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.android.settings.development;
package com.android.settings.development.desktopexperience;
import static android.provider.Settings.Global.DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT;
import static android.provider.Settings.Global.DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS;
import static com.android.settings.development.DesktopModeSecondaryDisplayPreferenceController.SETTING_VALUE_OFF;
import static com.android.settings.development.DesktopModeSecondaryDisplayPreferenceController.SETTING_VALUE_ON;
import static com.android.settings.development.desktopexperience.DesktopModeSecondaryDisplayPreferenceController.SETTING_VALUE_OFF;
import static com.android.settings.development.desktopexperience.DesktopModeSecondaryDisplayPreferenceController.SETTING_VALUE_ON;
import static com.google.common.truth.Truth.assertThat;
@@ -44,6 +44,8 @@ import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
import com.android.internal.R;
import com.android.settings.development.DevelopmentSettingsDashboardFragment;
import com.android.settings.development.RebootConfirmationDialogFragment;
import com.android.window.flags.Flags;
import org.junit.Before;
@@ -97,9 +99,9 @@ public class DesktopModeSecondaryDisplayPreferenceControllerTest {
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
mController.displayPreference(mScreen);
when(mResources.getBoolean(R.bool.config_isDesktopModeSupported)).thenReturn(false);
when(mResources
.getBoolean(com.android.internal.R.bool.config_canInternalDisplayHostDesktops))
.thenReturn(false);
when(mResources.getBoolean(
com.android.internal.R.bool.config_canInternalDisplayHostDesktops)).thenReturn(
false);
}
@DisableFlags(Flags.FLAG_SHOW_DESKTOP_EXPERIENCE_DEV_OPTION)

View File

@@ -14,12 +14,12 @@
* limitations under the License.
*/
package com.android.settings.development;
package com.android.settings.development.desktopexperience;
import static android.content.pm.PackageManager.FEATURE_FREEFORM_WINDOW_MANAGEMENT;
import static com.android.settings.development.FreeformWindowsPreferenceController.SETTING_VALUE_OFF;
import static com.android.settings.development.FreeformWindowsPreferenceController.SETTING_VALUE_ON;
import static com.android.settings.development.desktopexperience.FreeformWindowsPreferenceController.SETTING_VALUE_OFF;
import static com.android.settings.development.desktopexperience.FreeformWindowsPreferenceController.SETTING_VALUE_ON;
import static com.google.common.truth.Truth.assertThat;
@@ -43,6 +43,8 @@ import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
import com.android.internal.R;
import com.android.settings.development.DevelopmentSettingsDashboardFragment;
import com.android.settings.development.RebootConfirmationDialogFragment;
import com.android.window.flags.Flags;
import org.junit.Before;

View File

@@ -0,0 +1,2 @@
include platform/frameworks/base:/services/core/java/com/android/server/wm/OWNERS
include platform/frameworks/base:/libs/WindowManager/Shell/OWNERS

View File

@@ -14,12 +14,12 @@
* limitations under the License.
*/
package com.android.settings.development;
package com.android.settings.development.window;
import static android.provider.Settings.Global.DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW;
import static com.android.settings.development.NonResizableMultiWindowPreferenceController.SETTING_VALUE_OFF;
import static com.android.settings.development.NonResizableMultiWindowPreferenceController.SETTING_VALUE_ON;
import static com.android.settings.development.window.NonResizableMultiWindowPreferenceController.SETTING_VALUE_OFF;
import static com.android.settings.development.window.NonResizableMultiWindowPreferenceController.SETTING_VALUE_ON;
import static com.google.common.truth.Truth.assertThat;

View File

@@ -0,0 +1,3 @@
include platform/frameworks/base:/services/core/java/com/android/server/wm/OWNERS
include platform/frameworks/base:/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/OWNERS
include platform/frameworks/base:/libs/WindowManager/Shell/OWNERS

View File

@@ -1,5 +1,3 @@
package com.android.settings.development;
/*
* Copyright (C) 2017 The Android Open Source Project
*
@@ -16,6 +14,8 @@ package com.android.settings.development;
* limitations under the License.
*/
package com.android.settings.development.window;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.verify;