2960 Commits

Author SHA1 Message Date
Alan Viverette
621e1e8493 Merge "Fix for reveal animated drawables" 2014-02-19 22:41:56 +00:00
Alan Viverette
7f610fed10 Fix for reveal animated drawables
Includes fixes for RevealDrawable clipping, touch feedback constant
state, and action bar background display lists.

BUG: 13065159
Change-Id: Ie4bf03f59da69047e18a8fe9233c3d24b0160576
2014-02-19 14:40:12 -08:00
Adam Lesinski
a78068e7a3 am 13c83996: am 1c532c2e: am 4b07b26e: Merge "Make UsbService optional" into klp-modular-dev
* commit '13c839962e246517a7a95326610ea30c529d79dc':
  Make UsbService optional
2014-02-19 19:48:05 +00:00
Adam Lesinski
1c532c2e2d am 4b07b26e: Merge "Make UsbService optional" into klp-modular-dev
* commit '4b07b26e8654df52ca80bb2165ebdf9352ab9337':
  Make UsbService optional
2014-02-19 19:41:26 +00:00
Alan Viverette
5314b3d593 Merge "Fix alert dialog's background when no custom panel visible" 2014-02-19 19:19:11 +00:00
Dianne Hackborn
b3f38c6398 Merge "Fix issue #13095629: Device is in restart mode for long time..." 2014-02-19 18:57:50 +00:00
Dianne Hackborn
00e2521d2a Fix issue #13095629: Device is in restart mode for long time...
...during taking OTA

Add some sanity checks.

Change-Id: I6bec1b8d8443c4b3c2a706635acf89c8e5051428
2014-02-19 10:49:24 -08:00
Alan Viverette
c3cf19af8d Fix alert dialog's background when no custom panel visible
Also some miscellaneous AlertController cleanup.

BUG: 13077576
Change-Id: I40f669f3a703a49fc53f482c2434b2993ed15326
2014-02-18 18:29:11 -08:00
Dianne Hackborn
dfc60ec523 Fix issue #13065185: Frequent runtime restarts on launching...
..."Hill Climb Racing" app

A service is in use when it is in the restarting state.

Change-Id: Ic92a6e7bcc24b01aeef5f97f994f105d5e11ea7f
2014-02-18 17:42:55 -08:00
Adam Lesinski
2cb6c60c0d Make UsbService optional
Tweaked the services Android.mk to build dependencies
when building with mm[m].

Change-Id: I6dad511c652bcacc085f27ede5f8f22a6982c6bd
2014-02-18 14:57:09 -08:00
Dianne Hackborn
ca1bf21c51 Implement wifi part of issue #12973036: Improve power_profile.xml
Add battery stats tracking of wifi state.

Also update when we retrieve the current time to use a more
consistent value across stats tracking.

Change-Id: I6a7c3efd58ff2c8ea86dac141c8f848e7996d63f
2014-02-18 14:43:14 -08:00
Paul Lawrence
a9f387bdf0 Merge "Support default, pattern, pin and password encryption types" 2014-02-14 15:25:01 +00:00
Jeff Brown
2811490455 am f75aaf02: am ae254a8d: am 3048191b: Remove onCreate() method that should not be there.
* commit 'f75aaf0282531f8e8448bfb1cbdfb239f683ae8b':
  Remove onCreate() method that should not be there.
2014-02-14 09:50:48 +00:00
Jeff Brown
ae254a8d71 am 3048191b: Remove onCreate() method that should not be there.
* commit '3048191b4cf9eff7a72b84065dec2b3dd1e89b3c':
  Remove onCreate() method that should not be there.
2014-02-14 09:14:15 +00:00
Jeff Brown
3048191b4c Remove onCreate() method that should not be there.
Change-Id: I8355dd78f910afa9895d2fa00cb627a0885d9eec
2014-02-13 23:26:59 -08:00
Dianne Hackborn
d39ccd0ad9 Merge "Start tracking radio up time." 2014-02-13 17:56:12 +00:00
Dianne Hackborn
e13c4c0b66 Start tracking radio up time.
We now always turn on network state tracking for mobile,
and push this information down to battery stats.

In battery stats we use this to both log the changes in
the history and keep track of the total time the mobile
radio was active.

Power computation is switched over to using this information
to help determine power use, which will hopefully make it
more accurate (not counting inaccuracies in knowing when it
actually goes down).

Note yet done is aggregating this data per-uid, to better
emphasize which apps are causing the radio to be up.  Right
now we just spread the total time across all uids weighted
by the total number of packets they have sent and received.

Also put in the battery stats infrastructure for bluetooth to
address issue #12973036: Improve power_profile.xml

Change-Id: I39d11b7ff6ae4f336f253d1cba308d8569de7e0d
2014-02-13 17:55:40 +00:00
Paul Lawrence
8e39736f91 Support default, pattern, pin and password encryption types
Java plumbing to expose methods to get/set encryption type in
IMountService, and hooking up of those methods to the Settings app
so the type is set correctly.

Needs matching vold changes from
 https://googleplex-android-review.googlesource.com/#/c/412649/

Bug: 8769627
Change-Id: I70c0ed72d11f5ab6f0958a7f9c101b6822b13baa
2014-02-13 15:46:24 +00:00
Dave Platt
2c7c0a8527 am 5137fa03: am 34cc9f90: am 53c7608a: am a3c3533b: Merge "Finish fixing Zygote descriptor leakage problem"
* commit '5137fa03c3e416c6f68c36f3ec922621853609b1':
  Finish fixing Zygote descriptor leakage problem
2014-02-13 01:11:41 +00:00
Dave Platt
34cc9f9056 am 53c7608a: am a3c3533b: Merge "Finish fixing Zygote descriptor leakage problem"
* commit '53c7608aefb0ed754394e571cac02e96ad6fcdb3':
  Finish fixing Zygote descriptor leakage problem
2014-02-12 23:10:36 +00:00
Christopher Tate
9d6376a1d8 Always call super.onCreate(). Always.
Bug 12991134

Change-Id: Ife16ef93408253e3318a06dc0206ab4b88c7f367
2014-02-12 13:15:46 -08:00
Jeff Brown
cab8617b8c am 25df673b: am 1b51c9cb: Merge "Make SystemService constructor take a Context." into klp-modular-dev
* commit '25df673b849de374cf1de40250dfd8a48b7ac28b':
  Make SystemService constructor take a Context.
2014-02-11 08:33:50 +00:00
Jeff Brown
25df673b84 am 1b51c9cb: Merge "Make SystemService constructor take a Context." into klp-modular-dev
* commit '1b51c9cb96fe2a0818289857a016521eed1ec183':
  Make SystemService constructor take a Context.
2014-02-11 08:18:34 +00:00
Jeff Brown
b880d880c6 Make SystemService constructor take a Context.
This change simplifies the process of initializing a SystemService
by folding the onCreate() step back into the constructor.  It removes
some ambuiguity about what work should happen in the constructor and
should make it possible for services to retain most of their final
fields after refactoring into the new pattern.

Change-Id: I25f41af0321bc01898658ab44b369f9c5d16800b
2014-02-10 20:01:43 -08:00
Dianne Hackborn
68ac5cef63 Merge "Battery stats: more events, fixes." 2014-02-07 21:56:45 +00:00
Dianne Hackborn
eaf2ac464b Battery stats: more events, fixes.
Add new history events for top application package and
foreground application packages.

Doing this involved a fair amount of improvement to history
events.  The event code is now separated out to have "start"
and "finish" identifies, and we use that to now keep track
of which events are active.  With that, when resetting the
stats, we can spit out all of the currently active events at
the front of the new history.

Also fixed some problems when I re-arranged the history delta
int bits that were conflicting with the packing of the battery
status bits.  These packing structures are changed to work
together correctly.

Change-Id: Ic8b815060dd8a50ff4a0a209efc2e1044215cd88
2014-02-07 13:45:01 -08:00
Adam Powell
6250c59e0d Merge "Refactoring of fitSystemWindows to applyWindowInsets for views" 2014-02-06 22:41:14 +00:00
Dave Platt
89d4c897a0 Finish fixing Zygote descriptor leakage problem
In order to prevent Zygote descriptors from leaking into the child
environment, they should be closed by the forked-off child process
before the child switches to the application UID.  These changes close
the descriptors via dup2(), substituting a descriptor open to
/dev/null in their place; this allows the Zygote Java code to close
the FileDescriptor objects cleanly.

This is a multi-project change: dalvik, art, libcore, frameworks/base,
and external/sepolicy are affected.  The CLs need to be approved
together, lest the build break or the software fail to boot.

Round 2: indent change

Bug: 12114500
Change-Id: I090402136a8a8b7d6aad6eb153026e85d7cf6ad3
2014-02-06 13:24:38 -08:00
Dianne Hackborn
6eb0fdb99b Merge "Improve logging of first wake lock, history size." 2014-02-06 00:41:49 +00:00
Dianne Hackborn
3d658bf20e Improve logging of first wake lock, history size.
We now try to have a better label for the first wake lock
that is acquired in the log.  This is done in two ways:

- The alarm manager now sorts the alarms it is going to
  execute so that wakeup alarms are first, which are more
  important w.r.t. which one should be logged.
- There is a new power manager facility to make a wake lock
  as "unimportant for logging," which just means in battery
  stats that a wake lock acquired after that can be considered
  the actual one to log.  This is only used by the alarm manager
  to mark its TIME_TICK alarms as unimportant for logging.

Also reworked the battery history code to be cleaner and a bit
smaller.  There is no longer a separate EVENT command, instead
the event code and tag are just another thing that can be included
in an UPDATE command.

The bits used in the first history int are also re-arrange, so
that only the ones that really change a fair amount in the state
bits are up at the top and there is no longer space used for
the command code (since now it is always just UPDATE).  This
allows us to have more room for the time delta at the bottom,
to better avoid situations where we need to write an int delta.

Change-Id: I1bb860ae5b558a248800b090b03a84fbf7acd68a
2014-02-05 16:40:51 -08:00
Adam Powell
46e38fd9ab Refactoring of fitSystemWindows to applyWindowInsets for views
Applying insets is now handled by:

* WindowInsets class - Encapsulate system insets and local decor
  insets into a single object, written specifically so that new inset
  categories may be added later. Apps cannot construct their own
  WindowInsets, only clone with optional modifications. This is to
  prevent losing data in the event of new insets added in the future.

* onApplyWindowInsets - Actually perform the application of insets.

* OnApplyWindowInsetsListener - Allow an app to use a separate
  Listener object to apply insets to a View. This allows for things
  like support lib integration in custom views written for older
  versions where the verifier would otherwise complain about the use
  of the new WindowInsets class as a method parameter. It also allows
  for applying insets in a custom way without writing a custom view.

* dispatchApplyWindowInsets - Dispatch the call to self and children
  in turn, if applicable. An OnApplyWindowInsetsListener will override
  the behavior of the view's default onApplyWindowInsets method; a
  listener wishing to call down to the 'superclass' implementation as
  part of its own operation should call view.onApplyWindowInsets. App
  code should generally not override this method and instead override
  onApplyWindowInsets or provide a listener.

Compatibility support with the existing fitSystemWindows method has
been provided in both directions: for code that previously called
fitSystemWindows on arbitrary views and also for code that overrode
the fitSystemWindows method in custom views. A view that supports the
newer onApplyWindowInsets mechanism should not mix that behavior with
other calls to fitSystemWindows or vice versa. Support lib-style code
should take care to consistently use one mechanism or the other at
runtime.

Change-Id: Ie88b96e0382beb5d3c3f6cd013f7043acbc0a105
2014-02-04 16:52:22 -08:00
Alan Viverette
8eea3ea559 Add APIs for obtaining themed Drawable from Theme, Context
BUG: 12611005
Change-Id: Ic0057be4e4c2d0c61ce02a019b3f7d0625e3a016
2014-02-03 18:42:24 -08:00
Dianne Hackborn
e8d916c04c Merge "More battery history improvements." 2014-02-03 21:32:33 +00:00
Dianne Hackborn
71fc13eb58 More battery history improvements.
- Better batching of history items.  Fixed problems where empty
  entries would be created because state toggles got lost.
- The string pool is now a HistoryTag pool, containing both a string
  and uid; now an entry only requires 16 bits in the history data.
- Acquiring the first wake lock also now includes a HistoryTag
  identifying who did the aquisition.
- Cleaned up printing of signal strengths and cell radio types.
- There was code that tried to allow you to add new history entries
  while iterating the history...  but these should never happen
  together, so turned that into a failure...  and fixed an issue
  where we could leave the battery stats in a state where it
  thinks it is continually iterating.

Change-Id: I1afa57ee2d66b186932c502dbdd633cdd4aed353
2014-02-03 10:58:50 -08:00
Narayan Kamath
dfd1aa4331 resolved conflicts for merge of 2cd0563c to klp-modular-dev-plus-aosp
Change-Id: Ia28df1c1aa084959ed9289bfe90e7f6a4bffb8a2
2014-01-31 12:57:24 +00:00
Brian Carlstrom
fdb98d4770 frameworks/base: Rename persist.sys.dalvik.vm.lib to allow new default
(cherry picked from commit c6c633608ad4cd77ed21227b0bdb11eb79797c31)

Bug: 12798969
Change-Id: Ibb7ed86867e4dca53ad7fe33326b08e6f5e664c4
2014-01-30 15:56:37 -08:00
Brian Carlstrom
c6c633608a frameworks/base: Rename persist.sys.dalvik.vm.lib to allow new default
Bug: 12798969
Change-Id: Ibb7ed86867e4dca53ad7fe33326b08e6f5e664c4
2014-01-30 13:16:48 -08:00
Dan Sandler
4d67c3a070 Merge "Fix NPE in empty SizeAdaptiveLayouts." 2014-01-29 17:26:32 +00:00
Dianne Hackborn
4a4cfbe7d8 Merge "Add "start time" timestamp to battery stats." 2014-01-28 01:00:22 +00:00
Christopher Tate
8b3e3ecc3d Update PackageMonitor to recognize new 'replacing' semantics
The ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE broadcast now uses the
EXTRA_REPLACING intent extra when it is sent as part of an upgrade operation
on a forward-locked application.  Update PackageMonitor to recognize this
new information and express it appropriately to the observer.

Bug 11988313

Change-Id: I34dfaa965dd322f4fa8945e7b83c9f2e8cf5269a
2014-01-27 11:38:45 -08:00
Dianne Hackborn
5f4a5f9536 Add "start time" timestamp to battery stats.
Change-Id: I902269b98b40b2421245bfd8971f34df5ff9214e
2014-01-24 17:27:02 -08:00
Dan Sandler
c7088da585 Fix NPE in empty SizeAdaptiveLayouts.
Change-Id: I8fa31a733d33d6deb04ad53a0772169277b363c8
2014-01-24 15:03:00 -05:00
Dianne Hackborn
8472e6189c Add app version codes to procstats.
Now the per-package proc stats data is also per-app-version-code.

In addition to changing the data structure to have one more
SparseArray and passing a version code all over, this also required
improving how we reset the stats so that we can prune a multi-package
process record back to a single package.  Otherwise, as you install
updates to apps, the proc stats data would continue to explode as
the data for each of those app's processes got turned to a
multi-package due to tracking the old and new versions at the
same time.

This also bumps the checkin version code, since the package entries
also include a new field for the app version code.

Change-Id: I80de36addb0a75c7b08aef747c6f6c8012d01ee4
2014-01-23 18:00:11 -08:00
Dianne Hackborn
39e79006cf Merge "Battery stats improvements." 2014-01-22 22:18:13 +00:00
Dianne Hackborn
099bc627c4 Battery stats improvements.
- Adjust total power use when there is unaccounted power so that our
  percentages don't end up > 100%.
- Fix accounting of isolated uids to be against the owning real app
  uids.
- Rework how we put cpu use into the battery stats to no longer need
  this uid name cache that can confuse the uid it is associated with.
- Finish implementing events in the history, adding a string pool and
  reading/writing/dumping them.
- Add first two events: processes starting and finishing.
- Fix alarm manager reporting of wakeup alarms to be adjusted by the
  WorkSource associated with the alarm, so they are blamed on the
  correct app.
- New "--history" dump option allows you to perform a checkin of
  only the history data.
- Fixed BitDescription bug that would cause incorrect printing of
  changes in some states.

Change-Id: Ifbdd0740132ed178033851c58f165adc0d50f716
2014-01-22 14:09:02 -08:00
Jeff Brown
509cc13b70 am e2c9cd58: Merge "Refactor display manager service to new pattern." into klp-modular-dev
* commit 'e2c9cd583f4f706b48270b8cbe84df627c69af24':
  Refactor display manager service to new pattern.
2014-01-18 01:53:32 +00:00
Jeff Brown
4ccb823a9f Refactor display manager service to new pattern.
Transform DisplayManagerService into a SystemService and start cleaning
up other local services that it uses from window manager and input manager.

Clean up service thread initialization.

Remove unnecessary static variables from ActivityManagerService.

It's starting to become clear that we really need a better way to manage
service dependencies.  Boot phases don't quite cut it.

Change-Id: If319dbd7cbfbd4812fe55ece969e818d4b20755b
2014-01-16 22:16:42 -08:00
Dianne Hackborn
520e705bf8 Merge "Whoops, we were counting everything twice in the totals. :(" 2014-01-17 00:21:22 +00:00
Dianne Hackborn
ae19a06e03 Whoops, we were counting everything twice in the totals. :(
Change-Id: Ia8a5adec4db7d692691b2d7e471c446f963a5c21
2014-01-16 16:18:23 -08:00
Jeff Brown
09d30981f8 resolved conflicts for merge of 6f357d32 to master
Change-Id: I1979e6ed1acddbe656f5010114fd900f10865e75
2014-01-16 11:44:20 -08:00