Commit Graph

23289 Commits

Author SHA1 Message Date
Prabir Pradhan
ef943fa98c Merge "Remove exception for injecting pointer event from sendTrackballEventSync" into tm-dev am: 605556d50e am: 07021c652e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17592143

Change-Id: Ia318ee33cf24b560e7e66ae28825cc2a7557bea6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 15:55:03 +00:00
Prabir Pradhan
605556d50e Merge "Remove exception for injecting pointer event from sendTrackballEventSync" into tm-dev 2022-04-06 14:36:57 +00:00
Antoan Angelov
efc3ee01f0 Merge "Update javadoc for role holder updater action" into tm-dev am: 42121eea73 am: 0bade77d15
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17356763

Change-Id: I49152d3a0ca34fd1ab91281b7bfe866cf3674994
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 20:02:47 +00:00
Shivam Agrawal
e6e6b393d7 Merge changes from topic "embedding-race-condition" into tm-dev am: 87550b067a am: e3250aa2ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17494165

Change-Id: Ia333d7374d77abb9d571551d9fdc3bca79f8529c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 20:00:38 +00:00
Antoan Angelov
42121eea73 Merge "Update javadoc for role holder updater action" into tm-dev 2022-04-05 18:57:50 +00:00
Shivam Agrawal
87550b067a Merge changes from topic "embedding-race-condition" into tm-dev
* changes:
  Send Split Info Callback before Activity#onCreate
  Revert "Removing TaskFragment token from LaunchActivityItem"
2022-04-05 18:36:49 +00:00
Prabir Pradhan
be382c32b3 Remove exception for injecting pointer event from sendTrackballEventSync
Starting from T, a MotionEvent's default source is SOURCE_CLASS_POINTER.
This means injecting a newly obtained MotionEvent into
sendTrackballEventSync would cause the exception to be triggered.

Adding such an exception doesn't make sense in T, since it adds the
additional precondition to sendTrackballEventSync that the MotionEvent's
source must correctly configured. This precondition did not exist before,
so we remove the exception.

Bug: 228194124
Test: atest android.app.cts.DialogTest
Change-Id: I039e30e6c768ce11c64d077d20373da12f27b72f
2022-04-05 18:04:40 +00:00
Jing Ji
106937c396 Merge "Add a parameter to the internal FGS notification listener" into tm-dev am: e1eb2bf9a3 am: f741a3ab99
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17577223

Change-Id: I693e0b666a7c77e2bd537e86ab4f96b3474ec5ad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 12:13:17 +00:00
Prabir Pradhan
c871d04d38 Merge "Change input injection security model to require INJECT_EVENTS permission" into tm-dev am: 0df8e9cedd am: 38d4db43db
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17125748

Change-Id: I7655e9669c579001c40ec935d26268f31d5cb1b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 11:35:06 +00:00
Jing Ji
e1eb2bf9a3 Merge "Add a parameter to the internal FGS notification listener" into tm-dev 2022-04-05 11:31:12 +00:00
Jing Ji
3d57c22c0e Add a parameter to the internal FGS notification listener
Don't use the notification ID to determine if it's being
canceled or not.

Bug: 203105544
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: I0ddcb7de57800c5f8b69100353ba7f71157a5448
2022-04-04 19:50:51 -07:00
Prabir Pradhan
edff385132 Change input injection security model to require INJECT_EVENTS permission
Previously, any app could inject input events into the system via the
IInputManager#injectInputEvent API. The injection was only allowed if
the input event targeted a window owned by the same UID as that of the
process calling the API. This had drawbacks metioned in the bug.

Here, we change the input injection security model so that the signature
permission INJECT_EVENTS is required to inject events. This permission
is given to the system and the shell, so input injection can still be
done through the 'adb shell input' command. We also allow injection from
instrumeted processes where the instrumentation source has the
permission. For exmaple, running a test from the shell allows for the
test to inject events.

We also add support for a targeted injection mode, where the input
injection succeeds only if the target window for the event is owned by
the provided UID. This allows us to support injection from the
Instrumentation class, which only allows for injection into windows
owned by the same UID. In contrast to this, injection from the
UiAutomation class will target all windows, including system and spy
windows.

Bug: 207667844
Bug: 194952792
Test: atest inputflinger_tests
Test: atest WindowInputTests
Test: manual with test app: app cannot inject navigation gestures
Change-Id: Ib0d66eff3fc2f061e7c0d3b7e139a841a9bcebc7
2022-04-04 19:22:51 +00:00
Sudheer Shanka
607b5150a3 Merge "Inform NPMS about the app coming to the TOP state early." into tm-dev am: ec157586d7 am: 7870c999b9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17526033

Change-Id: Ifc178e96d2346fbc8df52d398f6351037e6f94e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 10:46:40 +00:00
Sudheer Shanka
ec157586d7 Merge "Inform NPMS about the app coming to the TOP state early." into tm-dev 2022-04-04 09:56:02 +00:00
Shan Huang
36045cc7d7 Merge "Remove OnBackInvokedDispatcherOwner interface." into tm-dev am: bf8817d3f0 am: 617ad4e4d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17511152

Change-Id: Id9b349e0e2b02783de8c75c553488df0f61c7294
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-02 01:57:08 +00:00
Vadim Caen
49c0dc04c5 Merge "Split animation methods out of OnBackInvokedCallback" into tm-dev am: d0923a2197 am: ce4cdf7989
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17523886

Change-Id: I13b53084f418b286b60ceffb3ab35a83bd44fa0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 20:28:11 +00:00
Shan Huang
69a3984aae Remove OnBackInvokedDispatcherOwner interface.
Test: m -j update-api. Build and flash and test back behavior throughout
the system.
Bug: 227500290

Change-Id: Ibdb13d02e044741d05d99f1cad96e43dc0129fe4
2022-04-01 20:27:34 +00:00
Prabir Pradhan
a3e0c532e5 Merge "Remove injectInputAfterTransactionsApplied from WMS" into tm-dev am: baf0f20718 am: 77693b6c45
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17506923

Change-Id: I35f0db89e49c79f122d2211f0dec140ca2e3bd5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 20:18:24 +00:00
Vadim Caen
d0923a2197 Merge "Split animation methods out of OnBackInvokedCallback" into tm-dev 2022-04-01 20:13:30 +00:00
Vadim Caen
c627777dda Split animation methods out of OnBackInvokedCallback
This makes OnBackInvokedCallback SAM compatible

Bug: 227789359
Test: atest \
        CtsWindowManagerDeviceTestCases:android.server.wm.BackNavigationLegacyTest \
        CtsWindowManagerDeviceTestCases:android.server.wm.BackNavigationTests \
        WmTests:com.android.server.wm.BackNavigationControllerTests \
        FrameworksCoreTests:android.window.BackNavigationTest \
        FrameworksCoreTests:android.window.WindowOnBackInvokedDispatcherTest \
        CtsViewTestCases:android.view.cts.OnBackInvokedDispatcherTest
Change-Id: Iab86b0488f1b3048eb02042191acaeb6a645a0bc
2022-04-01 20:09:26 +00:00
Prabir Pradhan
baf0f20718 Merge "Remove injectInputAfterTransactionsApplied from WMS" into tm-dev 2022-04-01 19:39:15 +00:00
arangelov
7507f95d65 Update javadoc for role holder updater action
Bug: 226414338
Test: none
Change-Id: Ica161a71df9b8ba85bb8c120ca2e614ae21b9820
2022-04-01 19:06:55 +01:00
kholoud mohamed
231953efe9 Rename PermissionController resource constants
Bug: 217388602
Test: N/A
Change-Id: I61b052ef831d38379adf6164cb881a1c9b2ea46a
(cherry picked from commit 4b2931194e)
Merged-In: I61b052ef831d38379adf6164cb881a1c9b2ea46a
2022-04-01 15:31:21 +00:00
Jim Blackler
9757ed9482 Merge "Add loading boost intervention for games." into tm-dev am: a4dd0499bd am: 61c26022eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17106088

Change-Id: I7c8ee613c8689e8b50236df45d77a5ee14f04fc4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 10:08:44 +00:00
Jim Blackler
a4dd0499bd Merge "Add loading boost intervention for games." into tm-dev 2022-04-01 09:39:44 +00:00
Sudheer Shanka
e69f7fdbb6 Inform NPMS about the app coming to the TOP state early.
It's possible for an app to come to the TOP state before
the oomAdj computation is done and we cannot wait for
oomAdj computation to complete and then inform NPMS about
the state change. So, inform NPMS early about the state
change when we know the app is going to the TOP state.

Bug: 226299593
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I5d582618652cead179c419f7fe084283dd89d514
2022-03-31 19:51:55 -07:00
jimblackler
ac10e4a396 Add loading boost intervention for games.
Bug: 207845905
Test: atest com.android.server.app.GameManagerServiceTests
Change-Id: I2d0b4988797fe21bd7aec6d5351273757ae1a3ce
2022-03-31 20:38:29 +00:00
Lee Shombert
9174031d06 Merge "Put a binder cache on DevicePolicyManager APIs" into tm-dev am: b53dad8cb0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17394738

Change-Id: I700a2657e6b9a7f066a322d80551472337ce22e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 15:30:22 +00:00
Lee Shombert
b53dad8cb0 Merge "Put a binder cache on DevicePolicyManager APIs" into tm-dev 2022-03-31 15:09:47 +00:00
Prabir Pradhan
603fea1fab Remove injectInputAfterTransactionsApplied from WMS
Since we already have IWindowManager#syncInputTransactions, we can
remove the need to have an input injection API in the window manager
interface.

Bug: 227356680
Test: presubmit
Change-Id: I730d05eec85978d8813e0924ddb4dba26922ea9f
2022-03-31 15:01:15 +00:00
Pratyush More
8791060f37 Merge "Enhance Javadoc for LocaleManager#setApplicationLocales." into tm-dev am: 530587fb9e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17408869

Change-Id: Ife7c93582c2eaa59f51546fe6a66af5431db5088
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 14:13:41 +00:00
Pratyush More
530587fb9e Merge "Enhance Javadoc for LocaleManager#setApplicationLocales." into tm-dev 2022-03-31 14:05:23 +00:00
Shivam Agrawal
39c6eaa64d Revert "Removing TaskFragment token from LaunchActivityItem"
This reverts commit 6dc124025d
in tm-dev. The revert is necessary because SplitController
needs to access the initial task fragment token from the
activity client to ensure that split info callbacks are sent
before an activity is created.

Test: existing tests pass
Bug: b/218791665
Change-Id: I7d6506312b46af026ec19e4aad9d0f31482e175a
2022-03-30 22:33:28 -04:00
Shan Huang
a9deabb5c5 Merge "Deprecate Activity#onBackPressed and Dialog#onBackPressed." into tm-dev am: 1b284d865f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17441814

Change-Id: I6a123c895c12ccaa26f38b3d1691df4f9e28b59b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 00:25:02 +00:00
Evan Rosky
c085e72051 Merge "Hook up shell-transitions screenshotting for recents" into tm-dev am: b4749ccefa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17360003

Change-Id: Idaf5c21e14b77f43966c79e89817ade70e555080
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 00:20:19 +00:00
Shan Huang
1b284d865f Merge "Deprecate Activity#onBackPressed and Dialog#onBackPressed." into tm-dev 2022-03-31 00:17:02 +00:00
Evan Rosky
b4749ccefa Merge "Hook up shell-transitions screenshotting for recents" into tm-dev 2022-03-30 23:52:15 +00:00
Hongwei Wang
b3319339d2 Merge "Handle PiP shadow radius in WMShell" into tm-dev am: b2a5b198cd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17456722

Change-Id: I8139bf9beecb75d27c12a27152bec007ae298735
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 22:26:41 +00:00
Evan Rosky
888f928f89 Merge "Add alternative to deprecated API" into tm-dev am: 353fe11e5d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17491115

Change-Id: I67e0dff83b226aaadcdbef2f9fea389324285b3b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 22:25:35 +00:00
Hongwei Wang
b2a5b198cd Merge "Handle PiP shadow radius in WMShell" into tm-dev 2022-03-30 22:23:51 +00:00
Evan Rosky
353fe11e5d Merge "Add alternative to deprecated API" into tm-dev 2022-03-30 22:23:05 +00:00
Evan Rosky
f0dfb84bcd Add alternative to deprecated API
Bug: 217742181
Test: N/A, just comment change
Change-Id: Icf995b30ff12fc65d6b7455bb18e92882ad9f58f
2022-03-30 20:15:45 +00:00
Lee Shombert
fdd45a5c80 Put a binder cache on DevicePolicyManager APIs
Bug: 190489030

Put a binder cache in front of IDevicePolicyManager APIs.  The
following APIs are cached:
 * getKeyguardDisabledFeatures()
 * hasDeviceOwner()
 * getProfileOwnerOrDeviceOwnerSupervisionComponent()
 * isOrganizationOwnedDeviceWithManagedProfile()
 * getDeviceOwnerOrganizationName()
 * getOrganizationNameForUser()
 * isNetworkLoggingEnabled()

The caches use a shared key which means that all are invalidated at
the same time.  This is slightly less efficient than API-specific
invalidation but it greatly simplifies the invalidation logic in the
server.  The cost of invalidating all caches at the same time is small
if invalidation happens infrequently (less than one an hour, on
average).

The test classes are modified to disable caches in the local process.

Test:
 * atest FrameworksServicesTests:DevicePolicyConstantsTest
 * atest FrameworksServicesTests:DevicePolicyEventLoggerTest
 * atest FrameworksServicesTests:DevicePolicyManagerServiceMigrationTest
 * atest FrameworksServicesTests:DevicePolicyManagerTest
 * atest FrameworksServicesTests:EnterpriseSpecificIdCalculatorTest
 * atest FrameworksServicesTests:OverlayPackagesProviderTest
 * atest FrameworksServicesTests:OwnersTest
 * atest FrameworksServicesTests:PolicyVersionUpgraderTest
 * atest FrameworksServicesTests:SecurityEventTest
 * atest FrameworksServicesTests:SystemUpdatePolicyTest
 * atest FrameworksServicesTests:TransferOwnershipMetadataManagerTest

Change-Id: Iead8644cb413b45f3b6f3da81ff00a61788941a2
2022-03-30 12:49:05 -07:00
Pratyush More
4aee00f85e Enhance Javadoc for LocaleManager#setApplicationLocales.
This is being done in response to developer feedback. See the
attached bug for more info.

Bug: 226407732
Test: Javadoc change
Change-Id: I4e15e75db695eec650836da17074b1a2aae0fd5d
2022-03-30 12:35:19 +00:00
Kathy Chen
692a603284 Merge "Remove oneway from IAmbientContextManager." into tm-dev am: 2816d09df5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17483833

Change-Id: I7c6c042f6a8213aac6809a7d2c7e7a181dc73a68
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 00:06:17 +00:00
Kathy Chen
2816d09df5 Merge "Remove oneway from IAmbientContextManager." into tm-dev 2022-03-29 23:51:04 +00:00
Austin Borger
f3dfe9fa66 Merge changes from topics "b124224342", "change_procstate_flag" into tm-dev am: 45081ab6a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16994323

Change-Id: Ifd340dfba8a24ea83678b8ce7359faa846bb7222
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 22:11:51 +00:00
Austin Borger
45081ab6a0 Merge changes from topics "b124224342", "change_procstate_flag" into tm-dev
* changes:
  Add new onUidProcAdjChanged callback to be consumed by the camera service.
  Modify UidRecord.CHANGE_PROCSTATE such that it behaves like a bit mask.
2022-03-29 21:52:36 +00:00
Kathy Chen
2efc9e5466 Remove oneway from IAmbientContextManager.
The AIDL interface is implemented by the system server. We need exceptions to propogate back to the calling app.

Test: cts test
Bug: 225108951
Change-Id: I0fcf58f3ecc204eb63644fa736b44f5a5b394be6
2022-03-29 13:09:03 -07:00
Kholoud Mohamed
2ca56df0db Merge changes from topic "cherrypicker-L96900000953714853:N25700001248135378"
* changes:
  RESTRICT AUTOMERGE move device policy resource APIs to a separate class
  RESTRICT AUTOMERGE hide device policy resources constants
2022-03-29 11:01:20 +00:00