2717 Commits

Author SHA1 Message Date
Amith Yamasani
34d41e9a85 Only simulate the first click if "Always use" button is available
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
2013-10-23 16:05:29 -07:00
Dianne Hackborn
237cefbcee Fix issue #11323037: Android apk incorrectly marked as running in app processes
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
2013-10-22 19:15:49 -07:00
John Spurlock
ae3349e1c3 Move the IME navigation guard view up to decor.
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
2013-10-18 18:41:22 -04:00
Jim Miller
e5f910a667 Fix issue where keyguard adds widgets before the system is ready
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
2013-10-16 19:42:34 -07:00
Dianne Hackborn
878deb3c7b Fix issue #11223335: APR: Lots of failures in procstats due to...
...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
2013-10-14 17:15:40 -07:00
Daniel Sandler
70966ec922 Easter egg cleanups.
Bug: 11171189
Bug: 10240151
Change-Id: Id5a8904bdf6c16302e09f2b48392f99c280a8179
2013-10-13 15:20:52 -04:00
John Spurlock
3bf26b6f2f Ensure fitSystemWindows is called on the IME at least once.
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
2013-10-11 13:16:23 -04:00
Adam Powell
ebd1dca5ea Merge "Re-enable ActionMenuPresenter view recycling" into klp-dev 2013-10-11 01:27:20 +00:00
Adam Powell
c3ca3ea3a9 Re-enable ActionMenuPresenter view recycling
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
2013-10-10 18:07:48 -07:00
Alan Viverette
c37db9c0de Merge "Fix layout and invalidate in SubtitleView" into klp-dev 2013-10-11 00:24:02 +00:00
John Spurlock
57beb3b5b3 IME navigation guard implemented as a View.
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
2013-10-10 12:54:05 -04:00
John Spurlock
65e911261d Merge "Allow IMEs to extend below nav bar, remove SystemUI veto." into klp-dev 2013-10-09 21:57:01 +00:00
John Spurlock
c68d577f29 Allow IMEs to extend below nav bar, remove SystemUI veto.
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
2013-10-09 16:23:15 -04:00
Alan Viverette
b8a0057d82 Fix layout and invalidate in SubtitleView
BUG: 11138745
Change-Id: If216dc1c68b6aaef3ad41ae30f488b140d4676d6
2013-10-08 17:24:58 -07:00
Brian Carlstrom
6c3baf12e0 Preload DexCaches
Bug: 11045348
Change-Id: Id27333652d4b3b9ace6c1cdf0566bf39bf0084ed
2013-10-08 17:11:17 -07:00
Alan Viverette
b89e969cef Merge "Fix font scaling issues in FastScroller and SubtitleView" into klp-dev 2013-10-04 22:04:00 +00:00
Alan Viverette
7b63063625 Fix font scaling issues in FastScroller and SubtitleView
BUG: 11080227
Change-Id: I0aa84e9b56c6900ad47efd45a5a0f772ce43f810
2013-10-04 11:44:51 -07:00
Adam Powell
8c5b15c628 Merge "Fix a bug in action menu measurement" into klp-dev 2013-10-04 01:29:34 +00:00
Adam Powell
da9710806b Fix a bug in action menu measurement
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
2013-10-03 18:21:58 -07:00
Chet Haase
167a32326e Fix lockscreen wave animation artifacts
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
2013-10-03 15:50:35 -07:00
Daniel Sandler
2fdb68b3c2 Goo goo ga joob.
Bug: 10240151
Change-Id: I7b702c397cb9f5ac3294ae27ffc6185df6a64678
2013-10-03 00:19:35 -04:00
Dianne Hackborn
164371fb75 Fix issue #11005453: [SUW] G+ profile creation for new user broken
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
2013-10-01 20:51:12 -07:00
Christopher Tate
b72b363c97 Specialized prompting when 'home' has become ambiguous
Bug 9958444

Change-Id: I050ae425e570cfc8ffd473587fb2a6127c36eeec
2013-10-01 13:32:13 -07:00
Dianne Hackborn
57d96f0e92 Merge "Fix issue #10948509: Crash in procstats when there is no data" into klp-dev 2013-09-30 00:21:48 +00:00
Dianne Hackborn
cb4285537b Fix issue #10948509: Crash in procstats when there is no data
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
2013-09-29 17:14:15 -07:00
Adam Powell
8fb6d97ad5 Merge "Add gravity settings to PopupWindow/ListPopupWindow/PopupMenu" into klp-dev 2013-09-27 00:46:10 +00:00
Chet Haase
033837dd6b Merge "Make fading transitions work better" into klp-dev 2013-09-27 00:26:22 +00:00
Adam Powell
54c94dea8a Add gravity settings to PopupWindow/ListPopupWindow/PopupMenu
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
2013-09-26 15:49:27 -07:00
Chet Haase
b7a7fc9d23 Make fading transitions work better
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
2013-09-26 13:38:12 -07:00
Jeff Sharkey
ee2f7df9ee Tighten flags enforcement, API to test Uris.
Check and throw if callers request invalid grant flags.  Add API to
test if a Uri is backend by a DocumentsProvider.

Bug: 10919391, 10935608
Change-Id: Ifa6afefb95983558c8c64dc15ddf650e9fe07080
2013-09-26 13:14:45 -07:00
Dianne Hackborn
66a9b2d739 Merge "Fix issue #10903002: com.facebook.katana keeps itself in A Services" into klp-dev 2013-09-25 23:04:50 +00:00
Jeff Sharkey
be17a61447 Merge "Require that persistable Uri permissions be taken." into klp-dev 2013-09-25 23:01:26 +00:00
Dianne Hackborn
cbd9a52f25 Fix issue #10903002: com.facebook.katana keeps itself in A Services
Now when memory low, if a service's process is above
a selected pss, then the process is not allowed to go
in to the service a list.

Also simplified the normal meminfo details dump to not
include the shared dirty and shared clean sizes by
default, since these can be very confusing.  You will
still get to see them with the "-a" flag.

Finally some small steps to better managing service
processes in the LRU list, so hopefully we can some
day be better about letting them drop down in the list
when there isn't really much interesting happening in
the process.  Not yet used at this point.

Change-Id: I654bfd6d05de2a63120185ebb15ffda8cbeb5dac
2013-09-25 15:45:56 -07:00
Jim Miller
04b0840b2e Merge "Accessibility improvements in keyguard - add accessibility descriptions to camera and search light - add new onClick handler to simplify launching search and camera - plumb camera launch through KeyguardService interface" into klp-dev 2013-09-25 22:41:26 +00:00
Alan Viverette
812b642641 Merge "Fix caption rendering" into klp-dev 2013-09-25 22:21:08 +00:00
Jeff Sharkey
e66c1778f8 Require that persistable Uri permissions be taken.
Change our Intent flag to indicate that a Uri permission grant is
persistable, but don't actually persist it until explicitly taken by
the receiving app.  This prevents apps from spamming each other if
persisted permissions aren't really required.

Remember the last time a persisted grant was taken by an app, and
use this to prune away the oldest grants when the number of grants
grows too large.  Allow apps to query persisted grants they are
holding, and allow them to release previously persisted grants. Add
public UriPermission class to return grant details and timestamp.

Track various permission strengths separately, and combine together
after each mutation pass.  Persistable grants are currently treated
like global grants, but they could be moved to have owners in the
future.  Require that grant holders trying to extend a persistable
permission actually hold a persistable permission themselves.

Bug: 10835779
Change-Id: I95b2f797c04ce7fd2612f9a644685dbd44e03759
2013-09-25 15:16:41 -07:00
Jim Miller
138f25d756 Accessibility improvements in keyguard
- add accessibility descriptions to camera and search light
- add new onClick handler to simplify launching search and camera
- plumb camera launch through KeyguardService interface

Fixes bug 10914360

Change-Id: Ic85eda9afadba7381be78b477180f7204030cd17
2013-09-25 15:01:19 -07:00
Alan Viverette
7fe420f31b Fix caption rendering
Fixed rendering of captions in regions and incorrect caption width
measurement. Removes minimum-difference line wrapping, since the
results weren't consistent with StaticLayout's rendering.

BUG: 10917766, 10822229
Change-Id: I55ef28cbf383fd6b945c0be62e440781288364f1
2013-09-25 12:35:00 -07:00
Jim Miller
e38c8e28ba Fix accessibility for all-caps items in keyguard
This fixes a bug where TTS on all-caps items doesn't work for
Buttons.  The fix is to use translation (ala. TextView.setAllCaps()),
which just affects rendering and not the original text string.

Fix bug 10912259

Change-Id: Id8cba927819c979fe699353219d45f8b0f9f5aac
2013-09-24 15:54:04 -07:00
Dianne Hackborn
6d8dfbd814 Fix issue #10848916: "Always" button is not working.
The problem was that the ResolverActivity filters some activities
out of the list it shows, but it uses that display list as the
list of components the preference is set against when ultimately
setting it on the package manager...  but that filtered list is *not*
the right component set, since it is not the same as the package
manager's view on it.

The fix here is to retain the original set of matching components
and use that when setting the preferred activity.  Note that this
does mean that in very unusual cases where filtering is happeing
(such as one of the activities not being exported but being seen
as a possible completion from another app), then you will be setting
the preference for the complete set.  Ultimately we probably need
to have the package manager apply these filtering rules up-front so
this is all consistent, but this is a very rare case so not that
important.

And then most of the change here is just improving the debug
output for intent resolution.

Change-Id: Ie35ac2c05a45946439951bbf41433c8b7de79c05
2013-09-24 14:16:38 -07:00
Chet Haase
d8d7c38533 Disable ActionBar usage of transitions
Various artifacts across apps were coming from ActionBar's use of
the new transitions framework. Disabling transitions for now to get
things back to a more stable state.

Also, fixed some related bugs in transitions themselves, including
a change in TextChange to account for text selection, which was causing
errors in Keep's SearchView.

Issue #10860557 TextChange animator may old stale value
Issue #10819685 sometimes icons are lighter
Issue #10750525 Share and Settings icons overlap when stopping slideshow
Issue #10839551 Sometimes the search text box is right-aligned in Keep
Issue #10727484 Cursor incorrectly positioned after entering first letter during search action in keep app

Change-Id: Iad7cbf3297e18018308b8148b3519b032e63dace
2013-09-23 14:49:39 -07:00
Jim Miller
af638c4f9d Merge "Add camera affordance to navigation bar on phones" into klp-dev 2013-09-20 01:33:28 +00:00
Jim Miller
caf24fc2c4 Add camera affordance to navigation bar on phones
This adds a camera button on phones that can be used to show
and launch the camera.

- Minor refactoring of touch event dispatch in PagedView.
- Disables usability hints when keyguard loads.
- Only add a touch handler for camera icon once during layout.
- Update after review.
- Updated with latest UX camera and camera background assets

Change-Id: I09cd5cb0e501fd0f4659bea96d00c92b07f805c4
2013-09-19 17:14:59 -07:00
Dianne Hackborn
3bc8f78d7a Implement issue #10691475: Kill cached processes if about to...
...be uncached and too large

When the device is in a low RAM state, when we go to pull a cached
process out to use for some background operation, we can now kill
the current process if we consider its size to be too large.

Note that the current implementation for killing processes is to
just use the same killUnneededProcessLocked() method that we already
have for other things like too many cached processes.  This is a
little wrong here, though, because in this case we are at the
point where the caller is actually looking for a process to use.
This current code is not actually removing or cleaning up the
process, so we still need to return the now killed ProcessRecord
and let things fall out from there, which typically means the caller
trying to make an IPC on it and failing and falling into its "oh
no the process died unexpectedly" path.  All code using this
*should* be able to handle this correctly, anyway, since processes
really can be killed at any time.

At some point we may to make this implementation cleaner, where it
actually tears down the process right in the call and returns a
null ProcessRecord.  That is very dangerous however (we'd need to
go through all paths into this to make sure they are going to be
okay with process state changing on them like that), and I'm not
sure it is really worthwhile.  This intention is that killing
processes like this is unusual, due to processes being too large,
and anyway as I wrote all of our incoming code paths must already
be able to handle the process being killed at this point and one
could argue this is just another way to excercise those code paths.
Really, the main negative to this is that we will often have spam
in the log with exceptions about processes dying unexpectedly.
If that is the only issue, we could just add some conditions to
quiet that up at in this case.

We don't want to compute the size of the process each time we try
to evaluate it here (it takes 10s or ms to do so), so there is now
a new field associated with the process to give us the last pss
size we computed for it while it was in the cached state.

To be able to have better cached pss data when we now need it, the
timing for computing process pss has been tuned to use a much
shorter delay for the situations when the process has first switch
into a new state.  This may result in us having a fair amount more
pss data overall, which is good, as long as it doesn't cause us to
be computing pss excessively and burning cpu.

Procstats now also has new state to keep track of the number of
times each process has been killed by this new system, along with
the min, avg, max pss of all the times it has happened.  This has
slightly changed the checkin format to include this additional data
at the end of pkgkills/prockills lines.

Other changes here:

- Fixed a problem where GPU RAM was not being seen when dumping
  the full RAM details of a process.  This was because in that
  case the system would ask the process to compute its own MemInfo,
  which it returned, but the process doesn't have permission to
  access the files containing the GPU RAM data.  So now the system
  always computes the MemInfo and hands it to the app.

- Improved broadcast delays to not apply the delay if the next receiver
  of the broadcast is going to run in the same process as the last
  one.  A situation I was seeing was an application that had two
  receivers, one of which started a service; we are better off letting
  the second receiver run while the service is running.

- Changed the alarm manager's TIME_TICK broadcast to be a foreground
  broadcast.  This really should have been anyway (it is supposed to
  go out even minute, on the minute, very accurately, for UI elements
  to update), and is even more important now that we are doing more
  things to delay background broadcasts.

- Reworked how we maintain the LRU process list.  It is now divided
  into the two parts, the top always containing the processes holding
  activities.  This better matches the semantics we want (always try
  to keep those around modulated by the LRU order we interleave with
  other cached processes), and we now know whether a process is being
  moved on the LRU list because of an activity operation so we can
  only change the order of these activity processes when user operations
  happen.  Further, this just makes that common code path a lot simpler
  and gets rid of all the old complexity that doesn't make sense any
  more.

Change-Id: I04933ec3931b96db70b2b6ac109c071698e124eb
2013-09-19 14:35:53 -07:00
Jim Miller
f429247867 Merge "Fix keyguard/Keystore storage issue" into klp-dev 2013-09-19 00:00:22 +00:00
Amith Yamasani
a6f387a055 Merge "Don't handle click if the resolver is already finishing." into klp-dev 2013-09-18 20:35:12 +00:00
Amith Yamasani
07cd351b4a Don't handle click if the resolver is already finishing.
Fixes bug that double tapping on an entry in the intent disambig dialog
can result in the picked activity being launched twice.

Bug: 10770501
Change-Id: Ibb7c6bea5f3c25fa204a2f0e65c8044c2a2549f7
2013-09-18 13:16:00 -07:00
Dianne Hackborn
222920c460 Merge "Maybe fix issue #10797796: IllegalStateException in ProcessState..." into klp-dev 2013-09-18 00:34:02 +00:00
Dianne Hackborn
53459a7020 Maybe fix issue #10797796: IllegalStateException in ProcessState...
...caused runtime restart

There were some situations where the package list could be set
with process stats when it shouldn't.  Not sure if this is causing
the problem, since there is no repro.

Also some improvements to debug output -- new commands to clear
all stats, print full details of stats, and print a one-day
summary (which should match what the UI shows).

Change-Id: I9581db4059d7bb094f79f2fe06c1ccff3e1a4e74
2013-09-17 17:30:34 -07:00
Adam Powell
70aafea91e Merge "Action bar transitions - handle expanding/collapsing action views" into klp-dev 2013-09-17 20:47:08 +00:00