Commit Graph

62528 Commits

Author SHA1 Message Date
Katsiaryna Naliuka
7bee686ef7 Merge "Grant storage permission to the content capture service." into rvc-dev 2020-02-27 16:39:00 +00:00
Anna Trostanetski
6d1c0c7d90 Merge "Cache binder calls in CompatChanges" into rvc-dev 2020-02-27 14:58:13 +00:00
TreeHugger Robot
9651ab2de4 Merge "Fix a bug with the settings for skipping integrity check for verifiers." into rvc-dev 2020-02-27 12:09:51 +00:00
TreeHugger Robot
cadf55a3e8 Merge "Add "com.android.packageinstaller" as recognized installer." into rvc-dev 2020-02-27 12:09:22 +00:00
Katsiaryna Naliuka
bc05190cd2 Grant storage permission to the content capture service.
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
2020-02-27 11:09:39 +00:00
Taran Singh
73b1d16d28 Merge "Pipe windowToken for hideSoftInput" into rvc-dev 2020-02-27 07:14:04 +00:00
Tim Murray
945984e265 Merge "freezer: don't freeze WPRI-bound apps" into rvc-dev 2020-02-27 06:44:36 +00:00
TreeHugger Robot
7843e91e80 Merge "Increase activity exit-info timestamp resolution" into rvc-dev 2020-02-27 05:21:46 +00:00
Tarandeep Singh
4fe5b654a1 Pipe windowToken for hideSoftInput
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
2020-02-27 04:13:25 +00:00
Automerger Merge Worker
8a1c944d0d Allow settingIgnored for DBH request if inEmergency am: 97e162d605
Change-Id: I12cbf0e098f599169392fb4ae7c725d5052b674e
2020-02-27 03:35:09 +00:00
TreeHugger Robot
13ecf63ba4 Merge "Add API constraints to ScheduledJobStateChanged atom" into rvc-dev 2020-02-27 02:57:01 +00:00
TreeHugger Robot
bb4af580d1 Merge "Fix race condition while WallpaperMS rebinding service." into rvc-dev 2020-02-27 01:14:24 +00:00
Daniel Chapin
e44eb5b955 Merge "Revert "Avoid creating new instance on top when started for resu..."" into rvc-dev 2020-02-27 00:48:31 +00:00
Tim Murray
7b4b26bab5 freezer: don't freeze WPRI-bound apps
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
2020-02-26 16:44:53 -08:00
Suprabh Shukla
9f186350a0 Increase activity exit-info timestamp resolution
Need finer grained timestamp when looking at process exit information

Test: adb shell dumpsys activity exit-info

Bug: 150324813
Change-Id: Ia7b2521694cb874096cebbe1bcfe7c62864d2369
2020-02-26 16:17:10 -08:00
Yu-Han Yang
97e162d605 Allow settingIgnored for DBH request if inEmergency
Bug: 150232136

Test: on device
Change-Id: Ia987418a591d716b787d406d725338a8563a55dd
2020-02-26 23:09:55 +00:00
Evan Rosky
149bbf89bc Merge "Clean-up old docked-stack implementation from WM" into rvc-dev 2020-02-26 21:47:57 +00:00
Evan Rosky
3abea008b1 Merge "Use hierarchy focusability to pause the minimized tile" into rvc-dev 2020-02-26 21:47:57 +00:00
Joshua Duong
e3fce1c7fe Merge "Allow UsbDeviceManager to start adbd again." into rvc-dev 2020-02-26 21:19:04 +00:00
TreeHugger Robot
7afd9b9af7 Merge "Pass START_ACTIVITIES_FROM_BACKGROUND permission to instrumentation test." into rvc-dev 2020-02-26 19:46:06 +00:00
Taran Singh
adbd87e55b Merge "Fix FLAG_NOT_FOCUSABLE ime target" into rvc-dev 2020-02-26 18:18:51 +00:00
Tarandeep Singh
f5816e7d30 Fix FLAG_NOT_FOCUSABLE ime target
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)
2020-02-26 18:18:03 +00:00
Joshua Duong
ac29885a0e Allow UsbDeviceManager to start adbd again.
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)
2020-02-26 16:26:39 +00:00
Song Pan
d39ec80523 Fix a bug with the settings for skipping integrity check for verifiers.
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
2020-02-26 15:03:27 +00:00
Song Pan
8a94c28051 Add "com.android.packageinstaller" as recognized installer.
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)
2020-02-26 15:01:18 +00:00
Hui Yu
4cda1e515c Pass START_ACTIVITIES_FROM_BACKGROUND permission to instrumentation
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)
2020-02-26 14:59:10 +00:00
Julia Reynolds
d61bdf17dd Update shortcut queries
- Include cached shortcuts also
- Require long lived flag

Test: atest
Fixes: 149925743
Change-Id: If3e50d2ffdc82308a503bce13fc28443fb77a6b6
2020-02-26 12:41:19 +00:00
TreeHugger Robot
44a56296cb Merge "Exempt callingUid that has START_ACTIVITIES_FROM_BACKGROUND permission." into rvc-dev 2020-02-26 12:22:24 +00:00
Chilun Huang
fb715c045f Merge "Use packageName instead of specific secondary launcher activity" into rvc-dev 2020-02-26 11:25:11 +00:00
Makoto Onuki
5f865b07fe Merge "Make sure always reuse ApplicationInfo when generating ProviderInfo" into rvc-dev 2020-02-26 08:46:22 +00:00
TreeHugger Robot
c11267f389 Merge "DisplayModeDirector: initialize min/max refresh rate" into rvc-dev 2020-02-26 07:49:47 +00:00
Evan Rosky
66279fe163 Merge "Generalize change transition into WindowContainer" into rvc-dev 2020-02-26 01:43:06 +00:00
Ady Abraham
f30470f39e DisplayModeDirector: initialize min/max refresh rate
Added a missing initialization of min/max refresh rate.

Bug: 150245531
Test: atest DisplayModeDirectorTest
Change-Id: Ic682a26811bda81eddb775aaf9b2f1d73f419043
2020-02-25 16:11:08 -08:00
TreeHugger Robot
34127ce76a Merge "Catch all exception from statusReceiver.sendIntent." into rvc-dev 2020-02-25 23:57:51 +00:00
Kweku Adams
969e1e2759 Merge "Allow location when Car mode is active." into rvc-dev 2020-02-25 21:52:27 +00:00
Evan Rosky
73a7fe9479 Clean-up old docked-stack implementation from WM
Bug: 133381284
Test: Existing tests pass. Manually use sysui
Change-Id: I44155d74df1489fa391c60a05d1f8098986cefb7
2020-02-25 21:13:16 +00:00
Evan Rosky
e84ef9ea64 Use hierarchy focusability to pause the minimized tile
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
2020-02-25 20:11:25 +00:00
TreeHugger Robot
10398d29f3 Merge "Atom for when fgs accesses appop" into rvc-dev 2020-02-25 19:59:16 +00:00
Evan Rosky
55bddd83ea Generalize change transition into WindowContainer
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)
2020-02-25 11:51:36 -08:00
TreeHugger Robot
0253cc8f2f Merge changes from topics "input_events_id", "wire_input_event_id" into rvc-dev
* changes:
  Send input event ID in InputEventSender.
  Add ID to InputEvent.
2020-02-25 19:20:17 +00:00
Song Pan
85bdb47bcb Catch all exception from statusReceiver.sendIntent.
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)
2020-02-25 18:50:54 +00:00
Hui Yu
5c8ceade92 Exempt callingUid that has START_ACTIVITIES_FROM_BACKGROUND
permission.

From background FGS while-in-use permission restriction.

Bug: 149835015, 136219221
Test: adb shell dumpsys activity -a
Change-Id: I1a23689a2939d15101a1d8bb21a85fc9a9cca31f
(cherry picked from commit d731201cac)
2020-02-25 18:40:45 +00:00
Peter Kalauskas
81a320279e Merge changes from topic "new-task-snapshots-rvc-dev" into rvc-dev
* changes:
  Disable reduced scale if reduced scale config is 0
  Store original task width and height instead of scale
2020-02-25 18:29:50 +00:00
Chavi Weingarten
87293fda8d Merge "Fix Display SurfaceControl leak" into rvc-dev 2020-02-25 18:11:54 +00:00
Santhosh Thangaraj
2ae4ec02f9 Merge "Fix the delay time for Assistant" into rvc-dev 2020-02-25 17:26:10 +00:00
Adam Bookatz
38767932a2 Atom for when fgs accesses appop
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)
2020-02-25 17:09:48 +00:00
Patrick Baumann
cb2d2ec786 Merge "Grants visibility on uri permission grant" into rvc-dev 2020-02-25 15:52:29 +00:00
Patrick Baumann
710d720db7 Grants visibility on uri permission grant
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
2020-02-25 15:48:30 +00:00
Makoto Onuki
db91e18075 Make sure always reuse ApplicationInfo when generating ProviderInfo
Bug: 148588589
Test: atest CtsContentTestCases (modulo preexisting failures)
Change-Id: If81f3b343fb018ba52127d038d02e62ca516c18f
2020-02-25 15:18:34 +00:00
Makoto Onuki
9577cd78ff Merge "Squash same ApplicationInfo's in Parcel" into rvc-dev 2020-02-25 15:17:14 +00:00