Commit Graph

12 Commits

Author SHA1 Message Date
Jorim Jaggi
57157ac5d8 Fix WindowInsetsController lifecycle
Provide a recording insets controller before the window gets
created, and replay the commands once a view gets attached. This
allows the client to use the controller in Activity.onCreate.

Test: WindowInsetsControllerTests
Bug: 118118435
Change-Id: I1a825ecc4367c02b27f2d08cd5442325315d4f89
2020-03-03 15:12:15 +01:00
Charles Chen
1ac295ec08 Revert "Revert "Always get window insets from server""
This reverts commit 288e1bd045.

The previous implementation of computeWindowInsets is to
use last view from WM#addView, which may be invalid because
the last added view is removed and throws NPE when getting
property from the invalid view.
In this CL, we change the approach to always obtain window
insets from server.

fixes: 148789183
fixes: 149480577
Test: atest FrameworksCoreTests:WindowMetricsTest
Test: atest WindowMetricsTests

Change-Id: I6db5970d14ac9eebe0ab0df65cb1300515ad1754
(cherry picked from commit 6bb2d4f68c)
2020-02-24 03:46:51 +00:00
Bill Lin
f351272c36 Add CutoutSpecificationTest in Presubmit Test scope
1) Add CutoutSpecificationTest in Presubmit
2) Add CutoutSpecificationTest in FrameworksTestsFilter

Fixes: 149883140
Test: atest FrameworksCoreTests:CutoutSpecificationTest
Test: adb shell am instrument -w \
    -e filter com.android.server.wm.test.filters.FrameworksTestsFilter \
    -e selectTest_verbose true \
    com.android.frameworks.coretests/androidx.test.runner.AndroidJUnitRunner

Change-Id: I7db8f7797740d48a158650b63b7e90e5f1f28361
2020-02-20 14:19:55 +08:00
Wale Ogunwale
288e1bd045 Revert "Always get window insets from server"
This reverts commit 3e857ec536.

Reason for revert: Breaks wm-presubmit

Change-Id: I03fbbb01c8cabd0ebb9193adf640b9f07ce19826
2020-02-14 13:54:34 +00:00
Charles Chen
3e857ec536 Always get window insets from server
The previous implementation of computeWindowInsets is to
use last view from WM#addView, which may be invalid because
the last added view is removed and throws NPE when getting
property from the invalid view.
In this CL, we change the approach to always obtain window
insets from server.

fixes: 148789183
Test: atest FrameworksCoreTests:WindowMetricsTest
Test: atest WindowMetricsTests

Change-Id: Ic5512c31f86c597d99e13d29df654d3f527d6b55
2020-02-12 11:09:25 +08:00
Hongming Jin
bc76112e0b System action registration API for SystemUI
Bug: 136286274
Test: atest AccessibilityManagerTest
      atest AccessibilityManagerServiceTest
Change-Id: I6bbdf3627bfc9b39551cc7809dda1cf43d1d6ea4
2020-01-08 11:22:48 -08:00
Jorim Jaggi
956ca413e3 Window Manager Flag Migration (4/n)
Wire up the appearance and the transient state of system bars between
WMS and System UI. The derived classes of CommandQueue.Callbacks no
longer listen to setSystemUiVisibility, but listen to showTransient,
abortTransient, and onSystemBarAppearanceChanged instead.

Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
            InsetsPolicyTest WindowStateTests CommandQueueTest
            RegisterStatusBarResultTest InsetsFlagsTest
            LightBarControllerTest
Test: build on specific target
Change-Id: Ie35f4b4468bce7ef8c76f091e306610c069fba85
2019-10-19 16:59:06 +08:00
Ioannis Ilkos
8cca14103c Revert "Window Manager Flag Migration (4/n)"
This reverts commit cb1b848084.

Reason for revert: Droidcop-triggered revert due to b/142849532

Change-Id: If81eba4e979e21202e78839bb1afbc66691098d2
2019-10-17 09:38:00 +00:00
Jorim Jaggi
cb1b848084 Window Manager Flag Migration (4/n)
Wire up the appearance and the transient state of system bars between
WMS and System UI. The derived classes of CommandQueue.Callbacks no
longer listen to setSystemUiVisibility, but listen to showTransient,
abortTransient, and onSystemBarAppearanceChanged instead.

Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
            InsetsPolicyTest WindowStateTests CommandQueueTest
            RegisterStatusBarResultTest InsetsFlagsTest
            LightBarControllerTest
Change-Id: I1dcaff47ae57ccee91146fdc042cde5e26fc0b3f
2019-10-17 01:41:34 +08:00
Andrii Kulian
ca7f710eee Add unit tests for activity client state changes
This also adds new module for tests that require Extended Mockito.

Bug: 127106719
Test: atest FrameworksCoreTests:android.app.activity.ActivityThreadTest
Change-Id: I7ed5de72d35babbbf72c4c823d3a9e4baa50e3c4
2019-04-05 16:07:59 -07:00
Tadashi G. Takaoka
82eb7a5f63 Rename WM test filter to FrameworksTestsFilter
This CL adds android.view.InsetsAnimationControllerImplTest to the
test filter, and adds a comment to each tests mentioning about
FrameworksTestsFilter.

Test: Pass all 91 non-flaky presubmit tests in FrameworksCoreTests
      using FrameworksTestsFilter
  $ tradefed.sh run commandAndExit FrameworksCoreTests \
      --instrumentation-arg selectTest=com.android.server.wm. \
      --instrumentation-arg filter=com.android.server.wm.test.filters.FrameworksTestsFilter
      --include-annotation android.platform.test.annotations.Presubmit \
      --exclude-annotation androidx.test.filters.FlakyTest
Bug: 122451194

Change-Id: I9592ff01158eec1b4ef4d0dd22be243e10bd198e
2019-03-26 22:15:22 +09:00
Tadashi G. Takaoka
9648d4b04b Make SelectTest append selectTest argument from extended class
This CL also moves CoreTestsFilter to frameworks/base/test-util, so
that FrameworksCoreTests, FrameworksServicesTests, and WmTests can use
CoreTestsFilter.

Test: Pass SelectTestTests
  $ atest WmTests:com.android.test.filters.SelectTestTests
Test: Pass all 91 non-flaky presubmit tests in FrameworksCoreTests using
  CoreTestsFilter
  $ tradefed.sh run commandAndExit WmTests \
      --instrumentation-arg selectTest=com.android.server.wm. \
      --instrumentation-arg filter=com.android.server.wm.test.filters.CoreTestsFilter
      --include-annotation android.platform.test.annotations.Presubmit \
      --exclude-annotation androidx.test.filters.FlakyTest
Test: Pass all 740 non-flaky presubmit tests in WmTests using
  CoreTestsFilter
  $ tradefed.sh run commandAndExit WmTests \
      --instrumentation-arg selectTest=com.android.server.wm. \
      --instrumentation-arg filter=com.android.server.wm.test.filters.CoreTestsFilter
      --include-annotation android.platform.test.annotations.Presubmit \
      --exclude-annotation androidx.test.filters.FlakyTest
Bug: 122451194
Change-Id: I83d13d9ef82a92677bee67da5ee8a5faa0690f82
2019-03-22 18:04:30 +09:00