This unblocks dogfooding of go/image-aware-sharesheet. The feature is currently experimental, so the change will be rolled back if it doesn't graduate to production before R is cut (tracked in b/143339485).
Bug: 147206065
Test: dumpsys package
Change-Id: If960a412cb5f603348e99b1878897147caf3a1f5
Pipe the windowToken of the window requesting hideSoftInput just like we
did it for showSoftInput [1].
This calls hideInsets on the correct display when control target is
different from IME target e.g. ActivityView.
Also hideInsets should be called on InsetsControlTarget instead which was
originally attempted in [2]
[1]: Ia49e23dd077d264a58d28a7b8acffde54b7db187
[2]: I7133e151a1037c42b275b97857936437a7a6725f
Bug: 149870112
Bug: 133381284
Test: Manually using steps mentioned in bug.
Change-Id: Ia596a392eb73ae46debd097151c8c9a7edd59833
If an app is bound with WPRI, it's expected to be responsive
to communication from other apps even though it could be in
the cached state. In this case, freezing an app that is bound via
a WPRI binding will cause some other app to hang because it will
not receive a message from those apps. As a result, don't freeze
these apps.
Test: webview-using apps work reliably when freezer is enabled
Bug: 150114383
Change-Id: I72f71bbe3dc54ed0c274d518250ac9d00310c2d5
Need finer grained timestamp when looking at process exit information
Test: adb shell dumpsys activity exit-info
Bug: 150324813
Change-Id: Ia7b2521694cb874096cebbe1bcfe7c62864d2369
Windows with FLAG_NOT_FOCUSABLE can not be IME target unless alpha is
zero (i.e. app is using transparent window to detect IME for legacy
reasons).
Going forward we can improve this with the todo already mentioned in the
code block.
Bug: 145812508
Fix: 149899590
Test: Manually verified using steps in bug.
Merged-In: I0e7db484dd4f9b584998b9f922fd46030fb6fb72
Change-Id: I0e7db484dd4f9b584998b9f922fd46030fb6fb72
(cherry picked from commit f3a2b52e16)
There's some weird state where if persist.sys.usb.config=none,adb, then
adbd won't get started. Give back adbd start permissions to
UsbDeviceManager to see if that fixes the issue.
Bug: 150130503
Bug: 150116813
Test: adb shell su 0 setprop persist.sys.usb.config none,adb; adb reboot
adb should be online after.
Change-Id: I36c6ef4b20d58570a2d51ed70088ae5c54d6687d
Exempt-From-Owner-Approval: Fix adbd offline failure
(cherry picked from commit 7a3800993d)
Currently we read it at the start and cache it. This will cause any change in
settings to have effect only after restart. This is probably not what we want.
Bug: 150220476
Test: atest AppIntegrityManagerServiceImplTest
Change-Id: Icf4fc0e83e3563544b022c722e893a98f3512f25
Previously we only have speical treatment for
"com.google.android.packageinstaller". On non-GMS devices, it is
"com.android.packageinstaller".
Bug: 150220594
Test: atest AppIntegrityManagerServiceImplTest
Change-Id: I0d2c49b1e852fbc08975242b4be75d36bdb3087d
(cherry picked from commit 3404599294)
test.
So the instrumentation can have the same permssion as app and it can
skip the FGS background start while-in-use restriction.
Also reuse the ProcessRecord.mAllowBackgroundActivityStartsTokens flag.
Bug: 136219221
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java
Change-Id: I7d8708945ffe79b83825f8edb688078706c46770
(cherry picked from commit 5a5daafbca)
When split-screen minimizes, it should pause whatever is
in the minimized tile.
Bug: 133381284
Test: updated focusability test and existing tests pass.
Also manually open split minimized and check that
the primary stack is PAUSED.
Change-Id: I91cd6634f7078a3007d80bb924de508869b6a2d6
Created a SurfaceFreezer class which lives in WindowContainer
and manages/will-manage per-container freezing (snapshots).
This replaces the one-off change transition code.
Change Transitions used to create its own temporary leash
on initialization and that leash would be replaced/cleaned-up
as soon as the animation leash was created.
Now, the SurfaceFreezer creates the animation leash immediately
and SurfaceAnimator can take a SurfaceFreezer instance when it
starts an animation. At this point it will take the leash that
was already created by the freezer and use that. This removes
the messy reparenting/cleanup.
To deal with this, though, leash callbacks into Animatable
needed an extra stage: onLeashAnimationStarting. This is called
when SurfaceAnimatior is actually starting to animate the leash.
Next, DC.mChangingApps was converted to list of WindowContainers
rather than ActivityRecords. Some of the existing change code was
cleaned up (ie. there was some visibility stuff that doesn't make
sense because changing apps are visible->visible) and some of the
Activity-specific functions were generalized. For now, there are
a couple things that use the top-activity for changing Tasks.
The result of this means that windowing-mode change transition can
now fully live at the Task level. This also should allow freezing
at any hierarchy level which enables app-freezes that don't freeze
the whole screen and potentially mixed seamless/snapshot-based
rotations.
Bug: 149490428
Test: existing tests pass. Manually open app in freeform and
maximize/restore it.
Change-Id: Ib32524ebbbb084a98442d3d035897306a11ee6c2
(cherry picked from commit e55b9e0f9d)
Any exception here (e.g., NPE) will crash the entire system process.
Bug: 150217444
Test: atest AppIntegrityManagerServiceImplTest
Change-Id: I86eaa0bf7cb9d39fb23ee6aa71e80547bb95cc7e
(cherry picked from commit 1787f31065)
statsd logs when an sensitive appop is accessed while a foreground
service is held. These appops include
OP_FINE_LOCATION
OP_COARSE_LOCATION
OP_RECORD_AUDIO
OP_CAMERA
It logs the number of times each of these appops is requested per session
during which the uid holds any foreground service.
Appops requested while the app's process state is TOP are ignored.
Also, the pre-existing ForegroundServiceStateChanged atom has an
additional field that logs whether the fgs is considered 'in-use' in the
context of being allowed while-in-use permissions.
Bug: 149497535
Test: atest UidAtomTests#testForegroundServiceState UidAtomTests#testForegroundServiceAccessAppOp
Test: manually monitor: adb shell cmd stats print-logs && adb logcat -v uid -s statsd | grep "statsd : {" | egrep '\((60|256)\)'
Change-Id: I991a427dc2ab00399188b10b266ab2d9aa92696d
Merged-In: I991a427dc2ab00399188b10b266ab2d9aa92696d
(cherry picked from commit 0c8637c067)
When permission is granted to another app via URI, we implicitly grant
visibility to that app of the app ID that that URI resolves to.
Test: atest AppSecurityTests
Fixes: 149781706
Fixes: 145677500
Exempt-From-Owner-Approval: Owner approved prior to cherry-pick
Change-Id: I7c8967a4464fd821e4f95d8eb6c0bcfadadb912e