Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fe645c1 authored by Ben Reich's avatar Ben Reich
Browse files

Allow the Material 3 override to bypass an already set value

The test APK shares the same application as the regular APK so when the
AndroidJunit4 runner starts up it instantiates DocumentsApplication.
This means the force_material3 value is set at that point. For devices
without the RRO value, this gets set to false. Then when a test attempts
to launch an activity and override the value, it restricts this update
thus never updating the theme properly.

This simply removes the restriction as nobody else should call this
method other than tests and the initial setup. This updates the log to
be a warning and ensures it's only logged if anyone tries to update the
value  when it's already set. This should help debugging in logcat if
any issues arise.

Bug: 422394294
Bug: 422710460
Bug: 422388511
Bug: 422387727
Bug: 422388604
Bug: 422389950
Bug: 422526492
Test: atest com.android.documentsui.SortDocumentUiTest
Test: atest com.android.documentsui.dirlist.AccessibilityTest
Test: atest com.android.documentsui.queries.SearchChipViewManagerTest
Test: atest com.android.documentsui.GridEvenSpacingDecorationTest
Test: atest com.android.documentsui.util.ThemeUtilsTest
Test: atest com.android.documentsui.DragAndDropManagerTest
Test: atest com.android.documentsui.picker.MenuManagerTest
Flag: com.android.documentsui.flags.use_material3
Change-Id: I853a603dd109d6c53ccb26b9d05c5dffc635e793
parent 7f41f74b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment