Commit Graph

18354 Commits

Author SHA1 Message Date
Adam Bookatz
d0b3845cad Merge "Listener to watch op starts" into rvc-dev am: 316bc6ff66 am: 2d3310ec59 am: 911b6104c8 am: fa8147715d
Change-Id: Ief89629b6100e140d0d081f401a78c4c8ce40baf
2020-05-05 01:53:29 +00:00
Adam Bookatz
911b6104c8 Merge "Listener to watch op starts" into rvc-dev am: 316bc6ff66 am: 2d3310ec59
Change-Id: I81143dc94dd471f4fdc32ad5881d3416ccd267e4
2020-05-05 01:21:53 +00:00
Adam Bookatz
182862e595 Listener to watch op starts
Currently, there is
onOpNoted - tells listeners that noteOp has occurred
onOpActiveChanged - tells listeners that an op's 'active' state has
changed, i.e. that a successfull startOp or stopOp has happened

There was, however, no way of telling a listener that a startOp has
happened (regardless of whether it was successful). This cl introduces
it, via a OnOpStartedListener.

This is required by the ForegroundServiceAppOpSessionEnded atom,
which counts the number of accepted vs. rejected attempts, and
therefore also needs to know when a rejected start happened.

This cl also contains some cosmetic moving of code so that
startOperation() and noteOperationImpl() are almost
exactly parallel.

* Also *
This cl fixes a bug I discovered in stopWatchingNoted, in which
the callback wasn't fully removed. Consequently, if a callback
was unregistered and then re-registered, the re-registration would
mistakingly be ignored (in direct contradiction to the javadoc).

Test: atest UidAtomTests#testForegroundServiceAccessAppOp
Test: atest AppOpsStartedWatcherTest AppOpsActiveWatcherTest AppOpsNotedWatcherTest
Test: manually monitor: adb shell cmd stats print-logs && adb logcat -v uid -s statsd | grep "statsd  : {" | egrep '\(256\)'
Bug: 152800926
Change-Id: Icdb9edf6b2b7c5807b339c1aabb32e882190b071
2020-05-04 21:59:29 +00:00
Garfield Tan
c461dd36c1 Merge changes I702d89c9,Id7bfc3e6 into rvc-dev am: abe5a4f3f5 am: 9c23045bbb am: f0905bc532 am: af058c74e4
Change-Id: I9750bd5a7d61e0b89fd241c2b1e149e113f5c2bb
2020-05-02 01:19:18 +00:00
Andrew Sapperstein
26410036c0 Merge changes from topic "cherrypick-ctor-refs-03y8i58ine" into rvc-dev am: 975ca816ec am: 6fd486eeec
Change-Id: I1d15205acdab14710e00196dd126fb46187cc0bb
2020-05-02 00:46:01 +00:00
Andrew Sapperstein
e6790083a4 Fix broken @see tags in public documentation. am: 8fe35e5f21 am: 1ba3a59941
Change-Id: I889d786482befe047f9666f28eb882a7dea3148b
2020-05-02 00:45:55 +00:00
Garfield Tan
f0905bc532 Merge changes I702d89c9,Id7bfc3e6 into rvc-dev am: abe5a4f3f5 am: 9c23045bbb
Change-Id: Ic6662252b07b7df86a322db8f11d6d0babc05330
2020-05-02 00:45:12 +00:00
Andrew Sapperstein
1ba3a59941 Fix broken @see tags in public documentation. am: 8fe35e5f21
Change-Id: Ie98055acbc2afeb2c0a8f578161bde02d9dc615d
2020-05-02 00:29:34 +00:00
Andrew Sapperstein
975ca816ec Merge changes from topic "cherrypick-ctor-refs-03y8i58ine" into rvc-dev
* changes:
  Update inner class constructor refs to use proper syntax.
  Fix broken @see tags in public documentation.
2020-05-02 00:21:33 +00:00
Garfield Tan
abe5a4f3f5 Merge changes I702d89c9,Id7bfc3e6 into rvc-dev
* changes:
  Remove TaskRecordFactory.
  Notify when task changes requested orientation.
2020-05-02 00:10:29 +00:00
Darryl Johnson
846899c23f Merge "Don't override activity display adjustments with app config" into rvc-dev am: ceb2befc1b am: c7a318285d am: 9a8414e36b am: 0ddc6d6d4d
Change-Id: I946a878e36af79cd4849865af380462eaeedef06
2020-05-02 00:05:49 +00:00
Darryl Johnson
9a8414e36b Merge "Don't override activity display adjustments with app config" into rvc-dev am: ceb2befc1b am: c7a318285d
Change-Id: Ib84b70f5ecf47c3d5d269ba9d83a73063ab2ecf4
2020-05-01 23:27:14 +00:00
Darryl Johnson
ceb2befc1b Merge "Don't override activity display adjustments with app config" into rvc-dev 2020-05-01 23:05:10 +00:00
Garfield Tan
afa0de8a91 Notify when task changes requested orientation.
This allows listener know task's orientation request change before
handling display rotation through IDisplayWindowRotationController if
they can register a local TaskStackListener.

Bug: 150409355
Test: atest WmTests:TaskStackChangedListenerTest#testNotifyTaskRequestedOrientationChanged
Change-Id: Id7bfc3e63329ce26d454b7e9c143e084e04dd365
2020-05-01 12:52:46 -07:00
Andrew Sapperstein
88d565e7e7 Update inner class constructor refs to use proper syntax.
Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
Merged-In: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
(cherry picked from commit 4c4aa41272)
2020-05-01 18:33:15 +00:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
Andrew Sapperstein
a296471054 Merge "Update inner class constructor refs to use proper syntax." 2020-05-01 18:00:05 +00:00
Dianne Hackborn
7d681bec7c Merge "Fix #155437855: "dumpsys activity" package filtering doesn't filter everything" into rvc-dev am: f55fbde1bd am: 0dc0c1971a am: 77afbab0f5 am: 5f21e77fbf
Change-Id: I40b1e5f5b4aa0809db242a3bff828d386dc7884e
2020-05-01 16:49:22 +00:00
Dianne Hackborn
0dc0c1971a Merge "Fix #155437855: "dumpsys activity" package filtering doesn't filter everything" into rvc-dev am: f55fbde1bd
Change-Id: I1cd032b49e67a291dac2b3eb1edac881229e3082
2020-05-01 16:03:51 +00:00
Dianne Hackborn
f55fbde1bd Merge "Fix #155437855: "dumpsys activity" package filtering doesn't filter everything" into rvc-dev 2020-05-01 15:49:51 +00:00
Abodunrinwa Toki
143b8a9762 Merge "Rewrite Icons from the TCS." into rvc-dev am: 1cf3ce8fde am: f58bd41b0e am: 5eb7265785 am: e076eb2584
Change-Id: I1781f9427954eebd5226ae7cea3170c96fe4de5c
2020-05-01 11:53:18 +00:00
Abodunrinwa Toki
5eb7265785 Merge "Rewrite Icons from the TCS." into rvc-dev am: 1cf3ce8fde am: f58bd41b0e
Change-Id: Id6192fc8dd949482fd3dc76a19a0a6aa40c39432
2020-05-01 11:18:27 +00:00
Abodunrinwa Toki
1b15228e8a Merge "Rewrite Icons from the TCS." into rvc-dev am: 1cf3ce8fde
Change-Id: If75f84e06e5be0650e82ce07bc58a0d5c09b7dfe
2020-05-01 11:12:54 +00:00
Abodunrinwa Toki
1cf3ce8fde Merge "Rewrite Icons from the TCS." into rvc-dev 2020-05-01 10:52:43 +00:00
TreeHugger Robot
91d226868b Merge "Add the IME insets to virtual display for bubble" into rvc-dev am: 75c82108f6 am: 4fa0ef1238 am: 05c7a93791 am: 5c48aef6e9
Change-Id: I83da92d549759c48869f0f2c555e3196b137fe80
2020-05-01 04:52:40 +00:00
TreeHugger Robot
4fa0ef1238 Merge "Add the IME insets to virtual display for bubble" into rvc-dev am: 75c82108f6
Change-Id: Ic4d3d31a5e332ca31cf85d0da380da9f19961810
2020-05-01 04:14:30 +00:00
TreeHugger Robot
75c82108f6 Merge "Add the IME insets to virtual display for bubble" into rvc-dev 2020-05-01 03:58:14 +00:00
Hongwei Wang
c3f2b2e418 Merge "Move PIP/MW mode callbacks to be on the client side" into rvc-dev am: 28c136e1cb am: 33e9c04263 am: 2cf2b18cc2 am: 512ab10e98
Change-Id: Ic905afba9ce3abe5bb4d114219b315a5605eb384
2020-05-01 00:51:44 +00:00
Dianne Hackborn
9106f2a73d Fix #155437855: "dumpsys activity" package filtering doesn't filter everything
Clean up various code paths to correctly use the "packageName" option to
limit its output to only information about that package.

Also do a little re-arranging of the output to cleanup a bit recent
stuff that was added, so the end of the output is still the important
high-level summary of process states.

Bug: 155437855
Test: manually inspected various "dumpsys activity" output.
Change-Id: I2ebe6f7ab3d433281993eb3959d375e2e53e0df9
2020-04-30 17:29:16 -07:00
Andrew Sapperstein
6b1e3188a3 Merge "Fix broken @see tags in public documentation." 2020-05-01 00:27:47 +00:00
Hongwei Wang
2cf2b18cc2 Merge "Move PIP/MW mode callbacks to be on the client side" into rvc-dev am: 28c136e1cb am: 33e9c04263
Change-Id: Id7c50738ac561a8a716e0f53f10cbf430a889d73
2020-05-01 00:10:01 +00:00
Hongwei Wang
54b544b15f Merge "Move PIP/MW mode callbacks to be on the client side" into rvc-dev am: 28c136e1cb
Change-Id: I279cc746a099c9a35d88463105e8aaa5f0592707
2020-04-30 23:56:00 +00:00
Jake Wharton
eee5ad507a Merge "Revert "Add Activity non-config instance map-like API"" 2020-04-30 23:45:37 +00:00
Hongwei Wang
28c136e1cb Merge "Move PIP/MW mode callbacks to be on the client side" into rvc-dev 2020-04-30 23:38:56 +00:00
Mady Mellor
d4c987af00 Merge "Enable flagging shortcuts to launch properly in a bubble" into rvc-dev am: a0f44693f5 am: 706ab8953b am: 45da489dc9 am: a97502f416
Change-Id: If50d346e8d63b366d8c3f2d7f70260e950f2c3b6
2020-04-30 22:49:57 +00:00
Mady Mellor
45da489dc9 Merge "Enable flagging shortcuts to launch properly in a bubble" into rvc-dev am: a0f44693f5 am: 706ab8953b
Change-Id: I596a4d31d997462923f99358eea40894fbd9a42e
2020-04-30 22:17:29 +00:00
Mady Mellor
6be27c51db Merge "Enable flagging shortcuts to launch properly in a bubble" into rvc-dev am: a0f44693f5
Change-Id: If931d7a06b39434a53ff28b8707bb6097dd75e84
2020-04-30 22:03:16 +00:00
Mady Mellor
a0f44693f5 Merge "Enable flagging shortcuts to launch properly in a bubble" into rvc-dev 2020-04-30 21:52:11 +00:00
Darryl L Johnson
e810bc539e Don't override activity display adjustments with app config
When process configuration was applied on the client side it
accidentally applied an override to display adjustments in resources
for all ResourceImpl objects. This resulted in resources of
activities having incorrect display adjustments and reporting
incorrect display size.

This change fixes the issue by applying the activity's override
configuration on top of the app config before updating the
display adjustments.

Note: This is a slight revert/rework of Ib3ee007bc

Fixes: 148639826

Test: ActivityThreadTest#testHandleConfigurationChanged_DoesntOverrideActivityConfig
Change-Id: I08a5bc29443fbdefbca791240aeaff8f138b8756
2020-04-30 13:44:38 -07:00
Jake Wharton
d72728ff08 Revert "Add Activity non-config instance map-like API"
Revert "Tests for non-config instance map"

Revert submission 11077952-non-config-map

Reason for revert: API council would like to go straight to Jetpack
Reverted Changes:
Ib2484d433:Add Activity non-config instance map-like API
Ibc3daf82f:Tests for non-config instance map

Bug: 155401916
Change-Id: I9dd8226375e86d66b8cef3731642c0cf9f74434c
2020-04-30 18:58:01 +00:00
Hongwei Wang
5711b8fdaf Move PIP/MW mode callbacks to be on the client side
We now infer the PIP/MW mode change from the new configuration.
Note also that both
- Activity#isInPictureInPictureMode
- Activity#isInMultiWindowMode
infer the current state from the configuration rather than querying
against the WM.

Also in this CL:
- When in removePinnedStackInSurfaceTransaction, keep the pinned stack
hidden till the windowing mode is set to fullscreen, this is to surpress
the attempt to set the activities to be started in reparenting
- When in ActivityRecord#shouldBeVisible, should take account the force
hidden flag, which is not actually in use before

Bug: 144097203
Bug: 142282126
Bug: 138329093
Test: atest ActivityLifecyclePipTests \
            ActivityLifecycleSplitScreenTests \
            ActivityLifecycleTopResumedStateTests \
            PinnedStackTests \
            SplitScreenTests \
            ActivityTaskManagerServiceTests \
            RecentsAnimationTest \
            AssistantStackTests \
            StartActivityTests \
            ActivityVisibilityTests \
            MultiDisplaySecurityTests \
            MultiDisplaySystemDecorationTests
Change-Id: Ibe032b5e50ba5c6d6bc44ebb54d07ac974ebe656
2020-04-30 08:48:09 -07:00
Yunfan Chen
b83940c9e7 Add the IME insets to virtual display for bubble
This patch will add a fake IME window to virtual display when IME is
showing and covering a bubble window. Without the fake window, the
bubble will not receive the correct IME insets.

To do that, this patch:
1. Added an interface in ActivityView to get VirtualDisplay when needed,
   in order to create the display context.
2. Modify the visibility update. When the target is not a client
   controlled target, we ignore the client visibility. We also call
   visibility update when the control target updated.
3. With the modified infra, add the window with correct param and
   context.

Bug: 150780413
Test: atest WmTests:DisplayPolicyLayoutTests
Test: atest InsetsStateTest
Test: atest InsetsPolicyTest
Test: go/wm-smoke
Test: See reproduce steps in the bug

Change-Id: I52691b5c7f81261de580bb4fc762e88486e78141
2020-04-30 16:21:11 +09:00
Darryl Johnson
f53cc215cf Merge "Add test to ensure virtual display orientation doesn't change when device rotates." into rvc-dev am: 77fae23490 am: f0a128ba2b am: 909c1f0431 am: 4489b29e65
Change-Id: I9ca8632f7998acab4af843e661da30c5387eb883
2020-04-30 00:46:59 +00:00
Darryl Johnson
909c1f0431 Merge "Add test to ensure virtual display orientation doesn't change when device rotates." into rvc-dev am: 77fae23490 am: f0a128ba2b
Change-Id: I828e46db28febd6342c7fa7b7aac3ffe0f8b1a4b
2020-04-30 00:29:25 +00:00
Darryl Johnson
76b64efa38 Merge "Add test to ensure virtual display orientation doesn't change when device rotates." into rvc-dev am: 77fae23490
Change-Id: Ib14fb09532f4256d7ab5a2b8934b8af7b67d5ac8
2020-04-30 00:18:27 +00:00
Darryl Johnson
77fae23490 Merge "Add test to ensure virtual display orientation doesn't change when device rotates." into rvc-dev 2020-04-30 00:18:02 +00:00
Todd Kennedy
c83300ad84 Merge "Add documentation for OPSTR_LOADER_USAGE_STATS" into rvc-dev am: aeb383ec87 am: e770af5c14 am: 99208ce956 am: 05139a7fd7
Change-Id: I6a589b4f5902297cbf8f2a1c64b6fd080e82cba5
2020-04-29 23:04:58 +00:00
Todd Kennedy
99208ce956 Merge "Add documentation for OPSTR_LOADER_USAGE_STATS" into rvc-dev am: aeb383ec87 am: e770af5c14
Change-Id: I3f93446e1144d17f5f34dd0728cbd37dd20bb279
2020-04-29 22:35:10 +00:00
Todd Kennedy
6b653a348f Merge "Add documentation for OPSTR_LOADER_USAGE_STATS" into rvc-dev am: aeb383ec87
Change-Id: Ia6cd533255331dce5fa91058b9d9c8df6b562c4d
2020-04-29 22:35:08 +00:00
Todd Kennedy
aeb383ec87 Merge "Add documentation for OPSTR_LOADER_USAGE_STATS" into rvc-dev 2020-04-29 22:27:55 +00:00