Removing the static dependency on guava reduces test compile time
by about 20 seconds on a Z840, thus substantially speeding up the
compile/test cycle.
Make FutureIntent public instead of package-private because it is
used directly by NetworkPolicyManagementServiceTest, which as of
this CL is now in a different package.
(cherry picked from commit 281a17c9580de5c9898be7d9654d428801976511)
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.NetworkPolicyManagerServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.net.NetworkStatsServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.NetworkManagementServiceTest # Already failing.
Bug: 31479480
Change-Id: Ifab32c9214e9caab71dbf93b3d3ca88df6f49636
This patch extracts into its own independent test a test sub-block looking
for a race condition when not waiting on handlers to become idle:
there is no way to prevent the race from not happening when looking for
it this way. This makes the test flakky.
This new independent test is tagged with @FlakkyTest(tolerance = 3).
Test: ConnectivityServiceTest passes, with higher probability.
Bug: 31479480
(cherry picked from commit c8c1027762d66c12c9c153ccbb8f80acdee8571c)
Change-Id: I3c702bd981ed80ed606be0fb52d61eb3d7195a6f
Test: ConnectivityServiceTest updated with test cases.
Test: Manually tested against att-wifi in B42.
Bug: 30222699
(cherry picked from commit be96da11ccb5dd500f920c3ba90d350857293b3d)
Change-Id: I90c0f97fe0e41de4059bceae7b56ab3a70145696
Adding freeform resizing to activities which require
a certain orientation. This is needed for e.g. ARC++.
Bug: 33267688
Test: runtest frameworks-services -c com.android.server.wm.TaskPositionerTests
Test: Visually on ARC++
Change-Id: If708c1602cb2ff464174389af4648ad767b0b079
- Use RemoteCallbackList for managing multiple callbacks
- Add unregisterNetworkScoreCache to the service interface
- Added NetworkScoreServiceTest
Test: runtest frameworks-services
Bug: 32913019
Change-Id: I16ca1682acca9cbe403812e520394688a026414b
IME targets are required to be below the IME windows and that wouldn't
be possible if the IME window is its own target which leads to issues
elsewhere in the code where that is expected to be the case.
Change-Id: I34a723ff4ce2519cd80e0eea0eaea04712b6cf8f
Fixes: 33336368
Test: bit FrameworksServicesTests:com.android.server.wm.WindowStateTests
The exact scheme for serializing parse results is left undefined, and
will be implemented in a follow-up change.
Also adds a unit test for this functionality.
Test: PackageParserTest
Bug: 30792387
Change-Id: I5be6a3f97b5688d0a1aa9e024e946d590ad92c13
Split systemReady() into 2 callbacks:
1) networkScoreAndNetworkManagementServiceReady - called when required
services are ready. NetworkPolicyManagerService starts its initialization
on the worker thread
2) systemReady - wait for phase (1) to finish so that the service is fully
initialized
NetworkPolicyManagerService is now prepared in parallel with
ConnectivityService and NetworkStatsService
Test: device boots without errors
Test: HostsideRestrictBackgroundNetworkTests and NetworkPolicyManagerServiceTest pass
Bug: 32315581
Change-Id: Ic9755ed096900247fa0bbb43f396d8bcb97ae6db
When the owner of a window token requests window manager to remove the
token, we were removing it from it's parent which orphaned the token
and all it's windows and prevented them from being accessed from calls
like forAllWindows(). This problem wasn't visible before as the token
windows would still be in the window list, so they can still be accessed
for the exit animation transition which eventually removes them.
We no longer remove tokens from their parent we when are asked to remove
them from the system. We just set WindowToken.setExiting() so the token
can be removed once all its windows are removed at the end of the exit
animation.
Also,
- In AppWindowToken.removeIfPossible() and Task.removeIfPossible(), call
removeImmediately() instead of parent.removeChild() to make sure the
token and its windows are properly clean-up and avoid orphaning if they
aren't.
- Added DisplayContent.reParentWindowToken() for changing the display a
window token is on which is different from DisplayContent.removeWindowToken
which prepares the token and it's windows to be removed from the system.
- Renamed WindowToken.explicit to WindowToken.mPersistOnEmpty which is
what it does.
Fixes: 33098800
Test: bit FrameworksServicesTests:com.android.server.wm.WindowTokenTests
Test: Make sure toast windows don't persist on screen.
Change-Id: I40e0e8832141514b614e79d8e95cd27f24e52366
Bug: 33349775
Test: most tests from NetworkPolicyManagerServiceTest passes (there are still
3 failures, but they're unrelated).
Change-Id: I291a2d8404ba540d9922e5de62f5224d2d9b9314
Location providers may erroneously return (0.0, 0.0) when they
fail to determine the device's location. These location updates
can be safely ignored since the chance of a user actually being
at these coordinates is quite low.
Bug: 31009261
Test: added TwilightServiceTest; both tests pass
Change-Id: Ie9d7d10f81ade9b0be10f98ed74978539efaa658
Added hidden pre condition codes for PO and DO provsioning.
Added hidden api checkProvisioningPreCondition, which returns codes
instead of boolean. Managed provisioning can use this to show
useful debug information and user facing error dialogs.
Test: All DevicePolicyManagerTest pass
Bug: 27467633
Change-Id: I7d2a79921bc3ac2e12d506629a35563fc7ff62bf
If there is an IME target make sure to return the IME windows next
to the IME target when processing WindowContainer.forAllWindows().
Several users of forAllWindows are expecting this to be the cases so
it is close to the visual order.
Test: bit FrameworksServicesTests:com.android.server.wm.DisplayContentTests
Test: bit FrameworksServicesTests:com.android.server.wm.WindowLayersControllerTests
Change-Id: I737f88ca607ab2694391419d0d38060c03b53840
This adds hostname, array of addresses, total count of IP addresses
and uid to the existing pipeline.
Currently ignores the new data it receives, further work will be
done in the subsequent CLs.
Test: for now just the benchmarking, in the future unit and CTS
Bug: 29748723
(cherry picked from commit 14c9d2d0df7fab2b0470c3c404f600d87d4f0f93)
Change-Id: I3941b8d6fc1dd578e2af6ed4d3c3d0a722c39918
- Display child windows of the current IME target above the IME.
- Display app windows above the current IME target above the IME.
Regression in the functionality was introduce in
I6f8bf15ba246fac69c4a496ebb1d9e0b9b6a95a2 when we switch away from using
the window list for z-ordering and using the hierarchy which has the IME
above all app windows.
Change-Id: I399aab7fd5ad7327ef6bc29d48f6d9bf48a6ac6c
Fixes: 33128382
Test: bit FrameworksServicesTests:com.android.server.wm.WindowLayersControllerTests
Test that requested signature|privileged permissions are granted to all privileged apps.
If the mode is enforcing, also make sure permissions are whitelisted.
Test: test passes
Bug: 31008485
Change-Id: Id7f007a79477c46f40c12765873c563df6bc92cf
Previously, even floating shortcuts (pinned but not dynamic nor
manifest) had target activities. Now we're going to allow headless
apps to have pinned shortcuts, in which cases shortcuts won't have
target activities, let's just always remove target activities
from floating shortcuts.
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
... to Test8.
Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsShortcutManagerTestCases
Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsShortcutHostTestCases
Change-Id: I10e5b87338cafb90e6566b3526f892c5330c73e9
Necessary for when this will eventually trigger an Activity.
New unit test file for NotificationServiceManager.
Test: runtest systemui-notification (cts tests in separate CL)
Change-Id: I8f3e8e34ddcebb1acb9ddd84bffc68affb4b6e89
The Profile Owner of a managed profile can set a string that will be
shown in the UI to identify the organization managing the profile.
This CL extends the functionality to the Device Owner of a managed
device.
Bug: 32692748
Test: DevicePolicyManagerTest unit test + CTS test in separate CL
Change-Id: I47295da2fd6485ebf0e890da13990a044accaf17