8974 Commits

Author SHA1 Message Date
Dianne Hackborn
1ebccf531d Fix problems with determining when to kill apps for wake usage.
Also improve debug printing of various times.

Change-Id: Ifcc288fd1bcbf44c069875ba97925b9e7ffe9a48
2010-08-15 17:27:29 -07:00
Dianne Hackborn
9adb9c3b10 Various battery info things:
- Now track wake locks in battery history.
- Now track sensors in battery history.
- Some filtering of sensory data.
- Fixes to some data that wasn't cleared when resetting battery stats.
- Print amount discharged since last charge.

And the big part -- keep track of wake locks held per process,
and kill processes that hold wake locks too much while they are in
the background.  This includes information in the battery stats
about the process being killed, which will be available to the
developer if the app is reported.

Change-Id: I97202e94d00aafe0526ba2db74a03212e7539c54
2010-08-13 15:17:49 -07:00
Wu-cheng Li
699fe93979 Improve camera documentation.
Change-Id: I3c9e5e6de5ce64b8d7d892483930238fa9cc247c
2010-08-12 14:00:14 -07:00
Jeff Brown
92ff1dd835 Fix ViewRoot bug attempting to finish synthetic KeyEvents.
Bug: 2834068
Change-Id: I34ee0c4479cee36b25a2c3e1cdf5d761b663ac1e
2010-08-11 16:18:13 -07:00
Jeff Brown
95af0c14a6 Merge "Add support for the PointerLocation overlay." into gingerbread 2010-08-11 16:15:48 -07:00
Jeff Brown
a41ca77fab Add support for the PointerLocation overlay.
This change involves adding a new method to IWindowManager,
monitorInput() that returns an InputChannel to receive a copy of all
input that is dispatched to applications.  The caller must have
the READ_INPUT_STATE permission to make this request (similar to
other window manager methods such as getKeycodeState).

Change-Id: Icd14d810174a5b2928671ef16de73af88302aea0
2010-08-11 14:46:32 -07:00
Kenny Root
a02b8b05dd Move OBB file reading to DefaultContainerService
The system_server shouldn't touch files on the SD card. This change
moves the things that touch the SD card out to the
DefaultContainerService so that it will get killed if the SD card goes
away instead of the system_server.

Change-Id: I0aefa085be4b194768527195532ee6dddc801cfc
2010-08-11 11:20:53 -07:00
Patrick Scott
9902196f98 Fix npe in getCacheTotalSize.
Bug: 2882277
Change-Id: I9319a48e0ed75561d3d04691fb288f69d11edc84
2010-08-11 09:48:43 -04:00
Dianne Hackborn
08d5b8fad8 More native work.
Implement save/restore of state, and add native APIs for
configuration information.

Change-Id: I2a3ddc2ba605db58d7c8b2b31b9215fb323f90b5
2010-08-11 00:29:59 -07:00
Konstantin Lopyrev
91a7f5fef8 Making sure that the prefix is handled properly.
Change-Id: Ic50327b1ed4d6b54753b5b3887508a53cd7a3497
2010-08-10 18:54:54 -07:00
Adam Powell
224ab9a5c6 Merge "Fix public bug http://code.google.com/p/android/issues/detail?id=10067" into gingerbread 2010-08-10 17:52:15 -07:00
Adam Powell
9bccdb7d5c Fix public bug http://code.google.com/p/android/issues/detail?id=10067
Change-Id: I7b7a9a32e82fc7541beabe286b20b01f39406cc8
2010-08-10 17:50:11 -07:00
Konstantin Lopyrev
f39d5987b9 Merge "Categorizing exported view properties." into gingerbread 2010-08-10 17:48:27 -07:00
Konstantin Lopyrev
bea95162ca Categorizing exported view properties.
Change-Id: I79c42019836973d80662c21d195d088ae01537a0
2010-08-10 17:45:03 -07:00
Jeff Brown
c3fc2d03d5 Fix safe mode and KeyEvent.getMaxKeyCode().
Bug: 2901731
Change-Id: I78617c1b9dee3790fc590e5af4b5083368873184
2010-08-10 16:28:03 -07:00
Jeff Brown
d98d0fc6e9 Merge "Optimize VelocityTracker to run in linear time." into gingerbread 2010-08-10 16:26:56 -07:00
Jeff Brown
88cf2fca38 Optimize VelocityTracker to run in linear time.
Uses a linked list for efficient pointer addition and removal.
When possible, makes use of the fact that pointer ids are usually in
sorted order to avoid quadratic time lookups when adding new data.
Fixed an incorrect assumption that the pointer count would always change
when old pointers were removed.

Also fixed a bug in InputQueue FinishedCallback recycling.

Change-Id: Ie048d3bb022d39cf4185e2fe43923a861d94c4f3
2010-08-09 18:50:35 -07:00
Jaikumar Ganesh
745d1e9058 Merge "Update javadoc for the API and change return of getBondedDevices()." into gingerbread 2010-08-09 17:30:25 -07:00
Konstantin Lopyrev
63cca69157 Merge "Make sure profiling is done only for views that are actually measured, laid out and drawn." into gingerbread 2010-08-09 17:02:39 -07:00
Jaikumar Ganesh
fec86f4aa2 Update javadoc for the API and change return of getBondedDevices().
getBondedDevices() *might* work if called before the Bluetooth
State intent is broadcasted. However, this can cause ANRs and problems.
This API was updated to return null, if called before the intent
is received. However, this might cause existing apps to crash. Return
an empty set instead.

Change-Id: Ibc484d3394aa0bbebd651221efde6a7015ce7110
2010-08-09 17:01:21 -07:00
Jaikumar Ganesh
cbaef51847 Merge "Check whether Bluetooth is enabled before making any API calls." into gingerbread 2010-08-09 13:50:28 -07:00
Jaikumar Ganesh
f5ff170be1 Check whether Bluetooth is enabled before making any API calls.
For example, Settings app makes calls to get Bonded Devices
before Bluetooth is on. This leads to ANRs and will
prevent autoconnection.

Change-Id: I56748a9bd1d603b5782c17775c6b20b831bf6572
2010-08-09 13:49:40 -07:00
Dan Egnor
799f2bb041 am b37bca9e: Merge "COMMENT ONLY change to fix some formatting glitches and (more importantly) clarify issues surrounding removed accounts." into froyo
Merge commit 'b37bca9e79489a1abd848ce762bb7d87203b3414' into gingerbread

* commit 'b37bca9e79489a1abd848ce762bb7d87203b3414':
  COMMENT ONLY change to fix some formatting glitches and
2010-08-06 18:55:05 -07:00
Dan Egnor
b37bca9e79 Merge "COMMENT ONLY change to fix some formatting glitches and (more importantly) clarify issues surrounding removed accounts." into froyo 2010-08-06 16:39:02 -07:00
Konstantin Lopyrev
c6dc45700b Make sure profiling is done only for views that are actually measured, laid out and drawn.
Change-Id: I88c66e882be2781d079c51b6580a19c4e359c5b1
2010-08-06 15:41:33 -07:00
Steve Howard
9fbf00cb04 Merge "Slight improvement (hopefully) to orientation sensing." into gingerbread 2010-08-06 14:28:37 -07:00
Steve Howard
8e15afe799 Make downloads visible by default.
Change-Id: I8f8b325658d8afc964bddd3f1c03ed20e6bd10aa
2010-08-06 11:06:49 -07:00
Chung-yih Wang
7324489f18 Merge "Add SIP service into system server." into gingerbread 2010-08-05 19:35:45 -07:00
Adam Powell
9093717985 Merge "DO NOT MERGE Fix a bug that could cause flings to last too long using a Scroller" into froyo 2010-08-05 18:33:31 -07:00
Steve Howard
5f531ae6b3 Slight improvement (hopefully) to orientation sensing.
Since orientation sensing has been an issue for numerous users, I
decided a spend a little time experimenting with some possible
improvements.  I've settled on a couple major changes:

* Perform all lowpass filtering in spherical coordinates, not
  cartesian.  Since the rotations are what we're really concerned
  with, this makes more sense and gives more consistent results.

* Introduce a system of tracking "distrust" in the current data, based
  on external acceleration and on tilt.  The basic idea is after a
  signal of unreliable data -- repeated acceleration or
  nearly-horizontal tilt -- we wait for things to "stabilize" for some
  number of ticks before we start trusting the data again.  This is an
  extension of the basic lowpass filtering.  One simple example is
  after the phone is picked up off a table, we ignore the first few
  readings.  Another example is while the phone is under external
  acceleration for a while (i.e. in a car mount on a rough road), if a
  single "good" reading comes in, we distrust it, under the assumption
  that it was probably just a lucky reading (i.e. the magnitude
  happened to be close to that of gravity by chance).

These changes have allowed me to relax other constraints, such as the
filtering time constants, the maximum deviation from gravity, and the
max tilt before we start distrusting data.

The net effect is that orientation changes happen more quickly and can
happen under a wider variety of conditions, but false changes due to
tilt and acceleration are still avoided well.  I think the improvement
is subtle, but it's the best I've come up with in my limited time.

I've also included some refactoring and additonal comments to try and
further clarify the (somewhat twisted) logic.

Change-Id: I34c7297bd2061fae8317ffefd32a85c7538a3efb
2010-08-05 18:26:03 -07:00
Fred Quintana
5005a6c031 am cdf16787: Merge "Changed SyncOperation.toKey() to not rely on the implementation of Account.toString()" into froyo
Merge commit 'cdf16787fc1234b7f21a9cddc6f8a27b4056bc39' into gingerbread

* commit 'cdf16787fc1234b7f21a9cddc6f8a27b4056bc39':
  Changed SyncOperation.toKey() to not rely on the implementation of
2010-08-05 17:42:05 -07:00
Chung-yih Wang
2d94231ef9 Add SIP service into system server.
Change-Id: Icc39e4e54768cfdcc1b20a3efe6206009b9a8d10
2010-08-06 08:40:50 +08:00
Fred Quintana
cdf16787fc Merge "Changed SyncOperation.toKey() to not rely on the implementation of Account.toString()" into froyo 2010-08-05 17:36:27 -07:00
Fred Quintana
b4b7b4837b Changed SyncOperation.toKey() to not rely on the implementation of
Account.toString()

bug: 2898033
Change-Id: I6bfac976127190d2d667312df7aa9c7d57b21555
2010-08-05 17:26:58 -07:00
Adam Powell
a55191fe8f DO NOT MERGE Fix a bug that could cause flings to last too long using a Scroller
Change-Id: Ia176cdb029201dbad193d2d213d3cf6e16fbee63
2010-08-05 15:50:31 -07:00
Scott Main
307351a22d fix xml sample error
Change-Id: Ifd188a5866382a79c2c9de94c0682b707baffdcf
2010-08-05 15:44:26 -07:00
Brian Carlstrom
3c7c351a62 Tracking merge of dalvik-dev to gingerbread
git cherry-pick --no-commit f77cf7f0
git cherry-pick --no-commit c8f503b5285e30c1a881d0ba860ba9021f57d113
git cherry-pick --no-commit 570bb561
git cherry-pick --no-commit e2417541
git cherry-pick --no-commit e4d81f25bd4dc1a5c909b56ab56a56406290da30
git cherry-pick --no-commit 5e8a587d

Change-Id: I101a385d43f3e0f4ce5352217f92ef67a3908c88
2010-08-04 23:47:38 -07:00
Daniel Sandler
9b87770f53 Merge "Fix crash when startForeground posts a broken Notification." into gingerbread 2010-08-04 20:33:32 -07:00
Scott Main
97c2d840a1 am 8dd87ad9: fix some doc errors in the resources; add link to resource docs for ColorStateList class
Merge commit '8dd87ad9440bc63bc312b06f292adcd2642b1c41' into gingerbread

* commit '8dd87ad9440bc63bc312b06f292adcd2642b1c41':
  fix some doc errors in the resources;
2010-08-04 18:02:25 -07:00
Scott Main
8dd87ad944 fix some doc errors in the resources;
add link to resource docs for ColorStateList class

Change-Id: I7f59bfd136d5bd3c2ea066b6123ee13ccd57f502
2010-08-04 17:33:33 -07:00
Kenny Root
deb112674e Only allow one movePackage operation in-flight
When a movePackage operation is requested, don't allow multiple requests
to pile up for one package. Once a move is completed, an observer will
receive the message and be allowed to call movePackage again.

Change-Id: Ie3842b6d96446febc0037bf9b8f1ca250735edc2
2010-08-04 08:44:31 -07:00
Daniel Sandler
d0a2f86f35 Fix crash when startForeground posts a broken Notification.
The NotificationManager tries to crash the calling app, but
in the case of a service calling startForeground, the caller
is the ActivityManager, so system_server goes down.

NotificationManagerService#enqueueNotificationInternal is a
new internal-only method that accepts a UID/PID to use when
punishing bogus notifications (such as the one in
http://b/2869787).

Change-Id: I84a9854bae630bc90288cebb94f174809d5dac8c
2010-08-04 10:52:51 -04:00
Chris Tate
5d46ce24cc Merge "Enhanced VelocityTracker for > 5 pointers and fixed bugs." into gingerbread 2010-08-03 12:22:50 -07:00
Konstantin Lopyrev
6fcf3a5185 Merge "Improving profiling of views." into gingerbread 2010-08-03 11:24:23 -07:00
Konstantin Lopyrev
f8e1219cf8 Improving profiling of views.
Change-Id: I1abb8c21f1769ad55416f37e7bfa1458b80ace63
2010-08-02 19:08:56 -07:00
Dan Egnor
8e4378b3ae COMMENT ONLY change to fix some formatting glitches and
(more importantly) clarify issues surrounding removed accounts.

Change-Id: I19e6c0e536e46b6d219c808bb86e88edd7e6f378
2010-08-02 18:22:09 -07:00
Steve Howard
14805b6c1f Merge "New secure setting for mobile download size limit." into gingerbread 2010-08-02 16:49:22 -07:00
Steve Howard
9c4e33e04a New secure setting for mobile download size limit.
Change-Id: I0024d632721f59349e211c0b74dd7271423dacd5
2010-08-02 16:35:23 -07:00
Kenny Root
739cdab7cb Merge "Do not deference before null check" into gingerbread 2010-08-02 12:33:40 -07:00
Brad Fitzpatrick
ee34a49ffc Add missing word from docs.
My mistaker from an earlier commit.

Change-Id: Ic04b3c411da32f7dca03d23d39182915e3567172
2010-08-02 07:54:18 -07:00