This will be used to let the application thread
know whether or not to block for network rules to
be updated when coming to the foreground.
Bug: 226299593
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I9bff481a0026fb57af8dbee580e617c8410f9ebe
We disable these four test cases temporarily from presubmit.
We will add back after fixing test fail.
Bug: 225076204
Test: atest CtsVoiceInteractionTestCases
Change-Id: I0cdc92cb37db305df75947502e3569bfc38795a3
The input injection mode for pointer events in sendPointerSync() was
accidentally changed to WAIT_FOR_RESULT instead of WAIT_FOR_FINISH in
ag/17506923, causing test failures. Change it back to WAIT_FOR_FINISH.
Bug: 228203157
Bug: 228201593
Test: atest HoverTest
Change-Id: I2d3a77621290509d5be6279ee450e1881bd9d84d
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
Don't use the notification ID to determine if it's being
canceled or not.
Bug: 203105544
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: I0ddcb7de57800c5f8b69100353ba7f71157a5448
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
Test: m -j update-api. Build and flash and test back behavior throughout
the system.
Bug: 227500290
Change-Id: Ibdb13d02e044741d05d99f1cad96e43dc0129fe4
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
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
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
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
This is being done in response to developer feedback. See the
attached bug for more info.
Bug: 226407732
Test: Javadoc change
Change-Id: I4e15e75db695eec650836da17074b1a2aae0fd5d
* changes:
Add new onUidProcAdjChanged callback to be consumed by the camera service.
Modify UidRecord.CHANGE_PROCSTATE such that it behaves like a bit mask.
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
service.
The camera service needs to know when individual process oom adj scores
are changed in order to address bug #124224342. When two separate
processes are displayed in split screen and focus is switched between
them, both proc states will remain the same while their oom scores
change. This is a problem if both have access to the camera - we want
only one owner of the camera stream at any given time and for the app
in focus to be the one to own it.
This patch adds a new IUidObserver registration level for individual
process oom score changes. In addition a new callback has been added to
IUidObserver to track these changes.
Change-Id: I68d964f474d20f819f54b614a4e314ce00aac8fb
Bug: 124224342
Test: -- ActivityManagerServiceTest
-- ActivityManagerProcessStateTest
-- ActivityManagerFgsBgStartTest
-- UidObserverControllerTest
-- NetworkPolicyManagerServiceTest
-- ShortcutManagerTest2
-- HintManagerServiceTest
-- VibrationSettingsTest
-- CameraEvictionTest#testCamera2AccessCallbackInSplitMode (x100)
Deprecate also the shadow radius for PiP in Task
Bug: 206508708
Test: Verify the PiP enter/exit/move/resize transitions
Change-Id: I8ff83dd4e626a3455373fed6c908cf131ecae8fe
WifiSsidPolicy is parcelable, so there is no need to marshall it
explicitly as a deny- or allow-list using separate getters and
setters.
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
test: atest WifiSsidRestrictionTest
Bug: 218495535
Change-Id: Iee06acb6b136766fb16cef2d60a46bd7373b5c56
Make direct children of a created-by-organizer task organizable.
Add a single-top root task which the split divider bar can attach to. So
we can remove the special logic of the divider bar z-ordering in the
followup patch.
Bug: 207185041
Fix: 215322621
Test: atest ZOrderingTests
Test: atest com.android.wm.shell.splitscreen
Test: manual check the divider bar z-order setup with pip window and
assistant voice plate
Change-Id: Ia36d7529ef52685be4516b6f6ea5d7179fc26fd6