Commit Graph

17629 Commits

Author SHA1 Message Date
Yvonne Jiang
70a62376d0 Mark secondary lockscreen API as SystemApi.
It is currently not meant for use by general enterprise device admins.

Bug: 152478326

Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest KeyguardUpdateMonitorTest
Test: atest AdminSecondaryLockScreenControllerTest
Change-Id: I6d60bc35a4e8f74b1da55b042582a2f2fa89d57f
2020-04-02 08:41:04 +00:00
Steve Elliott
4605ca9daa Merge changes Ie5bfc2f6,I38e7dc8c,I9308a15a into rvc-dev
* changes:
  Reinflate notif when [un]marked as conversation
  Update conversation UI when importance changed
  Add unread count badge to conversation layout
2020-04-01 17:34:36 +00:00
Wale Ogunwale
adf116ec95 Add TestApi interfaces for window organizers
Enables testing the API surfaces from CTS.

Bug: 149338177
Test: they pass!
Change-Id: I7e1f2852585a10c20d299bd87e9a87f828d06d6a
2020-04-01 13:25:23 +00:00
Winson Chung
a531f922c9 Merge "Add task organizer based task embedder" into rvc-dev 2020-03-31 20:59:17 +00:00
Steve Elliott
239e6cb1df Add unread count badge to conversation layout
Fixes: 152303800
Test: manual, visual
Change-Id: I9308a15ab223086398ba073b08d60cb7c50d8c30
2020-03-31 16:20:39 -04:00
Selim Cinek
9bad85af2b Merge changes I0d79642d,If8756ac8,I29e73897,Ia8c5121a,I533b8f06 into rvc-dev
* changes:
  Indented the conversation action list
  Fixed some issues where conversation badges would not be visible
  Improved the animations of the conversation badges
  Important conversations now also transform into the shelf
  Adapted Shelf algorithm to also use conversation icons
2020-03-31 20:02:01 +00:00
Neil Fuller
71271db6bf Merge "Misc tidy up before adding geolocation classes" into rvc-dev 2020-03-31 14:52:09 +00:00
Winson Chung
a1f869d10e Add task organizer based task embedder
- Split TaskEmbedder into its current VirtualDisplay implementation
  and an implementation that uses task org to create and manage
  the task
- Use the task org embedder implementation in separate bubble task view
- Skip task org tasks from triggering task resizing
- Add task org callback for back press on task root if requested

Bug: 148977538
Test: atest CtsWindowManagerDeviceTestCases:ActivityViewTest
Test: atest WmTests:TaskOrganizerTests
Change-Id: Id422bb2547197c617f914ed7cf5085e02a1c3fb5
2020-03-30 23:29:08 +00:00
Selim Cinek
79d9863ebc Adapted Shelf algorithm to also use conversation icons
Previously the algorithm would only work with a header
and the icon wouldn't transform into the shelf.
This is now fixed.

Bug: 150905003
Test: add conversation notification, observe normal transition
Change-Id: I533b8f06bee29ee93888d748808b4313fef338e8
2020-03-30 16:18:09 -07:00
Michael Wright
603713009e Merge "Remove replaced BubbleMetadata methods from SDK." into rvc-dev 2020-03-30 20:58:43 +00:00
Patrick Baumann
3dfc45e593 Merge "Whitelist for package broadcasts" into rvc-dev 2020-03-30 20:28:59 +00:00
Michael Wright
b6ffb2293e Remove replaced BubbleMetadata methods from SDK.
Prior to finalization, we need to remove all methods which were
replaced but kept around for short-term compatibility purposes.
BubbleMetadata had a few methods that fell into this category that had
yet to be removed.

Bug: 152761169
Test: build
Change-Id: Ic9f8d600721e15119fc28d308ff1bc444d61e399
2020-03-30 19:02:37 +01:00
TreeHugger Robot
7f212788d1 Merge "Fix incorrectly assigned constant in AppOpsManager" into rvc-dev 2020-03-30 17:49:17 +00:00
Patrick Baumann
b66d65fa18 Whitelist for package broadcasts
This change adds a whitelist of UIDs that package change broadcasts may
be sent to. This must be pre-calculated and stored in memory before the
package is updated or modified as the visibility may change during that
transaction.

Test: atest PackageManagerTests AppsFilterTest AppEnumerationTests
Fixes: 143534210
Change-Id: I003c54528141d8b03033f8241559dd5895df064a
2020-03-30 09:47:55 -07:00
Ryan Mitchell
ad5a070a87 Merge "Synchronize before calling unstableRemoveIf" into rvc-dev 2020-03-30 15:44:00 +00:00
Stanislav Zholnin
5c88c73306 Fix incorrectly assigned constant in AppOpsManager
Fix: 152268751
Test: atest AppOpsUpgradeTest#testUpgradeFromNoVersion
Change-Id: Ie2bbe6d23d8860e15091b24040c2473151ca24fd
2020-03-29 21:46:35 +01: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
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
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
0e6240f8b9 Merge "Respect app-ops permission in FileIntegrityService" into rvc-dev 2020-03-27 23:52:59 +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
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
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
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
7bd3e833ce Merge "Make FRP APIs callable by Settings" into rvc-dev 2020-03-26 12:58:48 +00:00
Charles Chen
0cb6d3fd3d Merge "Rename createBaseActivityResources to createBaseTokenResources" into rvc-dev 2020-03-26 02:40:47 +00:00
Jing Ji
52f4d8d9f2 Merge "Update doc for ApplicationExitInfo.getDefiningUid" into rvc-dev 2020-03-26 00:43:33 +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
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
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
b04ab6ceb1 Merge "Fix false positive of activity leak in NexusLauncherTests" into rvc-dev 2020-03-25 11:36:11 +00:00
Galia Peycheva
389580c7da Merge "Create ACTIVITY_TYPE_DREAM" into rvc-dev 2020-03-25 10:23:47 +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
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
Bernardo Rufino
c797aac41e Gate toast block and remove warning
Gate background custom toast block on targetSdk for beta 1, after
having gathered dogfood feedback. So, enabling the change for apps with
targetSdk > Q (>= R). Also removed warning toast.

Added tests in topic CL to cover all the cases.

Bug: 144152069
Test: atest android.widget.cts29.ToastTest android.widget.cts.ToastTest
Change-Id: If368a97a2a8ff56770635615f89c79007bb27075
2020-03-24 20:22:18 +00:00
Julia Reynolds
460292f789 Update documentation
Test: make
Fixes: 152262228
Change-Id: I66eca44b649e209ea7adc39e38c24d21e564fe8d
2020-03-24 15:44:25 -04:00
Philip P. Moltmann
e4b03b589f Pipe through attributeId to notification app-op
The noteOp API without attributeId is deprecated.

For @UnsupportedApi Binder calls we need to keep the old name there.

Test: TH
Bug: 136595429
Change-Id: Ib758b431c0842bb16ce8e8fb3a33d4524ab0878c
2020-03-24 11:41:09 -07:00
Pavel Grafov
70b1c45a9e Merge "Suspend newly installed apps when personal apps are suspended" into rvc-dev 2020-03-24 17:42:11 +00:00