Loading PREUPLOAD.cfg +0 −1 Original line number Diff line number Diff line [Hook Scripts] checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT} ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py -f ${PREUPLOAD_FILES} docsui_checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT} --config_xml ${REPO_ROOT}/packages/apps/DocumentsUI/preupload-checks.xml flags.aconfig +10 −5 Original line number Diff line number Diff line Loading @@ -17,31 +17,35 @@ flag { } flag { name: "zip_ng" name: "zip_ng_ro" namespace: "documentsui" description: "Enables the next generation ZIP functionality." bug: "382550591" is_fixed_read_only: true } flag { name: "desktop_file_handling" name: "desktop_file_handling_ro" namespace: "documentsui" description: "Enables desktop file handling." bug: "381778967" is_fixed_read_only: true } flag { name: "visual_signals" name: "visual_signals_ro" namespace: "documentsui" description: "Enables in-app progress display of file operations" bug: "378011512" is_fixed_read_only: true } flag { name: "hide_roots_on_desktop" name: "hide_roots_on_desktop_ro" namespace: "documentsui" description: "Enables the hiding of the Images/Videos/Audio/Documents roots on desktop." bug: "381959330" is_fixed_read_only: true } flag { Loading @@ -53,8 +57,9 @@ flag { } flag { name: "use_peek_preview" name: "use_peek_preview_ro" namespace: "documentsui" description: "Enables the Peek previewing capability as a substitute for the Inspector." bug: "373242058" is_fixed_read_only: true } preupload-checks.xmldeleted 100644 → 0 +0 −27 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright (C) 2025 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="RegexpSinglelineJava"> <property name="ignoreComments" value="true" /> <property name="severity" value="error" /> <property name="format" value="com.android.documentsui.flags.Flags" /> <property name="message" value="Please don't use Flags.* directly, instead add the flag to FlagUtils and use that instead." /> </module> </module> </module> src/com/android/documentsui/util/FlagUtils.kt +4 −4 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class FlagUtils { @JvmStatic fun isZipNgFlagEnabled(): Boolean { return Flags.zipNg() return Flags.zipNgRo() } @JvmStatic Loading @@ -41,17 +41,17 @@ class FlagUtils { @JvmStatic fun isDesktopFileHandlingFlagEnabled(): Boolean { return Flags.desktopFileHandling() return Flags.desktopFileHandlingRo() } @JvmStatic fun isHideRootsOnDesktopFlagEnabled(): Boolean { return Flags.hideRootsOnDesktop() return Flags.hideRootsOnDesktopRo() } @JvmStatic fun isUsePeekPreviewFlagEnabled(): Boolean { return Flags.usePeekPreview() return Flags.usePeekPreviewRo() } } } tests/functional/com/android/documentsui/FilesActivityDefaultsUiTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.documentsui; import static com.android.documentsui.StubProvider.ROOT_0_ID; import static com.android.documentsui.StubProvider.ROOT_1_ID; import static com.android.documentsui.flags.Flags.FLAG_HIDE_ROOTS_ON_DESKTOP; import static com.android.documentsui.flags.Flags.FLAG_HIDE_ROOTS_ON_DESKTOP_RO; import android.content.pm.PackageManager; import android.platform.test.annotations.RequiresFlagsDisabled; Loading Loading @@ -82,7 +82,7 @@ public class FilesActivityDefaultsUiTest extends ActivityTestJunit4<FilesActivit @Test @HugeLongTest @RequiresFlagsDisabled(FLAG_HIDE_ROOTS_ON_DESKTOP) @RequiresFlagsDisabled(FLAG_HIDE_ROOTS_ON_DESKTOP_RO) public void testDefaultRoots_hideRootsOnDesktopFlagDisabled() throws Exception { device.waitForIdle(); Loading @@ -99,7 +99,7 @@ public class FilesActivityDefaultsUiTest extends ActivityTestJunit4<FilesActivit @Test @HugeLongTest @RequiresFlagsEnabled(FLAG_HIDE_ROOTS_ON_DESKTOP) @RequiresFlagsEnabled(FLAG_HIDE_ROOTS_ON_DESKTOP_RO) public void testDefaultRoots_hideRootsOnDesktopFlagEnabled() throws Exception { device.waitForIdle(); Loading Loading
PREUPLOAD.cfg +0 −1 Original line number Diff line number Diff line [Hook Scripts] checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT} ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py -f ${PREUPLOAD_FILES} docsui_checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT} --config_xml ${REPO_ROOT}/packages/apps/DocumentsUI/preupload-checks.xml
flags.aconfig +10 −5 Original line number Diff line number Diff line Loading @@ -17,31 +17,35 @@ flag { } flag { name: "zip_ng" name: "zip_ng_ro" namespace: "documentsui" description: "Enables the next generation ZIP functionality." bug: "382550591" is_fixed_read_only: true } flag { name: "desktop_file_handling" name: "desktop_file_handling_ro" namespace: "documentsui" description: "Enables desktop file handling." bug: "381778967" is_fixed_read_only: true } flag { name: "visual_signals" name: "visual_signals_ro" namespace: "documentsui" description: "Enables in-app progress display of file operations" bug: "378011512" is_fixed_read_only: true } flag { name: "hide_roots_on_desktop" name: "hide_roots_on_desktop_ro" namespace: "documentsui" description: "Enables the hiding of the Images/Videos/Audio/Documents roots on desktop." bug: "381959330" is_fixed_read_only: true } flag { Loading @@ -53,8 +57,9 @@ flag { } flag { name: "use_peek_preview" name: "use_peek_preview_ro" namespace: "documentsui" description: "Enables the Peek previewing capability as a substitute for the Inspector." bug: "373242058" is_fixed_read_only: true }
preupload-checks.xmldeleted 100644 → 0 +0 −27 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright (C) 2025 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="RegexpSinglelineJava"> <property name="ignoreComments" value="true" /> <property name="severity" value="error" /> <property name="format" value="com.android.documentsui.flags.Flags" /> <property name="message" value="Please don't use Flags.* directly, instead add the flag to FlagUtils and use that instead." /> </module> </module> </module>
src/com/android/documentsui/util/FlagUtils.kt +4 −4 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class FlagUtils { @JvmStatic fun isZipNgFlagEnabled(): Boolean { return Flags.zipNg() return Flags.zipNgRo() } @JvmStatic Loading @@ -41,17 +41,17 @@ class FlagUtils { @JvmStatic fun isDesktopFileHandlingFlagEnabled(): Boolean { return Flags.desktopFileHandling() return Flags.desktopFileHandlingRo() } @JvmStatic fun isHideRootsOnDesktopFlagEnabled(): Boolean { return Flags.hideRootsOnDesktop() return Flags.hideRootsOnDesktopRo() } @JvmStatic fun isUsePeekPreviewFlagEnabled(): Boolean { return Flags.usePeekPreview() return Flags.usePeekPreviewRo() } } }
tests/functional/com/android/documentsui/FilesActivityDefaultsUiTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.documentsui; import static com.android.documentsui.StubProvider.ROOT_0_ID; import static com.android.documentsui.StubProvider.ROOT_1_ID; import static com.android.documentsui.flags.Flags.FLAG_HIDE_ROOTS_ON_DESKTOP; import static com.android.documentsui.flags.Flags.FLAG_HIDE_ROOTS_ON_DESKTOP_RO; import android.content.pm.PackageManager; import android.platform.test.annotations.RequiresFlagsDisabled; Loading Loading @@ -82,7 +82,7 @@ public class FilesActivityDefaultsUiTest extends ActivityTestJunit4<FilesActivit @Test @HugeLongTest @RequiresFlagsDisabled(FLAG_HIDE_ROOTS_ON_DESKTOP) @RequiresFlagsDisabled(FLAG_HIDE_ROOTS_ON_DESKTOP_RO) public void testDefaultRoots_hideRootsOnDesktopFlagDisabled() throws Exception { device.waitForIdle(); Loading @@ -99,7 +99,7 @@ public class FilesActivityDefaultsUiTest extends ActivityTestJunit4<FilesActivit @Test @HugeLongTest @RequiresFlagsEnabled(FLAG_HIDE_ROOTS_ON_DESKTOP) @RequiresFlagsEnabled(FLAG_HIDE_ROOTS_ON_DESKTOP_RO) public void testDefaultRoots_hideRootsOnDesktopFlagEnabled() throws Exception { device.waitForIdle(); Loading