The initial design that accepted a Collection<Uri> for notifyChange()
simply looped over the collection once inside the system_server, which
was offered a great initial performance improvement.
However, there were still inefficiencies in how we validated
ContentProvider access, dispatched sync adapter changes, and
invalidated internal caches. This change optimizes those operations
by performing them only once per (authority, userId) tuple, and by
caching the getProviderPackageName() answer. Local tests show that
this change roughly doubles the speed.
Before this CL:
notifyInsert count=50 duration=5958061219ns average=119ms
notifyUpdate count=50 duration=5696640780ns average=113ms
notifyDelete count=50 duration=4344581840ns average=86ms
After this CL:
notifyInsert count=50 duration=3287114546ns average=65ms
notifyUpdate count=50 duration=3103146196ns average=62ms
notifyDelete count=50 duration=2033265671ns average=40ms
Bug: 144464323
Test: atest CtsDatabaseTestCases
Test: atest CtsContentTestCases:android.content.cts.ContentResolverTest
Test: atest FrameworksServicesTests:com.android.server.content.ObserverNodeTest
Test: atest com.android.providers.media.client.PerformanceTest#testBulk
Change-Id: Idfda019fcc123ee7118b1856a8ff7332a17b5ef9
Text toasts don't currently support multi-user. This CL prepares toasts
for multi-user by wiring the user information from who requested the
toast (in the form of uid) to ToastUI, where text toasts are actually
rendered.
We go only as far as obtaining a new user-specific context for that user
and using that to construct the view. Actual support will come in future
CLs.
Bug: 151414297
Test: atest android.widget.cts29.ToastTest android.widget.cts.ToastTest
ToastWindowTest ToastUITest NotificationManagerServiceTest
LegacyToastTest
Change-Id: I8c92453c6a2b73c31f9a41ca9ff463d194d4f44f
This just a rename with no functional changes at all. It is
preparation for supporting getting the NAT64 prefix from the
RA.
Bug: 150648313
Test: covered by existing ConnectivityServiceTest and Nat464XlatTest
Merged-In: Ia9a09a708870827b1e4cf068f930fa9542dd116c
Change-Id: Ia9a09a708870827b1e4cf068f930fa9542dd116c
* changes:
Ensure that loading packages can be extended
Allow non-user packages to be kept in the use data list
Allow PackageDexUsage to record code paths not used by others
Remove support for PackageDexUsage version 1
With 465b1e1, only root tasks are allowed to be organized. Therefore,
the direct children of organized tasks are no longer evaluated as
organized.
Do not set bounds to the children of organized tasks, and just follow
organized tasks to resize accordingly.
Bug: 152619437
Test: drag divider in split-screen
Change-Id: Icf84d3817b8cd506af49e54475f78eb001319d78
A undefined windowing mode prevented from reusing the
candidate task while cold start an activity into
split-screen from Recents.
Use windowing mode from its parent for always-create-stack
check if undefined.
Bug: 152408408
Test: atest TaskDisplayAreaTests
Test: cold start to enter split-screen
Change-Id: Ie0f5b69c9d09ad517b749827dbf2a5e7297b1075
The library has been deprecated since circa 2013. It has also been broken on Android Q, i.e. any app that actually attempts to use it at runtime would crash.
Stop shipping the library in R, and ignore any uses-library for the library.
Test: manual, atest
Bug: 148920069
Change-Id: I3d9db099200955204dfdc67c3457f74d759b454e
Merged-In: I3d9db099200955204dfdc67c3457f74d759b454e
Exempt-From-Owner-Approval: +1 by narayan@ on previous patch
(cherry picked from commit 8ce94b1ef2)
- If the task is previously not visible or has no visible children at
the point when we start controlling it in the task org, hide the task
until we send taskAppeared to ensure that the task org can reparent
and show it otherwise we could see a flash of the task.
This happens mainly from two cases:
- when starting a new task with a given win mode, we show it and wait
for first draw before notifying the task org
- when transitioning into pip from swipe up, the activity is hidden
and when it requests to enter pip is made visible again
Since we are hiding the task w/ the pending transaction, we also need
to defer all task org callbacks until that's applied to ensure proper
lifecycle of the calls.
- Also skip app transitions for task org tasks for now
Bug: 152809695
Bug: 152134460
Test: Open a bubble, ensure that we don't see the task in fullscreen
first. Enter pip, ensure that we don't see flash of the task
before SysUI can fade it in.
Test: atest PipAnimationControllerTest
Test: atest TaskOrganizerTests
Test: atest SplitScreenTests
Change-Id: If51e98cd007faef35e99acd31b27b20eebbea010
WindowState overrides the isAnimating call. A new base method was added
to handle specific animation types, but the WindowState class was still
overriding the old isAnimating call. Therefore, the check for insets
provider was not handled.
Test: NexusLauncherTests
Fixes: 152657145
Change-Id: I32f5469fa992adb712779a6cb961bd3a1b44a227
The check isAnimating is used in a lot of places to determine if the
apps can hide, show, removed, etc. However, we don't always want to
check if any animation is running, just if a specific animation.
This change adds a new method that allows the caller to check if
isAnmating but ignore certain animationTypes.
This is specifically needed for ScreenRotationAnimation refactor to
ensure we can ignore screen rotation animation when checking
isAnimating. Otherwise, screen rotation will block hiding closing apps
if rotation occurs at the same time.
Test: WindowContainerTests
Bug: 152333373
Bug: 149490428
Change-Id: I922e3a5698f5db4dcc819a59ebfde2cd0301d7d2
Allow WindowManager to get display position from DisplayManager. This
will allow display animations to work since we need to know the initial
position of the display to correctly handle animations
Test: LogicalDisplayTest
Bug: 149490428
Change-Id: I5de2495982294ffa0437d8e87a43bf1d2fd0d86a
heapDump() is used to collect process heaps via "am dumpheap <pid>". It is
alternative to "dumpsys meminfo" and would hang if called on a frozen
process. In this patch:
- disable freezer before the binder transaction to collect heap data
- install a man-in-the-middle callback to handle completion of
collection. The new callback will invoke the original one from the client
and then enable the freezer again.
Change-Id: I43f501a88a7325d1bd2b3d1c6eb4a4d03b97a691
Test: am dumpheap <frozen process pid>
Bug: 151225245
Replaces the references to DisplayContent#mTaskContainers field with
iteration over all child task containers where necessary.
This does not change the behavior for the regular non-foldable
devices, since they would normally have only one task display area,
so iterating throught the list is logically equivalent to referencing
it directly.
Bug: 152116619
Test: WM CTS and unit tests
Change-Id: Ibc1b18ad4c06236e944abd49089672105506ec2c
Some builds may not have secure ADB (ro.secure.adb=1) enabled; however,
they should still be able to use Test Harness Mode. This enables those
builds to enable Test Harness Mode even if they're running the baked-in
ADB keys and/or they don't require keys at all.
Bug: 150721793
Change-Id: If095c379f70a6ca7b0cf3be8b30dfa43b85633e3
Merged-In: If095c379f70a6ca7b0cf3be8b30dfa43b85633e3
(cherry picked from commit af45921344)