Disable preview actions when code has errors

This change disables preview actions (such as Interactive or Animation
preview modes) until the code is compilable again, improving the user
experience.
Additionally, the EnableUnderConditionWrapper now provides a reason
when disabling an action.
Fixes: 333714367
Test: PreviewSurfaceActionManagerTest

Change-Id: Ie6a3faedee048200c0456e0484475b8ac6a9dabd
6 files changed
tree: 6354799d61506211f4329df1a7403bdacae104c7
  1. .idea/
  2. adt-testutils/
  3. adt-ui/
  4. adt-ui-compose/
  5. adt-ui-model/
  6. analytics/
  7. android/
  8. android-adb/
  9. android-adb-ui/
  10. android-common/
  11. android-kotlin/
  12. android-lang/
  13. android-lang-databinding/
  14. android-lint/
  15. android-material/
  16. android-navigator/
  17. android-npw/
  18. android-plugin/
  19. android-templates/
  20. android-test-framework/
  21. android-transport/
  22. android-uitests/
  23. androidx-integration-tests/
  24. apkanalyzer/
  25. app-inspection/
  26. app-quality-insights/
  27. artwork/
  28. artwork-compose/
  29. as-driver/
  30. assistant/
  31. bleak/
  32. bleak-config/
  33. build-attribution/
  34. build-common/
  35. codenavigation/
  36. completion/
  37. compose-designer/
  38. compose-ide-plugin/
  39. connection-assistant/
  40. dagger/
  41. databinding/
  42. debuggers/
  43. deploy/
  44. design-plugin/
  45. designer/
  46. designer-perf-tests/
  47. device-explorer/
  48. device-explorer-common/
  49. device-explorer-files/
  50. device-explorer-monitor/
  51. device-manager/
  52. device-manager-v2/
  53. execution/
  54. glance-designer/
  55. gmd-code-completion/
  56. gradle-dsl/
  57. gradle-dsl-declarative/
  58. gradle-dsl-kotlin/
  59. gradle-dsl-toml/
  60. gradle-tooling/
  61. ide-perf-tests/
  62. inspectors-common/
  63. intellij-integration/
  64. intellij.android.avdmanager.tests/
  65. intellij.android.compose-common/
  66. intellij.android.device/
  67. intellij.android.device.tests/
  68. jps-model/
  69. layout-inspector/
  70. layout-ui/
  71. layoutlib/
  72. layoutlib-loader/
  73. lint/
  74. logcat/
  75. manual-tests/
  76. memory-usage/
  77. ml-api/
  78. mlkit/
  79. motion-editor/
  80. native/
  81. native-symbolizer/
  82. nav/
  83. observable/
  84. observable-demo/
  85. observable-ui/
  86. old-agp-tests/
  87. preview-designer/
  88. preview-elements/
  89. preview-fast-compile/
  90. profilers/
  91. profilers-android/
  92. profilers-atrace/
  93. profilers-integration/
  94. profilers-ui/
  95. project-system/
  96. project-system-apk/
  97. project-system-gradle/
  98. project-system-gradle-models/
  99. project-system-gradle-psd/
  100. project-system-gradle-repository-search/
  101. project-system-gradle-sync/
  102. project-system-gradle-sync-test-utils/
  103. project-system-gradle-upgrade/
  104. project-system-integration-tests/
  105. render-resources/
  106. rendering/
  107. room/
  108. rt/
  109. safemode/
  110. samples-browser/
  111. sdk-updates/
  112. searchable-options/
  113. server-flags/
  114. smali/
  115. streaming/
  116. studio/
  117. studio-updater/
  118. swingp/
  119. sync-memory-tests/
  120. sync-perf-tests/
  121. threading-checker/
  122. transport-database/
  123. uitest-framework/
  124. ultimate/
  125. utp/
  126. wear-designer/
  127. wear-pairing/
  128. wear-whs/
  129. whats-new-assistant/
  130. wizard/
  131. wizard-model/
  132. .editorconfig
  133. .gitallowed
  134. .gitignore
  135. get_aosp_changes.sh
  136. icon-robots.txt
  137. intellij.yaml
  138. PREUPLOAD.cfg
  139. README.md
README.md