Fixes an issue where a barrier is set on a layer that will not
submit a buffer and transactions will get queued up causing
the system to eventually watchdog.
Fixes: 150578848
Test: Run manual repro steps in bug
Test: go/wm-smoke
Change-Id: Icba60e60fa9e62cca2fb3ff06d73f1975485a91d
If the notif is unable to present as a bubble:
- set the record#canBubble value to false
- null out bubble metadata if present (we show bubble
button if there is metadata, so shouldn't show it
if it can't present for some reason)
Because bubble metadata is now null'd out we don't have
the shortcutId to check / update the tracked shortcut
list, so instead if it's null check for that entry in
the list and remove it. Also fixes one spot where we
weren't unregistering the listener before and adds a
test for it.
Test: atest ShortcutHelperTest BubbleExtractorTest NotificationManagerServiceTest
Bug: 152883583
Change-Id: I29e993c01a8fb9fcdf2386b18a94adc712fe101f
When we set the buffer size from relayout window, there is a race
condition where the client may then submit its first buffer but the
transaction hasnt applied yet on the SF side and so the buffer is
rejected. Setting a defualt size when creating fixes this. Luckily
SurfaceControlViewHost size is known at add time, since we force the
window size based on the values passed in to the SurfaceControlViewHost API.
Bug: 157153874
Test: Existing tests pass
Change-Id: I2566844aea81df92f1694f43254a480fc3b3c019
We need to acquire the lock in removeShellRoot because we may
end up calling it from a binder thread.
Bug: 154486882
Test: Existing tests pass
Change-Id: I59bfd521a04f81590c403025c729729438d0d841
UidRecord.
for example,
adb shell dumpsys activity -a | grep *APP* | grep quicksearchbox
*APP* UID 10148 ProcessRecord{a86bfc8 19343:com.google.android.googlequicksearchbox:search/u0a148}
*APP* UID 10148 ProcessRecord{8932590 20318:com.google.android.googlequicksearchbox:assistant/u0a148}
*APP* UID 10148 ProcessRecord{7458b77 19013:com.google.android.googlequicksearchbox:interactor/u0a148}
UID 10148 has three ProcessRecord.
After uidRec.reset(), for uidRec that has multiple processes(ProcessRecord),
We need apply all ProcessRecord into UidRecord, otherwise, the
UidRecord's proc state and capability are wrong.
Bug: 157269041, 152709842
Test: Use the reproduce step in b/152709842, squeeze phone and talk to
Assistant.
Change-Id: Id46dbd4f428968fb2029255fbcf61bba328b582c
We need to always reportResized if using blastSync since the window
waiting on a finishDrawing from the client. Therefore, always add the
window to the resizing list even if bounds have not changed.
Test: WindowStateTests#testRequestResizeForBlastSync
Bug: 153579514
Change-Id: I87b459d95fac315b9a25f2d8e989fe3aaf0c0c85
This change moves unprotected access of a setting's pkg field to take
place after an existing null check.
Test: atest AppEnumerationTests
Fixes: 157298411
Change-Id: I49c0cb0d08dd09cabd271cf195a8eff71a98083c
This is only necessary when learning the NAT64 prefix from the
RA, because if the NAT64 prefix is learned from DNS, the DNS
resolver already knows the prefix and automatically enables
DNS64 synthesis.
The DNS resolver needs to be informed of the prefix any time
clat is running on a prefix learned from an RA. This is simple to
implement: just set the prefix when starting clat if prefix
discovery is not running, and clear the prefix when stopping clat
if prefix discovery was not running. This ensures that the prefix
is cleared iff it was set.
Bug: 156914456
Test: new unit test coverage
Original-Change: https://android-review.googlesource.com/1315578
Merged-In: If8ad2d30712a6df3e207c8d3e8a129705242191e
Change-Id: If8ad2d30712a6df3e207c8d3e8a129705242191e
DisplayContent#ignoreRotationForApps does not mean the display
cannot rotate. It means that the display can rotate without
considering the orientation requested by application. Currently
the case is that the aspect ratio of display is close to square.
Originally if the close-to-square display is rotated, an activity
with fixed aspect ratio will still use non-rotated bounds that
causes unexpected scaling. This change makes the case calculate
the bounds by current rotation.
Fixes: 156543028
Test: SizeCompatTests#testFixedAspectRatioBoundsWithDecorInSquareDisplay
Change-Id: Id22522f9a142806a922f643f4802971df302dadb
Test: make, flash, let device go to sleep due to keycode_power and
energy saver mode, verify that <Standby> is only sent when mIsActiveSource is true.
Bug: 155228844
Change-Id: Ie62d60e8c4fa573aac6c08a4c1093d5f1a52d7f3
When quick switch a delayed task, before onTaskAppeared called,
if the user holds gesture on nav bar, TRANSIT_WALLPAPER_OPEN from closing
app happens will cancel recents animation when
WC#applyAnimationUnchecked, and that will cause the black screen if the
delayed task not yet drawn and there is no recents task snapshot on top.
Since cancelling recents animation during quick switching doesn't make
sense, to fix that, we should check the animation task target if is
still controlled by recents animation, if so, we should not cancel it.
Also, make sure if the appeared task has already been in task target list,
(i.e. task A appreared, quick switch to task B, before task B appeared,
quick switch back to task A) if so, we don't need to callback task
appeared again.
Fix: 156670249
Test: manual as issue test steps.
Change-Id: I303403d63c91c08fabcb8c5b1b1aac42c4ec65db
Previously CL[1] used display#ensureActivitiesVisible instead of
stack#ensureActivitiesVisible, and it caused recursive calls on
ensureActivitiesVisible in a very hidden way. A possible scenario
is when an activity paused and AM tried to resume another activity
which did not support multi-resume.
[1]: Id8253eb97581a9dd52ab748117d9cd4cc63a206d
fixes: 156189923
Test: atest DisplayContentTests#testEnsureActivitiesVisibleNotRecursive
Change-Id: Iba2a052e4a1d91edfc6fa80954a730ad5ca3ff0d
The original code for translating volume key presses into CEC
commands was sending the equivalent of a key up / key down for
each call to adjustSuggestedStreamVolume. This behavior caused
CEC commands to pile up in HdmiControlService, and a repeated
key press (user keeping finger on volume button on remote) would
cause volume to still change on the CEC device handling volume
even after the key was released.
The fix consists in changing how PhoneWindowManager communicates
with AudioService, by passing the key event directly, so AudioService
can communicate the key up / key down information to the CEC
library, which already deals with repeated commands on the CEC bus.
Bug: 137311120
Test: connect DUT to CEC TV or receiver capable of handling vol cmds,
keep pressing on vol key, verify releasing key stops volume
changes on TV/receiver.
Change-Id: I7a75af651b6b424129515a8991b5afb15c62dba3
Merged-In: I7a75af651b6b424129515a8991b5afb15c62dba3
(cherry picked from commit 12ba113894ec8ad7c24913a0a09ea70047d25353)
(cherry picked from commit 7e58c9145d71ba92053ad6629f910456566cfea9)
Illegal state warning logs were able to observe on normal
activity starts flow.
Also should only returning the activity if it is the descendant
of this task.
Bug: 156882835
Test: atest TaskTests
Change-Id: Ia44bbbd8254e3f05b440153c180a3317e4d79209
UidAtomTests:testAppOps is a test class and test method of
CtsStatsdHostTestCases. To run this in Test Mapping, it should
specify CtsStatsdHostTestCases. as the name in TEST_MAPPING file,
and android.cts.statsd.atom.UidAtomTests as the options.
Bug: 155714228
Test: presubmit test.
Change-Id: I7df08ae811425020ebbeae6a8e9f1317065c00c9
The app-op wasn't required back then, and granting it shouldn't change
the filesystem view.
Bug: 150819885
Test: atest CtsNoPermissiontestCases25 (still fails, but for a different
reason now).
Change-Id: Id505013233c44ad624d3a4b929bbd3c36ecfd8ce
Currently when a package is installed / updated in a sharedUid the
signatures for the sharedUid are not updated unless the new package
adds a new signer to the lineage; in this case the new lineage is
assigned to the sharedUid without consideration for the existing
lineage. This leads to the following problems:
1. If the current sharedUid lineage is A -> B and the new package has
lineage B -> C then this is used for the sharedUid and A is lost from
the lineage.
2. If the new lineage revokes one or more capabilities from a previous
signer in the lineage these updated capabilities are ignored unless the
lineage added a new signer as well.
3. If the new lineage revokes the sharedUid capability from a previous
signing key in the lineage and another app is installed as part of the
sharedUid and signed with that key the new app's installation is allowed
to proceed.
4. If only a single app is installed as part of a sharedUid, and that
app is updated with a rotated key and a lineage that revokes the
previous signing key's sharedUid capability the update is blocked.
5. If an app is installed as part of the sharedUid and has a diverged
signer in the lineage (ie sharedUid lineage is Y -> A -> B and new app
lineage is Z -> A -> B -> C) the installation is allowed and Y is lost
from the lineage.
Problems 1 and 2 are addressed with the new SigningDetails
mergeLineageWith method that merges common signers between two lineages
and also updates their capabilities to the most restrictive between
the two lineages (capabilities are anded together). Problems 3 is
addressed by checking the signatures of each of the packages in the
sharedUid for any signed with an ancestor for which the sharedUid
capability may have been revoked. Problem 4 is addressed by checking
if the package being updated is the only one in the sharedUid; if so
the update to the new lineage is allowed to proceed. Problem 5 is
addressed by verifying the new app's lineage is the same, a subset, or
a superset of the other.
Bug: 152046935
Test: atest PkgInstallSignatureVerificationTest
Test: atest SigningDetailsTest
Test: atest PackageManagerTests
Test: atest PackageManagerTest
Change-Id: I420c309f522bb47b65ca40ee848024c85cd5804d
If a top-fullscreen-app window is hiding status bar but the focus is
changed to a non-fullscreen window, we let the top-fullscreen-app window
keep controlling status bar. This CL makes the logic compatible with the
legacy insets mode.
Fix: 156322689
Test: WindowInsetsControllerTests
Change-Id: I74387c2c794c8a5a7056eea3ba4ec7257c66652a