Fix testShowInspector_DebugEnabled
This test only pass on userdebug rom previously.
We should manually set docsui DebugFlags in this test so it will not
failed on user rom.
Bug: 140299226
Test: atest DocumentsUIGoogleTests
Change-Id: I2ae98e2b3a9cd3a1869707e3a5b43eb4527b9146
diff --git a/tests/unit/com/android/documentsui/files/ActionHandlerTest.java b/tests/unit/com/android/documentsui/files/ActionHandlerTest.java
index de4f7fa..37d4e3d 100644
--- a/tests/unit/com/android/documentsui/files/ActionHandlerTest.java
+++ b/tests/unit/com/android/documentsui/files/ActionHandlerTest.java
@@ -53,6 +53,7 @@
import com.android.documentsui.R;
import com.android.documentsui.TestActionModeAddons;
import com.android.documentsui.archives.ArchivesProvider;
+import com.android.documentsui.base.DebugFlags;
import com.android.documentsui.base.DocumentInfo;
import com.android.documentsui.base.DocumentStack;
import com.android.documentsui.base.RootInfo;
@@ -642,12 +643,14 @@
@Test
public void testShowInspector_DebugEnabled() throws Exception {
mFeatures.debugSupport = true;
+ DebugFlags.setDocumentDetailsEnabled(true);
mHandler.showInspector(TestEnv.FILE_GIF);
Intent intent = mActivity.startActivity.getLastValue();
assertHasExtra(intent, Shared.EXTRA_SHOW_DEBUG);
assertTrue(intent.getExtras().getBoolean(Shared.EXTRA_SHOW_DEBUG));
+ DebugFlags.setDocumentDetailsEnabled(false);
}
@Test