Commit Graph

17744 Commits

Author SHA1 Message Date
Ryan Mitchell
ac009ade58 Merge "Synchronize before calling unstableRemoveIf" into rvc-dev am: ad5a070a87
Change-Id: I415b3511766737263102258000b4be147342171f
2020-03-30 15:49:03 +00:00
Ryan Mitchell
ad5a070a87 Merge "Synchronize before calling unstableRemoveIf" into rvc-dev 2020-03-30 15:44:00 +00:00
TreeHugger Robot
e528b63957 Merge "Remove the @hide from ContextImpl#bindServiceAsUser" into rvc-dev am: 99960a5f79
Change-Id: Ib08500fa9e663426ae118ceb2d59cb7678490c5e
2020-03-30 10:53:44 +00:00
Alex Kershaw
9a8bf9a7f9 Remove the @hide from ContextImpl#bindServiceAsUser
The method is already public in Context, but the @hide wasn't removed
from the javadoc of the subclass.

Fixes: 150123286
Test: m -j
Change-Id: I53f999f99d2ad64f930beedb262affffbe13764f
2020-03-29 15:07:23 +01:00
Hui Yu
b9bbcde222 Merge changes from topic "foregroundServiceType camera/microphone" into rvc-dev am: 5e089a4af5
Change-Id: I259b6e1547a31fcfbc72112511fadcd52c956754
2020-03-28 05:26:30 +00:00
Hui Yu
5e089a4af5 Merge changes from topic "foregroundServiceType camera/microphone" into rvc-dev
* changes:
  Turn on foregroundServiceType camera/microphone feature in enforcement mode.
  Exempt device owner uid from FGS BG restriction.
2020-03-28 05:14:47 +00:00
TreeHugger Robot
14faaa5790 Merge "Only runtime and appop perms need to be in RUNTIME_AND_APPOP_PERMISSIONS_OPS" into rvc-dev am: 03eb7a1bf2
Change-Id: Ie1ac35bdf9f0f34d0da9b89bfe3a5eccb63a1cb1
2020-03-28 02:59:12 +00:00
TreeHugger Robot
03eb7a1bf2 Merge "Only runtime and appop perms need to be in RUNTIME_AND_APPOP_PERMISSIONS_OPS" into rvc-dev 2020-03-28 02:49:48 +00:00
TreeHugger Robot
a17b77c14b Merge "Respect app-ops permission in FileIntegrityService" into rvc-dev am: 0e6240f8b9
Change-Id: I794029bf4ae9c4bb0fed47afbbb8100e9cc8de58
2020-03-28 00:00:49 +00:00
TreeHugger Robot
0e6240f8b9 Merge "Respect app-ops permission in FileIntegrityService" into rvc-dev 2020-03-27 23:52:59 +00:00
Chris Li
1ec1c6f420 Merge "Report incorrect context usage in ViewConfiguration" into rvc-dev am: c64d21d47a
Change-Id: I52468deb202f7254804f3a7733d20361c636f9c7
2020-03-27 20:31:25 +00:00
Chris Li
c64d21d47a Merge "Report incorrect context usage in ViewConfiguration" into rvc-dev 2020-03-27 20:19:15 +00:00
Hongwei Wang
90e8db2972 Merge "Start PiP dismiss from SysUI via TaskOrganizer" into rvc-dev am: 37c91d5ef5
Change-Id: Ib7263b33fac023197834b1c189d865329ebdae3d
2020-03-27 19:40:53 +00:00
Hongwei Wang
37c91d5ef5 Merge "Start PiP dismiss from SysUI via TaskOrganizer" into rvc-dev 2020-03-27 19:27:08 +00:00
Philip P. Moltmann
db4f83732e Only runtime and appop perms need to be in RUNTIME_AND_APPOP_PERMISSIONS_OPS
Test: TH
Bug: 146513245
Change-Id: I69d9154a32c36a31115570cd958aa338db64ea27
2020-03-27 12:10:04 -07:00
Victor Hsieh
b07f4854b5 Respect app-ops permission in FileIntegrityService
Previous permission doesn't consider REQUEST_INSTALL_PACKAGES permission
as an app-ops permission.

Bug: 152009905
Test: atest GtsPlayFsiTestCases
Test: remove appops setup from AndroidTest.xml, the same test failed
Change-Id: Icdbf6bb35fe146c5be8a97e29c4c554b3ce91b5d
2020-03-27 09:23:41 -07:00
Chris Li
bfe1b70fcd Report incorrect context usage in ViewConfiguration
Before, the documentation said that the passed context is an application context, which is incorrect to get the density, window metrics, and window manager. We should use visual context to get these instead.

Bug: 151474461
Test: StrictModeTest#testIncorrectContextUse_GetViewConfiguration
Change-Id: Iea28d727cafbb3ec8536742c6a0e594f73fe5a51
2020-03-26 22:09:28 -07:00
Winson Chung
f8d6b4b3b6 Merge "Skip excluded MW mode tasks from recents and running tasks" into rvc-dev am: fa6a50484b
Change-Id: I4a4cb4e44ea59d420f49b6fff173df38f5653615
2020-03-27 03:03:18 +00:00
Winson Chung
fa6a50484b Merge "Skip excluded MW mode tasks from recents and running tasks" into rvc-dev 2020-03-27 02:37:10 +00:00
Ryan Mitchell
c23b0165f8 Synchronize before calling unstableRemoveIf
The call to unstableRemoveIf should be synchronized on the
ResourcesManager instance since the collection belongs to the instance.

Also remove dead code from the loader refactor to prevent apps from
creating AssetManagers that return InputStreams instead of
AssetInputStreams.

Bug: 145510133
Test: boots
Change-Id: I50bcfc8e882f3d8a7827688e32f68790dd226801
2020-03-26 19:28:09 -07:00
Hui Yu
7cfe82b0ba Exempt device owner uid from FGS BG restriction.
Bug: 136219221
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java
Change-Id: Ic7c592d711e89fcea0ebd7ccc5e33512a0bf03dc
2020-03-26 16:07:42 -07:00
Ricardo Correa
535d528a35 Merge "Revert "Include an AppOp to allow dialer role app to record and play audio into calls"" into rvc-dev am: cc25d392fe
Change-Id: Ia603d14c71cb565a082f471a8b1c04a76a47f900
2020-03-26 22:25:06 +00:00
Ricardo Correa
cc25d392fe Merge "Revert "Include an AppOp to allow dialer role app to record and play audio into calls"" into rvc-dev 2020-03-26 22:23:54 +00:00
Ricardo Correa
acdc827501 Revert "Include an AppOp to allow dialer role app to record and play audio into calls"
This reverts commit e96b5668b3.

Reason for revert: Feature has been postponed
Bug: 151761909

Change-Id: I7db5fb79d52b3da33b84bb07d1f612be760299c2
2020-03-26 11:57:01 -07:00
Alex Johnston
36fdaed643 Merge "Make FRP APIs callable by Settings" into rvc-dev am: 7bd3e833ce
Change-Id: I20f4d085bdbf299526353ba8d595ae72ca8a8f27
2020-03-26 13:19:43 +00:00
Alex Johnston
7bd3e833ce Merge "Make FRP APIs callable by Settings" into rvc-dev 2020-03-26 12:58:48 +00:00
Charles Chen
f46d21bb0f Merge "Rename createBaseActivityResources to createBaseTokenResources" into rvc-dev am: 0cb6d3fd3d
Change-Id: Id06e5833d203df88550fe400a739dcd288b67494
2020-03-26 02:45:49 +00:00
Charles Chen
0cb6d3fd3d Merge "Rename createBaseActivityResources to createBaseTokenResources" into rvc-dev 2020-03-26 02:40:47 +00:00
Jing Ji
d96595a092 Merge "Update doc for ApplicationExitInfo.getDefiningUid" into rvc-dev am: 52f4d8d9f2
Change-Id: Ic66e2a57d7978fe65bc568501d8994d45e5f53ed
2020-03-26 01:05:24 +00:00
Jing Ji
52f4d8d9f2 Merge "Update doc for ApplicationExitInfo.getDefiningUid" into rvc-dev 2020-03-26 00:43:33 +00:00
Hui Yu
85b666198d Merge "Add isUidActiveOrForeground() for camera/audio to use." into rvc-dev am: 56e3510bda
Change-Id: I042304f1c6be19f281267a436226030b2074f240
2020-03-26 00:04:04 +00:00
Hui Yu
56e3510bda Merge "Add isUidActiveOrForeground() for camera/audio to use." into rvc-dev 2020-03-25 23:47:51 +00:00
TreeHugger Robot
ca0ee83398 Merge "Expand javadoc based on API Council comment." into rvc-dev am: 368c03efeb
Change-Id: I440074e431868fd10a1b4e4c9f5d9679fb46a980
2020-03-25 21:08:39 +00:00
TreeHugger Robot
368c03efeb Merge "Expand javadoc based on API Council comment." into rvc-dev 2020-03-25 20:54:57 +00:00
Alex Johnston
103f93a7e6 Make FRP APIs callable by Settings
Background
* If the device is an organization-owned managed
  profile device and a FRP policy is set, the
  factory reset protection data is no longer
  erased from factory reset in Settings.

Changes
* Added isNotEmpty method to FRP policy.
* Allow Settings to call
  getFactoryResetProtectionPolicy
  by checking for the MASTER_CLEAR permission.

Bug: 148847767
Test: manual testing
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I04f178255dd215579087c33b675b40eed7a6eac7
2020-03-25 20:16:28 +00:00
Hongwei Wang
d39583af0e Start PiP dismiss from SysUI via TaskOrganizer
following ag/10570572, dismiss PiP is driven by SysUI as following
- SysUI issues WindowContainerTransaction and set the child windowing
mode at the beginning
- SysUI continues the animation
- SysUI issues WindowContainerTransaction and set the final windowing
mode at the end

This solves also the black background issue while exiting from PiP to
fullscreen mode.

Known issues
- app does not receive fullscreen configuration when transitioning from
PiP to fullscreen mode
- saving of the reentry bounds should be originated from SysUI rather
than WM going forward

Bug: 149947030
Bug: 151866274
Test: atest PinnedStackTests PipAnimationControllerTest
Change-Id: I7ed0d8b47dcc26653ebe2f3c08acab9e8b835db4
2020-03-25 12:54:08 -07:00
Hui Yu
9b52815e71 Add isUidActiveOrForeground() for camera/audio to use.
Currently CameraService calls isUidActive() before allowing the camera
access.

When start/resume activity, WindowManagerService start/resume the
activity, then post a runnable to DiaplayThread and
ActivityManagerService to update UidRecord's
proc state, because the thread switch, the latency before proc
state update is undetermined.

When CameraService calls ActivityManagerService.isUidActive(), the proc
state may not have been updated and camera access is denied.

isUidActiveOrForeground() check isUidActive() first, if false,
check isUidForeground() which is actually to check with WindowManagerService if
the uid is foreground, which is equivalent to ActivityManagerService's uid
active, just updated earlier.

Bug: 151185692, 151777097, 109950150
Test: manual test.
Change-Id: Iffed63293dbdb466e7955fe765ad2aa23a20b3ed
2020-03-25 10:06:14 -07:00
TreeHugger Robot
35bbfae5e7 Merge "Don't include the data dir in zygote library paths." into rvc-dev am: aa9b7407da
Change-Id: I60d203a26ea175db12845a710c75caae65aa90e8
2020-03-25 16:30:30 +00:00
Winson Chung
e5ab0170f8 Skip excluded MW mode tasks from recents and running tasks
- Skip multi-window mode tasks with the exclude-from-recents flag from
  the visible recent tasks list
- Expose a method in LauncherApps to be able to start a shortcut with
  additional intent flags (to add the exclude-from-recents flag)
- Remove unused ActMan path (only ActTaskMan call is used now)
- Refactor the call to get the running tasks, there are currently only
  two usages of getFilteredTasks(), one is to get all the tasks, the
  other is really to get tasks that we will end up using for transitioning
  into the task in recents.

  As such, we can remove the individual ignore flags (it would get more
  complicated if we wanted to filter based on logic like MW mode +
  excluded recents only), and instead have a boolean that filters the
  running tasks based on whether they would ever show in recents at all,
  with the exception of the home and recent tasks.

Bug: 152133859
Test: atest WmTests:RunningTasksTest
Test: atest WmTests:RecentTasksTest
Change-Id: Ia4f5fd37228c72ce449490f948e923afba821bb2
Signed-off-by: Winson Chung <winsonc@google.com>
2020-03-25 09:29:29 -07:00
Torne (Richard Coles)
465c5fb2a3 Don't include the data dir in zygote library paths.
When creating a LoadedApk in a zygote context (app zygote or WebView
zygote), don't add the app's data dir to the list of paths the dynamic
linker is allowed to load libraries from, because the linker's attempt
to canonicalize the path causes SELinux access denials. The process
can't access the data directory at all, so cannot load libraries from
there in any case.

Fixes: 149481620
Test: check for avc denials from webview_zygote
Change-Id: I9aceecaf6067e748cc2251782b0f41661cbb35d8
(cherry picked from commit e1579d4d14)
2020-03-25 14:24:24 +00:00
TreeHugger Robot
6ba005205d Merge "Fix false positive of activity leak in NexusLauncherTests" into rvc-dev am: b04ab6ceb1
Change-Id: I892e60164aa41a8fcc7044ac571d45b9efc70730
2020-03-25 11:51:06 +00:00
TreeHugger Robot
b04ab6ceb1 Merge "Fix false positive of activity leak in NexusLauncherTests" into rvc-dev 2020-03-25 11:36:11 +00:00
Galia Peycheva
824f7a88cf Merge "Create ACTIVITY_TYPE_DREAM" into rvc-dev am: 389580c7da
Change-Id: Ifdc559beace47bff1298b52431ced1bd9effff12
2020-03-25 10:28:56 +00:00
Galia Peycheva
389580c7da Merge "Create ACTIVITY_TYPE_DREAM" into rvc-dev 2020-03-25 10:23:47 +00:00
Bernardo Rufino
5373637239 Merge "Gate toast block and remove warning" into rvc-dev am: 7afc8b101b
Change-Id: I1ab77906cf35df65e6aeedb6a6888bb041bb7010
2020-03-25 09:48:42 +00:00
Bernardo Rufino
7afc8b101b Merge "Gate toast block and remove warning" into rvc-dev 2020-03-25 09:32:40 +00:00
Charles Chen
b3230a3594 Fix false positive of activity leak in NexusLauncherTests
by postponing StrictMode.decrementExpectedActivityCount
and clear Activity reference of ActivityClientRecord

fixes: 150715257
Test: atest NexusLauncherTests
Change-Id: I0f20194fe59b45eb9954efef62a9afbcd2048ad1
2020-03-25 17:02:28 +08:00
Philip P. Moltmann
53ace23998 Pipe through attributeId to notification app-op am: e4b03b589f
Change-Id: I8f9e553a0ecfcd3f332a9ec09cf8b74131c840b4
2020-03-25 00:01:01 +00:00
Philip P. Moltmann
7556065b55 Merge "Pipe through attributeId to notification app-op" into rvc-dev 2020-03-24 23:53:51 +00:00
Jing Ji
37e0b0c2ce Update doc for ApplicationExitInfo.getDefiningUid
Bug: 152328176
Test: atest CtsAppExitTestCases:ActivityManagerAppExitInfoTest
Change-Id: Ic5d6b55a58b2eddb7b62c186adcbae748d9fde0a
2020-03-24 16:15:08 -07:00