Due to an API change in LocalSocket, Zygote must now
manually close the FileDescriptor it created when it
registered a LocalServerSocket. The LocalSocket.close()
routine will no longer do so.
Bug: 12114500
(cherry picked from commit 70ef29b04ee4ef7d7acfec79041dbe800961195e)
Change-Id: Ief23a3c99e007dc4aa6f94dfb47a1b2b6c854dad
A previous fix introduced a problem with building content descriptions
for accessibility of the home/up button in one code path while setting
display options flags. Correct the issue and also refresh content
descriptions immediately when setting related attributes one at a
time.
Bug 11542264
Change-Id: I40d07036d1026e8e40c77c47ac377c82edd827b4
Hide disabled routes from the chooser.
Fix layout of chooser dialog when the settings button is visible and
the list is very long to prevent truncation of the settings button.
Fix an issue when we fake the route connecting status when a route
is selected. The route changed notification needs to be propagated
to apps. Fake it better.
Immediately disconnect from a route when the connection is lost or
a connection attempt fails. Added a few new test displays for this
case.
Bug: 11257292
Change-Id: I360ab5dc937ad60d97592eab54b19f034519645e
Port the new style UI back into the framework from the support library.
There are now two dialogs: a chooser and a controller. We use the
same dialogs for selecting routes within app and within quick settings.
Note that the new UI does not support any grouping features since they
are deprecated and unused.
Bug: 11257292
Change-Id: I64e936a18d25ab75f0c470cbc1e7085f67004863
This change adds a new media router service whose purpose is to track
global state information associated with media routes. This service
publishes routes to the media router instance in application processes
and handles requested state changes such as selecting or unselecting
global routes. The service also binds to remote display provider
services which can offer new remote display routes to the system.
Includes a test application for manually verifying certain aspects
of the operation of the media router service.
The remote display provider interface is essentially a stripped down
media route provider interface as defined in the support library
media router implementation. For now, it is designed to be used only
by first parties to publish remote display routes to the system so
it is not exposed as public API in the SDK. In the future, the remote
display provider interface will most likely be deprecated and replaced
with a more featureful media route provider interface for third
party integration, similar to what is in the support library today.
Further patch sets integrate these new capabilities into the System UI
and Settings for connecting remote displays.
Bug: 11257292
Change-Id: I31109f23f17b474d17534d0f5f4503e388b081c2
When I cleaned up how we maintained the lifecycle of the tracker with a
service, I broke most tracking of the service restart state. (Since at
that point the service is no longer associated with a process, so I
must clean up the tracker state). This change introduces a new special
case for interacting with a service tracker to explicitly tell it when
a service is being restarted. It also fixes how we update the process
state when services are attached to it, so it goes in and out of the
restarting state correctly.
In addition:
- Maybe fix issue #11224000 (APR: Dependent processes not getting added
to LRU list). We were not clearing ServiceRecord.app when bringing
down a service, so if for some reason there were still connections to
it at that point (which could happen for example for non-create bindings),
then we would so it when updating the LRU state of that client process.
- dumpsys procstats's package argument can now be a package or process
name, and we will dump all relevent information we can find about that
name.
- Generally improved the quality of the dumpsys procstats output with its
various options.
- Fixed a bug in ActivityManager.dumpPackageState() where it would hang if
the service was dumping too much, added meminfo to the set of things
dumped, and tweaked command line options to include more data.
- Added some more cleaning code to ActiveServices.killServices() to make
sure we clean out any restarting ServiceRecord entries when a process is
being force stopped.
- Re-arranged ActiveServices.killServices() to do the main killing of the
service first, to avoid some wtf() calls that could happen when removing
connections.
Bug: 11223338
Bug: 11224000
Change-Id: I5db28561c2c78aa43561e52256ff92c02311c56f
HSPA+ was being shown as connection type other in battery
statistics because it was not updated when TelephonyManager
was changed.
Bug: 11552902
Change-Id: I85ce7c393bf93010a4ac8437f14684015ad0391a
When opening a submenu from a popup in ActionMenuPresenter, delegate
the submenu callbacks to the presenter callback registered on the
ActionMenuPresenter. This allows menu visibility callbacks to
propagate properly so that apps that hide their action bars after a
timeout can detect open menus that are deeply nested.
Bug 11429613
Change-Id: I3332886f08d4f9010f0875057c457566301d12ec
Some stray code from a previous change caused an erroneous content
description to be set on the wrong view in the action bar. Correct
this and sync with the right behavior.
Bug 10969992
Change-Id: I4deaa3528b4bc222e25354679fa93f8316fa2d70
This prevents Keep from being selected automatically when shown in the Share dialog
if Keep was previously chosen by the user as Always use for a send action.
This was a regression introduced by the new intent disambig behavior.
Bug: 11294904
Change-Id: I6745060a8ee0a6d680e657b55ee46aaec27bbacb
The android package is now a special case, not being added to the package list
when creating a multi-process component. There is no need, since this package
is actually the framework itself which must be loaded in every process.
Also cleaned up some of the procstats dump output to help see what is going
on here.
Change-Id: If65d35ecd562f3154bdebfded69c454af6ce8c96
Although the IME windows are now allowed to extend into
the nav bar, some IMEs were making assumptions about
computed insets based on the height of the content view.
So our navigation bar view (opaque view blocking the nav bar
area to avoid the island effect when transparent) needs to live
above the content view in the hierarchy, making the content view
the same height as it was before.
A surgical spot to put the guard view is up at the root view
(PhoneWindow.DecorView). fitSystemWindows is always called since
this view is not recreated, and the layout is stable: waiting until
the IME is attached to the window is too late to add a guard view.
This is above the screen_* layouts, so will work without having to
touch all of them. And it only affects windows of TYPE_INPUT_METHOD.
Bug:11237795
Change-Id: I6a93f30aec83f1cecfb854073046cbc87ab4aa66
While under heavy system load, keyguard was able to create widgets before
before ActivityManagerService was ready. The result was a race
between keyguard adding widgets and ActivityManagerService being
ready to send broadcasts.
This fix provides keyguard with an additional signal to know when
the system is booted and widgets are safe to load.
Fixes bug b/11217169
Change-Id: I7a714d65b068678f961e52bdde4e1c20f9c287f0
...bad cleanup of crashing processes
We now have a special path for crashing processes, to silently
clean up their state.
Also some tweaks to Log/Slog.wtf to get better stack crawl
summaries in APR.
Change-Id: Ieced26989907a6e7615b6fa033813fced78d7474
InputMethodService will recreate the entire layout on config changes.
Until the system insets change again, the new instance will not
hear about the insets.
This change ensures fitSystemWindows is called at least once for all
input method root views that are added to a window.
Bug:11174545
Change-Id: Id0f02f32c0d6e9c2d6b6aeef74a12a13acfbb9e6
Since action bar transitions are turned off again for now, re-enabling
item view recycling fixes an unfortunate regression with submenus.
If a menu view is invalidated while a submenu is open we need to keep
its anchor consistent. With view recycling active we preserve status
quo and the previous anchor view instance for the popup window remains
in place.
In the future this will need to get more sophisticated;
ActionMenuPresenter will need to re-parent an open submenu against the
proper anchor view by menu item id. But that is a change for another
day.
Bug 11174504
Change-Id: I7e8a444f6996ec95417d20e87938f496e9c3a4dd
Instead of a custom onDraw in order to stay 100% in sync with abrupt
layout changes.
Also use the unrestricted layout bottom to avoid unnecessary
fitSystemWindows churn.
Bug:11162351
Change-Id: If9bb9a52d503e348d642bf1238f75c4a418ad805
Layout IMEs below the nav bar, offset by bottom padding and
associated guard rectangle with a black background to ensure
they do not appear as islands during transitions.
This makes it safe to remove the SystemUI forced opaque transition
when showing an IME, making the overall transition less expensive,
quicker and smoother overall.
Bug:11058746
Change-Id: I460912ee7c117480c57b947ed31eca330819f32c
Thanks to a measurement optimization in KK, the view recycling
behavior of ActionMenuPresenter could get into a state where the
resulting ActionMenuView had changed but no layout was
requested. Explicitly request a layout during menu update. Also fix an
ancient typo.
Bug 11047996
Change-Id: I6289fd2d142ac7d2101fbec6de19b7d3d7fbd6a2
On some display sizes, the wave animation was sometimes
running more than once, starting over in the center and animating
outward... partially.
The problem was that the calculations determining the alpha value
of the dots was returning bogus values when the display area was
large enough, which is why the bug is only on some devices.
This fix simplifies the math and ensures that the wave only animates
once, from start to finish.
Issue #11005936 regression on lockscreen animation for multi-wave widget
Change-Id: Id21a2e4d2271f01c82c4bc6e1f37d78e68b9b6e4
The main problem here was a mistake when turning a single process
structure to a multi-package-process structure with a common
process. When we cloned the original process state, if there were
any services already created for the process for that package, they
would be left with their process pointer still referencing the
original now common process instead of the package-specific process,
allowing the active counts to get bad. Now we switch any of those
processes over to the new package-specific process.
There was also another smaller issue with how ServiceRecord is
associated with a ServiceState -- we could be waiting for an
old ServiceRecord to be destroyed while at the same time creating
a new ServiceRecord for that same service class. These would share
the same ServiceState, so when the old record finally finished
destroying itself it would trample over whatever the new service
is doing.
This is fixed by changing the model to instead of using an "active"
reference count, we have an object identifying the current owner
of the ServiceState. Then when the old ServiceRecord is cleaning
up, we know if it is still the owner at that point.
Also some other small things along the way -- new Log.wtfStack()
method that is convenient, new suite of Slog.wtf methods, fixed
some services to use Slog.wtf when catching exceptions being
returned to the caller so that we actually know about them.
Change-Id: I75674ce38050b6423fd3c6f43d1be172b470741f
Not dealing with the case where there is a null list.
Also fixed some bugs I found while looking at this:
- When resetting the stats, we would use a newly computed time stamp
for the total durations rather than the one we used to reset the
proc/service entries. This would result in them being able to be
slightly > 100%.
- There was a bug in how we split a single process state into its
per-package representation, where we would but the cloned process
state into the new package's entry (instead of properly for its
own package entry), to be immediately overwritten by the new
process state we make for that package. This could result in
bad data for processes that have multiple packages.
- There was a bug in resetting service stats, where we wouldn't
update the overall run timestamp, allowing that time to sometimes
be > 100%.
- There was a bug in computing pss data for processes with multiple
packages, where the pss data was not distributed across all of the
activity per-package process states.
- There was a bug in computing the zram information that would cause
it to compute the wrong value, and then never be displayed.
Finally a little code refactoring so that ProcessState and ServiceState
can now share a common implementation for the table of duration values.
Change-Id: I5e0f4e9107829b81f395dad9419c33257b4f8902
Allow calling code to specify left/right/start/end gravity when
showing a popup attached to an anchor. This allows easy alignment of
either the right or left edges of the popup and anchor view.
Bug 10728401
Change-Id: Ie0844a04ea0576fa67b0972f5873aaa4c5b823f6
Previously, a Fade transition would only affect a view if its
parent hierarchy was not also affected between the start/end states.
This caused problems for views which were removed from their parents
between scenes when their parents' visibility also changed between those
scenes. The effect would be that the transition would fade the parent...
but the child would no longer be in that parent, so the user would just see the
child view blink out.
This fix ensure that views are faded appropriately by fading them
regardless the parent hierarchy; if a view is removed from its
parent, fade it out.
Additionally, if that view has not been removed from its parent, but
its parent is no longer parented *and* scene being
transitioned from is based on a layout resource file (and thus
the views are considered temporary after transitioning), then it is
removed from its parent to be faded out in the overlay.
Also, renamed TextChange to ChangeText to be more consistent with
other transition class names.
Change-Id: I4e0e7dfc9e9d95c7a4ca586534b6d204c4f3bae0