Commit Graph

10691 Commits

Author SHA1 Message Date
TreeHugger Robot
9f093aa700 Merge "Kill app if cross profile app op gets revoked" into rvc-dev am: 45c68542f9 am: 0571d3ab0d
Change-Id: I81fca9024ecd09a64ba2af0ab5ba376a36f518c8
2020-05-15 16:08:47 +00:00
TreeHugger Robot
aa40db99dc Merge "Added test to check package whitelisting." into rvc-dev am: 8c211a713b am: c10f20b79b
Change-Id: I5135f7f0ef074595cd1034176684e64fb7505ad6
2020-05-15 15:53:49 +00:00
Kweku Adams
9503bffec4 Merge "Partially exempt headless system apps from app standby." into rvc-dev am: 84e2f0c582 am: b86b4ada8a
Change-Id: I733d78ef67760a9f26065487a64440f466f5b46e
2020-05-15 15:47:55 +00:00
Riddle Hsu
5d6b08b5fa Merge changes Idb4f9a92,I8d8a926d,I8e30e87e into rvc-dev am: fc48f7e52a am: 9ff72fefaa
Change-Id: I657a7c64915c4b6efcf7f34bf76cf839f049b24f
2020-05-15 15:47:42 +00:00
TreeHugger Robot
f1ed93839a Merge "Make sure only the top-most running activity can be active" into rvc-dev am: 3b6ade6a89 am: 14820cd091
Change-Id: I8a141bfd0c1d18055767c087063669fb10641891
2020-05-15 15:44:32 +00:00
Ming-Shin Lu
724edf44a1 Merge "Revert "Fix resize info activity not showing in some cases"" into rvc-dev am: ce36e4413e am: 47129b2bc4
Change-Id: I18c5291e312891737fa2c6c64925408ce78865e5
2020-05-15 15:44:14 +00:00
kholoud mohamed
087391049e Kill app if cross profile app op gets revoked
Kill the app in both profiles if user/admin revokes
the cross profile app op permission, this is to ensure
that any cross profile bound services gets unbound as
soon as the app op is revoked.

Fixes: 154693902
Test: atest ManagedProfileCrossProfileTest
Test: atest FrameworksServicesTests:com.android.server.pm.CrossProfileAppsServiceImplTest
Test: atest CrossProfileAppsServiceImplRoboTest
Change-Id: Iaa3b9196468149c1cec51e9101989f1877374cc5
2020-05-15 11:01:39 +00:00
felipeal
a1c0dabb7a Added test to check package whitelisting.
Also changed report-system-user-package-whitelist-problems --critical-only
to ignore errors on log mode.

Test: atest UserManagerServiceTest
Test: adb shell cmd user report-system-user-package-whitelist-problems --critical-only --mode 2

Fixes: 154112291

Change-Id: Ibe729ebd7720d62e5fec049bd95764309662e529
2020-05-14 11:26:28 -07:00
Kweku Adams
84e2f0c582 Merge "Partially exempt headless system apps from app standby." into rvc-dev 2020-05-14 14:47:36 +00:00
Riddle Hsu
db94bfd6bd Apply fixed rotation when showing snapshot starting window
Unlike splash screen starting window that inherits the size of
activity directly, task snapshot needs the final size to draw right
after adding to display. Otherwise the content will look like as
cropped because the surface size uses different orientation.

And because starting window is added before executing transition,
assume there will have transition if the owner of starting window
is also the top activity.

Bug: 155862858
Test: ActivityRecordTests#testFixedRotationSnapshotStartingWindow
Change-Id: Idb4f9a92a6e2594356416afd0ab6360e94e66497
2020-05-14 16:46:10 +08:00
Riddle Hsu
eae6ef3ebf Only use snapshot starting window for the same rotation
So the snapshot won't show half if the its has a delta of 90 degree
rotation with the actual activity. If the snapshot is not compatible
with the activity, the starting window type will be splash screen.

Bug: 155862858
Test: atest ActivityRecordTests#testIsSnapshotCompatible
Change-Id: I8d8a926d057f1d18d028fcc03bddbb17ffbbf96b
2020-05-14 16:46:01 +08:00
Riddle Hsu
742313e4c3 Do not capture task snapshot with fixed rotated activity
Because the rotation of activity and task are different, The
information of snapshot may be inconsistent. And since it is a
temporal state, in most cases the snapshot is available after
the fixed rotation is cleared. This fixes a non-rotated snapshot
is shown on a rotated activity when repeating launch and swipe
to home quickly.

Also the fixed rotation launching app should not be cleared if
there is pending rotation, otherwise it is too early that the
display is still in old rotation. This fixes flickering when
switching between activities in different rotation from quickstep.

Bug: 155862858
Test: atest TaskSnapshotControllerTest#testPrepareTaskSnapshot
      ActivityRecordTests#testActivityOnCancelFixedRotationTransform
Change-Id: I8e30e87ea4aad907c4ad4338b91fcff3078380ad
2020-05-14 16:22:48 +08:00
TreeHugger Robot
3b6ade6a89 Merge "Make sure only the top-most running activity can be active" into rvc-dev 2020-05-14 04:39:21 +00:00
Ming-Shin Lu
ce36e4413e Merge "Revert "Fix resize info activity not showing in some cases"" into rvc-dev 2020-05-14 03:29:32 +00:00
Diego Vela
25cbe9d7c7 Revert "Fix resize info activity not showing in some cases"
This reverts commit 671c007d11.


Reason for revert: Test regressed PinnedStackTests#testFinishPipActivityWithTaskOverlay 
in ag/10841394

Bug: 135520403

Bug: 156314330
Test: atest CtsWindowManagerDeviceTestCases:PinnedStackTests#testFinishPipActivityWithTaskOverlay
Change-Id: Ib73433e8a8cdae3af0ccc20dad8079ba12283867
2020-05-14 03:24:46 +00:00
TreeHugger Robot
c192300322 Merge "Fix OOM when running testAddRemoveRace" into rvc-dev am: 989150cb71 am: f93eedda40
Change-Id: If0257162295cbc1583316e67965613dbee921c73
2020-05-13 13:07:24 +00:00
TreeHugger Robot
989150cb71 Merge "Fix OOM when running testAddRemoveRace" into rvc-dev 2020-05-13 12:51:28 +00:00
Vadim Caen
4bb227362d Merge changes I24d33b94,I9db3c5d1 into rvc-dev am: ade62d5627 am: 5dcacf7967
Change-Id: If5e05bbf86e71264dad43a1faceb1312698bc449
2020-05-13 12:43:00 +00:00
Vadim Caen
ade62d5627 Merge changes I24d33b94,I9db3c5d1 into rvc-dev
* changes:
  System Bars animation for fixed rotation transform
  Defer animation finish from AnimationAdatpter
2020-05-13 12:23:38 +00:00
Tiger Huang
587afb410b Merge "Remove more dead tests of legacy insets mode" into rvc-dev am: 47936d5e9c am: bb7f4caf03
Change-Id: I31188bf3d0b980eddbef552931405674a4d042cd
2020-05-13 12:22:44 +00:00
Tiger Huang
47936d5e9c Merge "Remove more dead tests of legacy insets mode" into rvc-dev 2020-05-13 11:52:39 +00:00
Tiger Huang
1da312dcab Remove more dead tests of legacy insets mode
This CL also removes the assumptions about the new insets mode, because
we are always in the new insets mode now.

Fix: 156311082
Test: atest ViewRootImplTest DisplayPolicyLayoutTests WindowStateTests
Change-Id: I9f6f8824ae364b9cd95f6715dd761026d602c095
2020-05-13 16:50:55 +08:00
Yunfan Chen
4c6a8fc2e2 Fix OOM when running testAddRemoveRace
The test has been very likely to fail with OOM error or process crashes.
This is because we repeatedly creating ActivityRecord/ActivityStack/Task
in the test. Even though we release it after each run, the GC can still
throw OOM because of reference by mocking is not released while running
the test. After receiving several OOM's, the test process will crash.

To fix this issue, simply re-use the same ActivityRecord instead of
creating one per loop run. This works for this test as we only care
about the starting window handling inside ActivityRecord.

Test: atest AppWindowTokenTests#testAddRemoveRace
Bug: 130392471
Change-Id: I7df942d364ee07e179b05b6f837494c475197d7c
2020-05-13 17:43:53 +09:00
Evan Rosky
e658e17090 Merge "Revert^2: Fix pip enter/expand from split-screen secondary." into rvc-dev am: d4551c1d93
Change-Id: I609eea3879ff29eced2dee9f6fb23d4a601950b0
2020-05-12 19:36:11 +00:00
Evan Rosky
d4551c1d93 Merge "Revert^2: Fix pip enter/expand from split-screen secondary." into rvc-dev 2020-05-12 19:30:32 +00:00
Vadim Caen
dca5b93bf9 System Bars animation for fixed rotation transform
Fade out system bars when the fixed transform is starting and fade them
in once its finished.

Bug: 150676212
Test: Manual: open and close a landscape application, and open and
      immediately cancel opening animation.
Test:  atest WmTests:com.android.server.wm.DisplayContentTests#
       testApplyTopFixedRotationTransform

Change-Id: I24d33b947193e8b87f13b497c0b32e3794f2b070
2020-05-12 16:58:14 +02:00
Vadim Caen
17b76b76bf Defer animation finish from AnimationAdatpter
Add a method similar to Animatable.shouldDeferAnimationFinish() in
AnimationAdatper to give more flexibility when we can't override
Animatable.

Bug: 150676212
Test: atest
WmTests: com.android.server.wm.SurfaceAnimatorTest#testDeferFinishFromAdapter
Change-Id: I9db3c5d1e1ac92c68fe00eca886ea71965d0142e
2020-05-12 16:58:14 +02:00
Wei Sheng Shih
46c3b395f9 Merge "Fix other tests be affected by mocked local services." into rvc-dev am: d1979ef0f8
Change-Id: I9ebc85ef63c363a9062b45fab8714824d1b24db6
2020-05-12 10:35:56 +00:00
Wei Sheng Shih
d1979ef0f8 Merge "Fix other tests be affected by mocked local services." into rvc-dev 2020-05-12 10:19:45 +00:00
wilsonshih
30fa728060 Fix other tests be affected by mocked local services.
Remove mocked local services after test finish, so it won't affect
other tests.

Fixes: 156221489
Test: atest ActivityStartInterceptorTest AppWindowTokenTests
Change-Id: I2e868204fe098c616ff8b2b17c3d47e42d799124
2020-05-12 15:28:18 +08:00
TreeHugger Robot
fedabb1b9d Merge "Add tests to verify UsageStats persistence." into rvc-dev am: 564efe2286
Change-Id: I0193ccada3de410b19208ef6755e17439b6ee49f
2020-05-12 07:09:04 +00:00
Varun Shah
c95e54ef4d Add tests to verify UsageStats persistence.
These new tests verify that all fields defined in UsageStats,
UsageEvents.Event and IntervalStats are known fields. This is to ensure
that when new fields are added to these objects or a refactoring is
done, the fields are accounted for when persisting usage stats.

Bug: 155935953
Test: atest UsageStatsPersistenceTest
Test: atest IntervalStatsTest
Change-Id: Ice65391d0af08b64db4ccaa046e57d9fca299319
2020-05-11 22:12:50 -07:00
TreeHugger Robot
a5014e1435 Merge "Provide a fixed transform hint if the layer is in a fixed orientation 2/2" into rvc-dev am: db5201d3ab
Change-Id: I2f8cc902006808c78e635de9fb0b4a9143dab05b
2020-05-12 00:08:25 +00:00
TreeHugger Robot
db5201d3ab Merge "Provide a fixed transform hint if the layer is in a fixed orientation 2/2" into rvc-dev 2020-05-11 23:51:56 +00:00
Vishnu Nair
eb53e52395 Provide a fixed transform hint if the layer is in a fixed orientation 2/2
The transform hint is used to prevent allocating a buffer of a
different size when a layer is rotated. The producer can choose to
consume the hint and allocate the buffer with the same size.

Provide the graphic producer a transform hint if the layer and its
children are in an orientation different from the display's
orientation. The caller is responsible for clearing this transform
hint if the layer is no longer in a fixed orientation.

Bug: 152919661
Test: atest VulkanPreTransformTest
Test: confirm with winscope trace, buffers are allocated taking into
account the transform hint in fixed orientation scenarios
Test: go/wm-smoke

Change-Id: I2ccc21ed8af015716e6cdfde1e3cec67c99f3339
2020-05-11 13:19:59 -07:00
Jay Aliomer
0f4f05eb21 Merge "Dark theme not turning on/off when in twilight mode" into rvc-dev am: 04041cf1d7
Change-Id: Ida3892ca4fb246efd1ebdd02c476dd54a676afc8
2020-05-11 19:36:19 +00:00
Pavel Grafov
9f15cd6223 Merge "Make getPersonalAppsSuspensionReasons more robust." into rvc-dev am: c8d5a68525
Change-Id: I5cb51fd9ca5e22ceb8904a74c6ffa9a29591a35e
2020-05-11 19:35:52 +00:00
TreeHugger Robot
ff7566b920 Merge "InsetsSourceProvider: Fix serverVisible update order in onPostLayout" into rvc-dev am: dc9883a0bd
Change-Id: I727e6bc7c0df382725e41eb62c9654f4c2f5b300
2020-05-11 19:34:51 +00:00
Jay Aliomer
04041cf1d7 Merge "Dark theme not turning on/off when in twilight mode" into rvc-dev 2020-05-11 19:01:23 +00:00
Pavel Grafov
c8d5a68525 Merge "Make getPersonalAppsSuspensionReasons more robust." into rvc-dev 2020-05-11 18:04:12 +00:00
TreeHugger Robot
dc9883a0bd Merge "InsetsSourceProvider: Fix serverVisible update order in onPostLayout" into rvc-dev 2020-05-11 17:43:35 +00:00
Jay Aliomer
e0500885f0 Dark theme not turning on/off when in twilight mode
Fixes: 156254231
Test: UiModeManagerTest
Change-Id: I570319bfe0acabce418b071f21d75b760f5464a2
2020-05-11 16:29:26 +00:00
Kweku Adams
95cd952b47 Partially exempt headless system apps from app standby.
The user can't interact with headless system apps (pre-installed apps
without any activities) but they're expected to work properly. We don't
want to fully exempt the apps from app standby, but they should be fine
operating in the ACTIVE bucket, so we make sure that headless system
apps never fall below the ACTIVE bucket.

Bug: 155761007
Test: atest FrameworksServicesTests:AppIdleHistoryTests
Test: atest FrameworksServicesTests:AppStandbyControllerTests
Change-Id: I1549bb81eca293be31691b079bab2142cbcdf8a7
2020-05-11 09:22:31 -07:00
Diego Vela
7c6726f676 Merge "Fix resize info activity not showing in some cases" into rvc-dev am: 458938578f
Change-Id: I73030d71e22d8f21058873bd699fc16a5866b994
2020-05-11 16:09:59 +00:00
Pavel Grafov
3b4aa554ac Make getPersonalAppsSuspensionReasons more robust.
* Make sure that if the time is rolled back after the deadline
  has been reached, it is not undone. When the deadline is
  reached it is set to -1 which is far in the past, so timezone
  change won't affect it.
* Return sensible value in case when the deadline has just
  expired and the suspension itself hasn't been enacted.
  Previously the deadline expiration wouldn't be reflected until
  mAppsSuspended gets updated after all apps are suspended.
* Update deadline on time changes. This makes it react to time
  changes via adb.
* Additional debug logging to investigate further if the issue
  persists.

Bug: 155878352
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I6549f76584121df200ace811285e7a358f262869
2020-05-11 17:09:14 +01:00
Diego Vela
458938578f Merge "Fix resize info activity not showing in some cases" into rvc-dev 2020-05-11 15:54:25 +00:00
Adrian Roos
e05d29e383 InsetsSourceProvider: Fix serverVisible update order in onPostLayout
Fixes an issue where serverVisible was only updated after updateFrames, but
updating the frames depends on the server visibility being correct since [1].

Also addresses an issue in the test fixture which prevented this regression
from being caught: the server visibility is now set by onPostLayout, instead
of onSetup, to mirror how the server visibility would be set at runtime.

[1]: Id2c482e112c1d73cf7d5b3ba5e1a2d5775f47298

Fixes: 156226586
Test: atest ScreenDecorWindowTests InsetsSourceProviderTest
Change-Id: Id90e6315e9fe230307929a8d992a76a5dae1107c
2020-05-11 17:11:00 +02:00
TreeHugger Robot
39e2c4839d Merge "Remove FlakyTest for testTaskChangeCallBacks" into rvc-dev am: 241f65ced5
Change-Id: If3c7f55a6b7fa11ba6231be5490566cf5208592b
2020-05-11 10:12:22 +00:00
Yunfan Chen
a890058cd1 Remove FlakyTest for testTaskChangeCallBacks
The test is no longer flaky.

Test: atest TaskStackChangedListenerTest#testTaskChangeCallBacks
Bug: 153707978
Change-Id: I4ca0c15d84728359357e2a42efdb90e06999db68
2020-05-11 17:07:21 +09:00
Riddle Hsu
3074ecc65a Merge "Clean up unnecessary lock of WmTests" into rvc-dev am: 53ed707827
Change-Id: I8b8fdcf602a7b7eb092e5ee53238c537157f4c5f
2020-05-11 05:10:24 +00:00