Commit Graph

19195 Commits

Author SHA1 Message Date
Eugene Susla
4587809e21 Merge "Expose get/set notification listeners as a @SystemAPI" 2020-10-14 21:10:06 +00:00
Hall Liu
9f1a46639b Merge changes from topic "home-vis-listener"
* changes:
  Adapt to the new test-current.txt generator
  Expose the HomeVisibilityListener API
2020-10-14 16:59:47 +00:00
Winson Chung
13d990e697 Merge "Return the existing tasks when registering an organizer" 2020-10-14 15:45:19 +00:00
Rob Carr
6958abb97b Merge changes from topic "scaling-mode-cleanup"
* changes:
  SurfaceControl: Remove setOverrideScalingMode
  ScreenRotationAnimation: Use Surface#setScalingMode
  WindowManager: Remove windowsAreScaleable
2020-10-14 06:10:46 +00:00
Winson Chung
3f4c002e1f Return the existing tasks when registering an organizer
- Existing tasks for supported windowing modes are returned when
  registering the organizer and the organizer will not receive
  onTaskAppeared() for these tasks.  For now, the shell task
  organizer will keep these tasks for reporting task appeared when
  individual components add listeners for their windowing modes.
- Fixed some tests now that we organize fullscreen tasks

Bug: 162028888
Test: atest WindowOrganizerTests
Test: atest ShellTaskOrganizerTests
Change-Id: Iedc5f58fbfa819e753a5dcea7a8eb9dee8b6843b
2020-10-13 20:58:25 -07:00
Darryl Johnson
829b71b0f1 Merge "Add binder interface to DeviceStateManagerService." 2020-10-14 02:59:36 +00:00
Treehugger Robot
633529ac46 Merge "Do not send WTF when ETHERNET_SERVICE" am: f03005d5e0 am: e7e458954c am: 9ab252e8ed am: 85fd427b99
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1458804

Change-Id: Ied86b97532d214a7fac4de0393a9a18b07007c19
2020-10-14 02:24:47 +00:00
Robert Carr
f09bdfc4f7 WindowManager: Remove windowsAreScaleable
This code was added for an earlier implementation of the PIP animation.
In this earlier implementation PIP was animated by directly scaling the
WSA level surface. This means that if we were in SCALING_MODE_FREEZE the
requested v active geometry logic in SF could freeze our
matrix/position/crop updates. Now that we manipulate the PIP surface
via higher levels of the hierarchy this wont be a problem and we don't
need to change the scaling mode.

Bug: 161937501
Test: Existing tests pass
Change-Id: Iaf10ee4fae9a56a79c1432d9ffd4c8227b832b01
2020-10-13 18:44:07 -07:00
Treehugger Robot
85fd427b99 Merge "Do not send WTF when ETHERNET_SERVICE" am: f03005d5e0 am: e7e458954c am: 9ab252e8ed
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1458804

Change-Id: Id4d0e3cea02a912d637cce2f3ee298ce9fd4acbf
2020-10-14 01:42:13 +00:00
Treehugger Robot
9ab252e8ed Merge "Do not send WTF when ETHERNET_SERVICE" am: f03005d5e0 am: e7e458954c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1458804

Change-Id: I7e06f19d39feb659a7345160db443059e4a69912
2020-10-14 01:24:26 +00:00
Hall Liu
ed473f4574 Expose the HomeVisibilityListener API
Rename HomeVisibilityObserver to HomeVisibilityListener and expose it as
module-only API. This listener is used by the SIM toolkit to detect when
the home screen is visible.

Also fix some bugs in the original implementation that were uncovered
during CTS writing.

Fixes: 170226810
Test: atest ActivityManagerTest#testHomeVisibilityListener
Exempt-From-Owner-Approval: Previously approved in ag/12775889
Change-Id: Ia44462e55ad71119cf356485c60c121d331c50d4
2020-10-14 00:28:59 +00:00
Makoto Onuki
c48de401c5 Merge "Revert "Expose the HomeVisibilityListener API"" 2020-10-13 23:39:56 +00:00
Makoto Onuki
377a388d1f Revert "Expose the HomeVisibilityListener API"
Revert "Add CTS for HomeVisibilityListener"

Revert submission 12775890-home-vis-listener

Reason for revert: broke build, b/170776449
Reverted Changes:
I8e6de3267:Add CTS for HomeVisibilityListener
I33d943603:Follow rename of HomeVisibilityObserver
I5d99f2bad:Expose the HomeVisibilityListener API

Change-Id: I9483fac8cf40ecfa6f80f6f66068978ebe493258
2020-10-13 23:32:18 +00:00
Hall Liu
07568f01de Merge "Expose the HomeVisibilityListener API" 2020-10-13 22:03:40 +00:00
Darryl L Johnson
76b1f31b9a Add binder interface to DeviceStateManagerService.
Test: None
Bug: 159401801

Change-Id: Ia37bb555d2baf43de8d1415731eb0ce5064da907
2020-10-13 14:43:04 -07:00
TreeHugger Robot
4ad0cf2db1 Merge "Update javadoc for startProxyOp" 2020-10-13 20:49:05 +00:00
Eugene Susla
0642113b7c Expose get/set notification listeners as a @SystemAPI
We need to grant/revoke notification listener privileges from
PermissionController maniline module.
This exposes a @SystemApi API to do so

Bug: 165951651
Test: atest NotificationManagerTest
Change-Id: I81502756e9c7f11ce0347f5f3c006a1539f91b37
2020-10-13 13:26:47 -07:00
Makoto Onuki
b547383444 Do not send WTF when ETHERNET_SERVICE
Not all devices have the ETHERNET_SERVICE service, which is expected,
so do not send WTF even when it's not available.

Fix: 169024836
Test: Build

Change-Id: Ia1fa2d1753aa40e1d09996be11082d65afc5458f
2020-10-13 13:17:31 -07:00
Nate Myren
067730b3c2 Update javadoc for startProxyOp
Fixes: 170705158
Test: build
Change-Id: I5317a7bc15915ea7fd92b55b070fc41faa319312
2020-10-13 11:23:16 -07:00
TreeHugger Robot
c7229847fb Merge changes from topic "jr-ranking-convo"
* changes:
  Add flag for pendingintent
  Allow NLSes to see conversation information
2020-10-12 19:21:44 +00:00
Linus Tufvesson
6a29fdbd56 Update javadoc for setLaunchDisplayId am: 334190f26e am: c37e102250 am: 2e33ba4687
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12794770

Change-Id: I720f9774c23bc9da40005160f879791b0b816075
2020-10-09 22:02:00 +00:00
Linus Tufvesson
b57b92454f Update javadoc for setLaunchDisplayId am: 334190f26e am: 9b95f61aeb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12794770

Change-Id: I22c51c6e4d6b748fbbe450f0e88e6eb93b88a656
2020-10-09 21:42:18 +00:00
Linus Tufvesson
2e33ba4687 Update javadoc for setLaunchDisplayId am: 334190f26e am: c37e102250
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12794770

Change-Id: I3d140d6f77e5600179f20fd84031e0a2c389b3ed
2020-10-09 21:42:02 +00:00
Linus Tufvesson
9b95f61aeb Update javadoc for setLaunchDisplayId am: 334190f26e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12794770

Change-Id: If6e12055adfbe330ef00f36d661aaccd64bfded4
2020-10-09 21:15:15 +00:00
Julia Reynolds
e57d36d4fd Add flag for pendingintent
Test: make
Fixes: 170422191
Change-Id: I9e803606034c04cad5a0e0db1d9c6d115fab2210
2020-10-09 16:05:26 -04:00
Treehugger Robot
dc19333bf5 Merge "Fix non-inclusive terms in framework device policy logic" am: 64add27a7c am: 3d3e16e2a6 am: a95dc0e13f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1454737

Change-Id: Ic966bd42326f6cd9909bb69853710a7385ffe643
2020-10-09 17:40:22 +00:00
Treehugger Robot
a95dc0e13f Merge "Fix non-inclusive terms in framework device policy logic" am: 64add27a7c am: 3d3e16e2a6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1454737

Change-Id: I4a64cac98249a47797d2b3c4f937559f4f681261
2020-10-09 17:19:43 +00:00
Rubin Xu
42a8617913 Merge "Fix non-inclusive terms in framework device policy logic" 2020-10-09 15:41:08 +00:00
Linus Tufvesson
334190f26e Update javadoc for setLaunchDisplayId
.. to match behavior post I1f9662c2bd14b34e00fbc8ebb926538f0329c37a

Bug: 167593637
Test: Javadoc change only.
Change-Id: I4cb9fe4a5ae74b1474f9da39b6aeb3a374f8cf12
2020-10-09 09:54:40 +00:00
Nick Moukhine
4c3ecce019 Merge "Add system service for music recognition." 2020-10-09 07:35:34 +00:00
TreeHugger Robot
23606d44e8 Merge "Improve the documentation of the paramters passed to noteOp" 2020-10-09 03:12:56 +00:00
Philip P. Moltmann
8c22ae2a0c Improve the documentation of the paramters passed to noteOp
Test: Docs only changes
Change-Id: I10bac140182db2de43399b45da683c45435ed828
2020-10-08 17:48:10 -07:00
Ashwini Oruganti
93b2f301cf Merge "Add a method to return the flags set for a PendingIntent" 2020-10-09 00:13:49 +00:00
Nate Myren
c7859e9813 Merge "Add start/finishProxyOp methods" 2020-10-08 21:38:22 +00:00
Ashwini Oruganti
407e8d2c18 Add a method to return the flags set for a PendingIntent
This change adds `getPendingIntentFlags` to return the flags set for a
given PendingIntentRecord in ActivityManagerInternal.

Bug: 169961135
Test: green builds
Change-Id: If43c9620e7364265f48c3c3f2ebeadc268b83ddf
2020-10-08 13:22:11 -07:00
Jeff Sharkey
f76ffeaff1 Merge changes from topic "oct6"
* changes:
  Upgrade AndroidFrameworkBinderIdentity to fatal.
  Tighten up Binder.clearCallingIdentity() usage.
  Tighten up Binder.clearCallingIdentity() usage.
  Tighten up Binder.clearCallingIdentity() usage.
2020-10-08 18:50:22 +00:00
Alex Buynytskyy
b854d53c99 Merge "Allow shell command to accept std input stream." 2020-10-08 17:51:47 +00:00
Rubin Xu
d40199b5b2 Fix non-inclusive terms in framework device policy logic
Bug: 170188829
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Merged-In: I8b8ab1442c3f592a4e3ce70852025b1b169d5f18
Change-Id: I8b8ab1442c3f592a4e3ce70852025b1b169d5f18
2020-10-08 14:22:47 +00:00
Rubin Xu
98c242f64b Fix non-inclusive terms in framework device policy logic
Bug: 170188829
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: I8b8ab1442c3f592a4e3ce70852025b1b169d5f18
2020-10-08 15:03:41 +01:00
Jeff Sharkey
b93712f623 Tighten up Binder.clearCallingIdentity() usage.
This is a third CL in a chain that adjusts existing malformed code
to follow AndroidFrameworkBinderIdentity best-practices.

Specifically, if a thread clears an identity they need to restore it
to avoid obscure security vulnerabilities.  In addition, the relevant
"try" block must start immediately after the identity is cleared to
ensure that its restored if/when any exceptions are thrown.

Bug: 155703208
Test: make
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I74cb958b68d55a647547aae21baff6ddc364859b
2020-10-07 21:24:05 -06:00
Nate Myren
eb75200bc4 Add start/finishProxyOp methods
Test: atest AppOpEventCollectionTest
Fixes: 170336396
Change-Id: I825c58d615fe23e6529d1f877e45a896438dbf15
2020-10-07 14:44:58 -07:00
Riddle Hsu
e839c2ca79 Move defer-process-config for cached process to client side
Previously the cached state highly depends on the path of oom-adj
update, that causes potential lock contention between WMS and AMS.

Because the original major problem might be the heavy IO operations
by accessing the resources when handling configuration change from
dozens of non-important processes. The client side config deferring
could be enough help for the case.

This is also the last removal of holding WM lock in the path of
oom-adj update.

Bug: 143432064
Bug: 159104503
Test: ActivityThreadTest# \
      testHandleProcessConfigurationChanged_DependOnProcessState
Change-Id: Iefc9e02aa374bc74f263cf0c10612f89b864530b
2020-10-07 23:42:00 +08:00
Hall Liu
b9bba581a9 Expose the HomeVisibilityListener API
Rename HomeVisibilityObserver to HomeVisibilityListener and expose it as
module-only API. This listener is used by the SIM toolkit to detect when
the home screen is visible.

Also fix some bugs in the original implementation that were uncovered
during CTS writing.

Fixes: 170226810
Test: atest ActivityManagerTest#testHomeVisibilityListener
Change-Id: I5d99f2bad144711d7135cc800921abf01df6235d
2020-10-06 14:17:26 -07:00
Alex Buynytskyy
4c55afd787 Allow shell command to accept std input stream.
Incremental and pm installs use stdin to provide APK data. This change
allows Jetpack to test incremental installs.

Bug: 162316399
Test: API change, already used in CTS
Test: atest PackageManagerShellCommandTest
Change-Id: I0a891535a7ff0b2a3459b03be56c6798e30086b6
2020-10-06 10:36:13 -07:00
Jeff Sharkey
2d2e07e2ff Tighten up Binder.clearCallingIdentity() usage.
The recently added AndroidFrameworkBinderIdentity Error Prone checker
examines code to ensure that any cleared identities are restored to
avoid obscure security vulnerabilities.

This change is a purely mechanical refactoring that adds the "final"
keyword to the cleared identity to ensure that it's not accidentally
modified before eventually being cleared.  Here's the exact command
used to generate this CL:

$ find . -name "*.java" -exec sed -Ei \
    's/    (long \w+ = .+?clearCallingIdentity)/    final \1/' \
    {} \;

Bug: 155703208
Test: make
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I832c9d70c3dfcd8d669cf71939d97837becc973a
2020-10-06 11:18:09 -06:00
TreeHugger Robot
0572a76bc1 Merge "Addressing API review comments." 2020-10-06 15:24:53 +00:00
Eran Messeri
4634589e41 Refactoring: Use explicit methods for checking DO/PO
Do not use USES_POLICY_PROFILE_OWNER / USES_POLICY_DEVICE_OWNER.
Instead, use explicit methods for checking if the caller is
the Device Owner or Profile Owner.

USES_POLICY_PROFILE_OWNER is confusing since internally in the
DevicePolicyManagerService, it implied a Device Owner is also a
Profile Owner, which is not always what the caller expected.

This is the first phase of the refactoring, removing external calles'
dependency on these constants. The next phase will remove them
internally completely in favour of an implementation that
accesses mOwners directly.

There are no functional changes in this CL.

Bug: 163028934
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: I57c8465d190a3b4b130d57fd622cc93eaeb9c717
2020-10-06 10:34:23 +01:00
Alex Buynytskyy
c40b4f2851 Addressing API review comments.
Fixes: 169153620
Fixes: 168601298
Test: atest ChecksumsTest
Change-Id: Ibe593ccd388ad56f01ba0e3f58fb5a17c86e5e5c
2020-10-05 20:39:39 -07:00
Louis Chang
d1b79549d2 Renaming Stacks APIs to RootTasks
This CL is aimed to refine the AM/ATM API surface. The other
stack naming internally spread in AM and ATM will be covered
in later CLs.

Also Consolidate #removeStack() with #removeTask().

Bug: 157876448
Test: existing tests

Change-Id: I1254f972dab3bbe66a736a0402eebce9d0fb1496
2020-10-06 08:39:18 +08:00
Pinyao Ting
c4f2ea4b87 Fix the issue provider can be wrong when requesting slice permission am: e3eba1322b am: df8bc34ba6 am: 0726759259
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12687714

Change-Id: I315091bf76fb38fad002e68304b124524105f657
2020-10-05 23:46:38 +00:00