Commit Graph

15021 Commits

Author SHA1 Message Date
Ruslan Tkhakokhov
1422033905 Merge changes from topic "cts-launcher-api"
* changes:
  Fix BackupManager#getUserForSerialNumber
  Do lazy init of BMS at the beginning of every BackupManager method
2019-02-21 18:20:05 +00:00
Chavi Weingarten
d282641a1d Merge "Make WindowContainer surfaces container layers by default." 2019-02-21 18:03:14 +00:00
Mady Mellor
5c9cd6879c Merge "Add API so apps can know when a user dismisses a bubble" 2019-02-21 17:14:56 +00:00
Mark Renouf
f9aa3044f2 Merge "Adds TaskInfo to some TaskChangeListener methods" 2019-02-21 15:11:05 +00:00
Felipe Leme
326f15a392 Optimized Content Capture workflow by caching some state at the application level.
Content Capture for an activity and/or package is only available when the Content Capture service
explicitly whitelists it. As the whitelist is kept at system-server level, it's better to fetch that
info when the application is started and cache it locally, so we can optimize the
ContentCaptureManager APIs to return quickly when it's disabled.

This CL also caches other values such as the buffer parameters.

Test: atest CtsContentCaptureServiceTestCases

Bug: 120494182
Bug: 121202151

Change-Id: I9d5211bca496ffa85ba9efc2a7bb32411834b787
2019-02-20 18:44:05 -08:00
Chavi Weingarten
6ef9cc6ac1 Make WindowContainer surfaces container layers by default.
This reverts commit f6ef18334b.

Reason for revert: ag/6227549 fixes underlying issue

Change-Id: Id1456529ef0009f8e28575ef591d9559c43db4a5
Fixes: 122561221
Test: go/wm-smoke
2019-02-20 15:33:30 -08:00
Mark Renouf
c808f069f6 Adds TaskInfo to some TaskChangeListener methods
This change dispatches TaskInfo directly for some methods
which currently only pass taskId. This eliminates the need
for second binder call to search for the TaskInfo.

See also: ag/6306456

Bug: 124058588
Bug: 123631242
Test: atest WmTests:TaskStackChangedListenerTest
Change-Id: I2e4c458f2a1ae684ef8d9f6a4ab2fbcfe13570b5
2019-02-20 16:22:22 -05:00
TreeHugger Robot
e5fbef5273 Merge "Add API comment for new API in WallpaperService." 2019-02-20 15:22:58 +00:00
Eric Sandness
e4bba0842b Merge "Doc Change For DPM.setPermittedInputMethods" 2019-02-20 11:57:09 +00:00
Michal Karpinski
4e7129df7a Merge "Add a way for holders of START_ACTIVITIES_FROM_BACKGROUND to allow bg activity starts starts from specific receivers" 2019-02-20 10:50:32 +00:00
TreeHugger Robot
fe71582e23 Merge "Introduce a way to turn a fullscreen window into freeform" 2019-02-20 09:43:51 +00:00
Yunfan Chen
d967af828b Introduce a way to turn a fullscreen window into freeform
Change the exitFreeformMode to toggleFreeformMode. Now the original
maximize button will work as maximize/restore button.

Test: go/wm-smoke
Test: Manual test.
Bug: 117075771
Bug: 124475503

Change-Id: I268d053ed0e665b8ac5e56019c6ae8f8b7ee1317
2019-02-20 15:51:40 +09:00
Stan Iliev
898123b6a3 Start RenderThread earlier to preload Vulkan/EGL drivers
This CL should fix application startup regression for Vulkan
detected by "Hermetic Startup: EmptyActivity" test.
EGL drivers are loaded in a temp thread to leave more time
in RenderThread for other work. Loading EGL drivers
on the RenderThread may cause a perf regression.

Test: Ran cold-dropcache-test test.
Bug: 122659224
Bug: 123361175
Change-Id: I8ca818e98fac196a41d079be15594caca5cb1bab
2019-02-20 02:10:52 +00:00
Mady Mellor
1ab4aa8b9b Add API so apps can know when a user dismisses a bubble
Test: atest NotificationTest (in other cl)
Bug: 124381186
Change-Id: Icb20c0e8c9f283c19d4d02dc111a7942f73cd8b2
2019-02-19 16:49:01 -08:00
Mark Renouf
49df009529 Merge "Forward StatusBar.onBackPressed to Bubbles when expanded" 2019-02-19 18:33:38 +00:00
Ruslan Tkhakokhov
d1a556a5bb Do lazy init of BMS at the beginning of every BackupManager method
Bug: 124379585
Test: 1) atest RunBackupFrameworksServicesRoboTests
      2) atest CtsBackupTestCases
      3) atest CtsBackupHostTestCases
      4) atest GtsBackupTestCases
      5) atest GtsBackupHostTestCases

Change-Id: I86857a6ee21862384c089e458ae0b6bd18538b57
2019-02-19 16:26:28 +00:00
wilsonshih
fd058f6121 Add API comment for new API in WallpaperService.
Supplement some comment to let developer know how to use new API
WallpaperInfo#supportsMultipleDisplays.

Also add a nullability annotation and comment for
WallpaperService.Engine#getDisplayContext.

Fix: 124302009
Fix: 123661589
Test: Build pass and read comment.

Change-Id: Id6040eff12495838f21f539b7c68d6743c9baf74
2019-02-19 20:57:21 +08:00
Eric Sandness
147d274f31 Doc Change For DPM.setPermittedInputMethods
Update javadoc to say that setPermittedInputMethods only restricts the
IMEs inside the profile when called by a Profile Owner.  In the past, a
Profile Owner could restrict the IMEs used across the entire device.

Change-Id: If1df3509327ef131a21db5645d9e2378622800e6
Bug: 124291520
Test: atest android.admin.cts.DevicePolicyManagerTest
2019-02-19 12:48:29 +00:00
Tiger Huang
03c20bbf6e Merge "Remove InputForwarder" 2019-02-19 07:18:41 +00:00
Mark Renouf
041d72697a Forward StatusBar.onBackPressed to Bubbles when expanded
StatusBarWindowView is the root of the StatusBar window
and handles all key events at dispatchKeyEvent

All keys dispatched to the StatusBar window flow through
StatusBarWindowView#dispatchKeyEvent. A BACK key event
is forwarded to StatusBar.onBackPressed()

If StatusBar#canPanelBeCollapsed() is false, the action is
passed to BubbleController which forwards to the expanded
bubble by calling to ActivityView#performBackPress().

Bug: 123631742
Test: manual, go/bubbles-app
Change-Id: I0ccafc02f876c973ebc267055162621109b2dcc0
2019-02-18 18:36:09 +00:00
Mark Renouf
d60890b484 Merge "ActivityView: avoid crash in release() when detached from window" 2019-02-18 16:09:19 +00:00
TreeHugger Robot
1869313a88 Merge "Trigger CtsDevicePolicyManagerTestCases in postsubmit" 2019-02-18 16:02:35 +00:00
Svetoslav Ganov
bdea76f9ae Merge "Add request object for querying historical ops" 2019-02-18 15:48:19 +00:00
Pavel Grafov
5af5841b05 Trigger CtsDevicePolicyManagerTestCases in postsubmit
In this configuration the tests will only be triggered by changes
to services/devicepolicy/** and core/java/android/app/admin/**, so
we won't be able to catch breakages coming from the rest of the tree
with a single CL precision. But let's see which parts are causing
the most breakages and add them later.

Bug: 124653467
Test: atest --test-mapping core/java/android/app/admin:postsubmit
Test: atest --test-mapping services/devicepolicy:postsubmit
Change-Id: I58f87fff4b5b5e3e4fb8a333dd6ac4dd4100b587
2019-02-18 14:12:00 +00:00
Tiger Huang
c0240753f0 Remove InputForwarder
InputForwarder was used by ActivityView. InputForwarder is not used by
anyone now.

Bug: 120675821
Test: Manual test with ActivityViewTest
Test: atest CtsActivityManagerDeviceTestCases:ActivityViewTest
Change-Id: I6bd2338c921e6dfb1dfe357decb878d558df8bfd
2019-02-18 20:02:18 +08:00
Michal Karpinski
d19ed85255 Add a way for holders of START_ACTIVITIES_FROM_BACKGROUND
to allow bg activity starts starts from specific receivers

Leverage the existing infrastructure we have - BroadcastOptions.

Bug: 124159654
Test: manual (with the other CL on the topic - try to call someone
      from Contacts app and see that the flag gets applied correctly)
Change-Id: I1220eb14d86d549a18d0d229ffb19a94a8affd66
2019-02-17 20:54:32 +00:00
Svet Ganov
23c88db8f4 Add request object for querying historical ops
Test: atest CtsAppOpTestCases

bug:123253745

Change-Id: Ia473f9298a83214f2fdfb1062992b48357965003
2019-02-17 07:35:52 -08:00
Michal Karpinski
c99d718c57 Deliver realCallingUid and realCallingPid to
AMS.broadcastIntentLocked() and make permission checks on them

Due to cleared identity at calling sites, we were using wrong
identity to carry out permission checks for BroadcastOptions.

Test: manual (log uids/pids with logcat, and see they're correct)
Bug: 124539196
Change-Id: Ieabb14220cadd25f4ed5fbc3b0ac028fc53d47de
2019-02-17 15:23:35 +00:00
TreeHugger Robot
cbb05a317b Merge changes I9ed87db1,Ic0b766f6
* changes:
  Make PermissionControllerManager user aware
  Check same uid for permission and app-op
2019-02-16 22:35:22 +00:00
Philip P. Moltmann
0d05e48371 Check same uid for permission and app-op
In permission checker we used to check the permission for the passed in
uid but the opp-op for the Binder.getCallingUid. In the case the calling
identity was cleared, PermissionChecker ended up checking the app-op of the
current process (often the system server).

Now we check the uid for both the permission and the app-op.

Test: Called PermissionChecker.checkPermission with the calling indentity
cleared.
Fixes: 124116218
Change-Id: Ic0b766f6c75bba1b9dae3e91c6adce85a76ae68f
2019-02-16 12:08:25 -08:00
Michael Wachenschwanz
0056889245 Merge "Populate null UsageStats event task root fields with known data" 2019-02-16 02:50:47 +00:00
TreeHugger Robot
0c2101c6d4 Merge "Add IntDef annotation to parameter foregroundServiceType." 2019-02-16 01:23:18 +00:00
TreeHugger Robot
78ad8c28b7 Merge "Send Keyboard Shortcut broadcasts to current user." 2019-02-16 01:06:22 +00:00
TreeHugger Robot
fe09cbef5a Merge "ContentCaptureManager should be null when the feature is disabled." 2019-02-16 00:57:04 +00:00
Nicholas Sauer
28348ed748 Send Keyboard Shortcut broadcasts to current user.
bug: 124526105
Test: After switching to a secondary user: cts-tradefed run cts-dev -m CtsAppTestCases -t android.app.cts.ActivityKeyboardShortcutsTest#testRequestShowKeyboardShortcuts
Change-Id: I033a3bd0f6df7ca939b3aa7c081a6dbf45f1d63f
2019-02-15 23:39:29 +00:00
Michael Wachenschwanz
08be74fa54 Populate null UsageStats event task root fields with known data
It is possible for an activity's task root to be reported as null to
UsageStats during a destry. Use past known data to populate the fields.

Change-Id: Id20c809580e854ca9075444957bd10a338087e3d
Fixes: 123404490
Test: atest cts/tests/tests/app.usage/src/android/app/usage/cts/UsageStatsTest.java#testSuddenDestroy
2019-02-15 14:44:48 -08:00
Hui Yu
b8dcbeeff1 Add IntDef annotation to parameter foregroundServiceType.
For methods Service.startForeground(int, Notification, int).
Also add IntDef annotation on return value of
ServiceInfo.getForegroundServiceType().

Change-Id: I3f0df5ff44dfb1b0cf2150d6e40d39ac0cd2b2b5
Fix: 124331268
Test: NA.
2019-02-15 11:49:48 -08:00
Winson Chiu
ff172645e6 Merge "Add transient night mode in car mode when targeting Q" 2019-02-15 19:24:55 +00:00
Felipe Leme
d49d52c0ad ContentCaptureManager should be null when the feature is disabled.
Test: manual verification using logcat and dumpsys
Test: atest CtsContentCaptureServiceTestCases

Fixes: 124475449

Change-Id: I699de127bf9e61ba187eb129c38d243d5fc93f1c
2019-02-15 10:32:45 -08:00
Remi NGUYEN VAN
584b1378a8 Merge "Move NetworkStack to services.net" 2019-02-15 07:25:09 +00:00
Mark Renouf
3856b4f2cd ActivityView: avoid crash in release() when detached from window
Adds an isAttachedToWindow() check to updateLocation() and
cleanTapExcludeRegion() which both require a reference to a Window.

Bug: 112574121
Change-Id: I71f184d74eb88d79effaeb3340ce5362155ed0fb
2019-02-14 16:53:03 -05:00
TreeHugger Robot
93d196b3a8 Merge "Create a DisableInfo object instead of exposing DISABLE_* flags" 2019-02-14 21:43:30 +00:00
TreeHugger Robot
f9723ba1e7 Merge changes from topic "accessibility-usage-dialog"
* changes:
  Make the accessibility op string a SystemApi.
  Add a new intent for reviewing running accessibility services.
2019-02-14 21:04:32 +00:00
Maurice Lam
b8e161804d Merge "Add system APIs to implement locale picker" 2019-02-14 20:03:04 +00:00
Remi NGUYEN VAN
310da6f0e8 Move NetworkStack to services.net
NetworkStack is only used in services.net or clients of services.net. It
cannot stay in framework.jar because it needs to depend on AIDL
interfaces, which would conflict with app implementations if they were
in framework.jar.

(cherry-pick of aosp/905233 with trivial conflicts in SystemServer.java)

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: I501b125a388c1100c2182bde4670944c2f0d7a02
2019-02-14 20:43:43 +09:00
Remi NGUYEN VAN
55b0803ae1 Merge "Remove deps from framework on netd interfaces" 2019-02-14 03:11:32 +00:00
Amin Shaikh
c3f0b06ccc Update notification layouts when overlays change.
- Use the overlay directories specified in the ApplicationInfo retrieved
from PackageManager. The resources directories cached in LoadedApk in
ActvityThread may contain stale values for remote applications.
- Clear StatusBarNotification#mContext when overlays change to ensure
that the Resources for remote Contexts are not stale. These Contexts
will be recreated in the subsequent AsyncInflationTask.

Bug: 120987987
Test: mp core sysuig; change theme using theme picker
Change-Id: I100d164facdd4208610ee6409dd3868d6f304712
2019-02-13 15:34:27 -05:00
Evan Laird
ced4aebd0e Create a DisableInfo object instead of exposing DISABLE_* flags
The DISABLE_* flags fall into two namespaces, helpfully named DISABLE_*
and DISABLE2_*. Seeing as that's kind of domain specific and not clear
enough, this change adds StatusBarManager#DisableInfo as a way to
describe which components an app has requested to be disabled.

It could also be used to remove the need for diasble() and disable2() in
the future.

Test: atest GtsStatusBarHostTestCases
Bug: 123430822
Change-Id: Iecd5119e01fbabf113b5cfbe8f02f8f0d990e9fb
2019-02-13 14:22:30 -05:00
Alex Kershaw
bc40490aeb Merge "Managed system update API council changes." 2019-02-13 12:47:22 +00:00
Remi NGUYEN VAN
f9a8c2e173 Remove deps from framework on netd interfaces
If included in framework.jar, the interfaces conflict with any app that
needs to depend on them, including the NetworkStack.

(cherry-pick of aosp/903220 with trivial conflict in Android.bp)

Bug: 124033493
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I0ecae20d514bf888f3a80331f19369ceb1c52aa3
2019-02-13 19:34:37 +09:00