607 Commits

Author SHA1 Message Date
The Android Open Source Project
864c68ea45 merge from froyo-plus-aosp
Change-Id: I9cede57e10df9d6ba411b2960a77d7b9b60a1489
2010-06-14 11:35:51 -07:00
The Android Open Source Project
ea1647aff1 merge from open-source master
Change-Id: I5d19eb677dcfc7b73919d659fafb29fb85dc7f47
2010-06-14 10:57:53 -07:00
Jeff Brown
46b9ac0ae2 Native input dispatch rewrite work in progress.
The old dispatch mechanism has been left in place and continues to
be used by default for now.  To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.

Includes part of the new input event NDK API.  Some details TBD.

To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument.  The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points.  The ViewRoot then
provides the InputChannel to the InputQueue.  Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue.  This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.

There can be zero or more targets for any given input event.  Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets).  Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.

End-to-end event dispatch mostly works!

To do: event injection, rate limiting, ANRs, testing, optimization, etc.

Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
2010-06-13 17:42:16 -07:00
Dianne Hackborn
32907cfb38 Adjust activity manager process OOM adj.
Modify OOM adj classes a bit, to take into account the new
heavy weight app type, and give "foreground services" their
own category to have a bettery chance to manager them when
things go wrong.

Also add some new code to battery stats to keep a history
of changes to the battery level.

Change-Id: I29f5ab6938777e1a7eafd7d8c38b5e564cc9f96a
2010-06-11 10:39:11 -07:00
Brad Fitzpatrick
438d059512 Introduce "StrictMode"
This is a new public API for developers to opt-in to strict rules
about what they're allowed to do on certain threads.  (this is the
public face of the @hide dalvik.system.BlockGuard, added recently...)

In practice this will be used for developers to opt-in to declaring
that they don't want to be allowed to do various operations (such as
disk I/O or network operations) on their main UI threads.  (these
operations are often accidental, or even when they are fast come with
a good chance of being slow or very slow in some cases....)

Implementation wise, this is just a thread-local integer that has a
bitmask of the things that aren't allowed, and more bits for saying
what the violation penalty is.  The penalties, of which multiple can
be chosen, include:

  * logging
  * dropbox uploading for analysis/reporting
  * annoying dialog
  * full-on crashing

These are all only very roughly implemented at this point, but all
parts now minimally work end-to-end now, so this is a good checkpoint
commit before this gets too large.

Future CLs will polish all the above 4 penalties, including
checksumming of stacktraces and minimizing penalties for duplicate
violations.

Change-Id: Icbe61a2e950119519e7364030b10c3c28d243abe
2010-06-10 14:38:58 -07:00
Joe Onorato
f1f259165f Call into the notification manager when the panel is revealed.
This lets it turn off the LED.  However, it seems like somebody broke
the notification LEDs.  GRRR.

Change-Id: I3f7066c2b2e1673dc0144a34cf59946351a647be
2010-06-09 14:33:30 -07:00
Joe Onorato
8bc6c51419 Require the STATUS_BAR_SERVICE permission for something to be the status bar.
Change-Id: I57b2d296e0d0cef0d256ae6697fffc47188d14df
2010-06-09 14:33:23 -07:00
Joe Onorato
005847b03b Handle errors inflating notifications (and their icons).
On an inflation error, the StatusBarService cleans up, removes / doesn't add
the views, and calls into the StatusBarManagerService, which tells the
NotificationManagerService to remove the notification.

That then calls all the way back into the StatusBarService, but I think being
extra careful is okay.  Throughout the status bar, it's all keyed off of the
IBinder key, so if the app comes in with a good notification while we're
cleaning up, we won't lose the new notification or anything like that.

Change-Id: Iea78a637495a8b67810c214b951d5ddb93becacb
2010-06-09 09:15:25 -07:00
takuo
14f1eb57db Should accept "application/vnd.wap.multipart.alternative" message.
Unfortunately, PduParser does not allow application/vnd.wap.multipart.alternative as M-RETRIEVE.CONF but some Mobile carrier send message with this type.
This patch allows that and take the first part of multipart as message body.

It fixes http://code.google.com/p/android/issues/detail?id=8957

Change-Id: Ic93259c91331d1e67100439114b7c4f43a834368
2010-06-09 23:46:58 +09:00
Dianne Hackborn
860755faa6 Add support for heavy-weight applications.
Only one can be running at a time, their process can not be killed,
and a notification is posted while it is running.

Change-Id: I843015723947e0c934ae63a1aeee139327c0bc01
2010-06-04 10:09:13 -07:00
Joe Onorato
75199e3ddc Populate the notifications at startup of SystemUI.apk.
Change-Id: Ie0b3fd9ed4bc9a012791372e6276f0b5908370a5
2010-06-02 14:48:46 -07:00
Joe Onorato
0e26dffd6c updateNotifications works.
Change-Id: I924763a2d42ca1967719f3eb72c57d1cbb912dd7
2010-06-02 14:48:44 -07:00
Joe Onorato
aaba60b281 Notifications don't crash when you click them, and pass through events to NotificationManagerService
Change-Id: Iae4a636d3c6d5c617440b11eb5b8bc77838ad584
2010-06-02 14:48:43 -07:00
Joe Onorato
e345fff2f8 notifications show
Change-Id: I9240b803c643874828c95afcf1ba9ed91194dbc0
2010-06-02 14:48:43 -07:00
Joe Onorato
a0c56fe939 Checkpoint. Doesn't build.
Change-Id: I92e4d539ea71af9e22ced02cbdee7fbd456b7971
2010-06-02 14:48:43 -07:00
Joe Onorato
18e69dfc72 Checkpoint. Data structures for Notifications in place.
Change-Id: I146fb9bc1d349112541368e2c99a667821dfdf6e
2010-06-02 14:48:43 -07:00
Joe Onorato
4762c2d75a Add expand and collapse.
Change-Id: I58ad95c59b2c46d3f25349e137d5624aefc6c6cd
2010-06-02 14:48:42 -07:00
Joe Onorato
f3f0e053f0 Make disable() work.
Change-Id: I93fea37e777b3e04fe7f9171d5b84821587c24f5
2010-06-02 14:48:42 -07:00
Joe Onorato
514ad663f0 Set the visibility of the icons.
Change-Id: Ib414718f1c51f1d306308a989d5d31d8e3ea7fd1
2010-06-02 14:48:41 -07:00
Joe Onorato
0cbda99f87 The status bar draws its icons now. 2010-06-02 14:48:41 -07:00
Wink Saville
7e3b31d786 Merge "Update docs, add HANDLED, NOT_HANDLED and getCurrentMessage." into kraken 2010-05-19 13:05:55 -07:00
Wink Saville
a4f3bec29c Update docs, add HANDLED, NOT_HANDLED and getCurrentMessage.
The EBNF statemachine description language was to difficult
to remember changed to use a simpler and more obvious psuedo
language.

Added HANDLED and NOT_HANDLED as it makes the psuedo code
more obvious.

Added getCurrentMessage primarily for use by code in enter
so that it can know why the new state is being entered.

Change-Id: I1446e417b77684fbde0020b1da0975eedc57cce4
2010-05-19 09:11:38 -07:00
The Android Open Source Project
627356cee4 am d6c0bb0f: merge from open-source master
Merge commit 'd6c0bb0f0f3827f1c336db20ac9dc0eb90cd46fa' into kraken

* commit 'd6c0bb0f0f3827f1c336db20ac9dc0eb90cd46fa':
  Removed Calls to deprecated APIs
2010-05-19 08:33:27 -07:00
The Android Open Source Project
d6c0bb0f0f merge from open-source master
Change-Id: I0598edad283a177a5ddcc30e20d2284503e6038e
2010-05-19 08:28:32 -07:00
Romain Guy
2b9a49a30d Merge "Removed Calls to deprecated APIs" 2010-05-19 00:01:02 -07:00
Dianne Hackborn
dc8a7f69d7 Add new API to take over a window's Surface.
Change-Id: Iad6245faadc95f19ea63c8e229a1c02e9188f69e
2010-05-18 10:46:33 -07:00
The Android Open Source Project
400907086a am 4547e528: merge from open-source master
Merge commit '4547e5284e79192373f3a6bb6c452501171bc1d6' into kraken

* commit '4547e5284e79192373f3a6bb6c452501171bc1d6':
  Removed Calls to deprecated APIs and unused Imports
2010-05-18 09:21:28 -07:00
The Android Open Source Project
4547e5284e merge from open-source master
Change-Id: I3607454a9257701855354c12ef1f36841c889aea
2010-05-18 09:18:37 -07:00
Christian Mehlmauer
15d24708b1 Removed Calls to deprecated APIs and unused Imports
Change-Id: Ib26783ca1d6c345cc91aa3ab5b9654f5316c78a0
2010-05-17 21:27:27 +02:00
Christian Mehlmauer
746a95ab71 Removed Calls to deprecated APIs
Change-Id: I3f9b6a8d3c8a050156a6cc7ea0eb9de33b82f79a
2010-05-17 21:16:20 +02:00
Mike Lockwood
5a9cbb291f am a3d5549c: am 098e58da: Use SystemClock.elapsedRealtime in ShutdownThread timeout logic
Merge commit 'a3d5549c802bc4fbf1e1ca05bc3552db17212036' into kraken

* commit 'a3d5549c802bc4fbf1e1ca05bc3552db17212036':
  Use SystemClock.elapsedRealtime in ShutdownThread timeout logic
2010-05-13 14:06:25 -07:00
Mike Lockwood
a3d5549c80 am 098e58da: Use SystemClock.elapsedRealtime in ShutdownThread timeout logic
Merge commit '098e58da93f304d7d7791f193c6237870b94989d' into froyo-plus-aosp

* commit '098e58da93f304d7d7791f193c6237870b94989d':
  Use SystemClock.elapsedRealtime in ShutdownThread timeout logic
2010-05-13 14:04:30 -07:00
Mike Lockwood
098e58da93 Use SystemClock.elapsedRealtime in ShutdownThread timeout logic
This avoids problems if the time is reset while shutting down.

Change-Id: I54c7c787e55648ebf5a68e79056f92fbac0081ae
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-13 16:29:49 -04:00
Adam Powell
37f4f5b1ea am d135f74b: am 151af19b: Fix bug 2651076 - Catch/log ActivityNotFoundException in MenuItemImpl.invoke()
Merge commit 'd135f74b972b88de2ae8b11b3ada886d29c1e25d' into kraken

* commit 'd135f74b972b88de2ae8b11b3ada886d29c1e25d':
  Fix bug 2651076 - Catch/log ActivityNotFoundException in MenuItemImpl.invoke()
2010-05-04 15:41:41 -07:00
Adam Powell
d135f74b97 am 151af19b: Fix bug 2651076 - Catch/log ActivityNotFoundException in MenuItemImpl.invoke()
Merge commit '151af19bf409a47424ddaa51e1ac4a0c532c4eb6' into froyo-plus-aosp

* commit '151af19bf409a47424ddaa51e1ac4a0c532c4eb6':
  Fix bug 2651076 - Catch/log ActivityNotFoundException in MenuItemImpl.invoke()
2010-05-04 15:40:36 -07:00
Adam Powell
151af19bf4 Fix bug 2651076 - Catch/log ActivityNotFoundException in MenuItemImpl.invoke()
Change-Id: I841a37349fbc6af33073aaecae903eb8999cc5bd
2010-05-04 14:44:45 -07:00
The Android Open Source Project
dcb5f18fd6 am 007ad770: merge from open-source master
Merge commit '007ad7700a23ff7e618cfeee1eab97063c93b800' into kraken

* commit '007ad7700a23ff7e618cfeee1eab97063c93b800':
  Adapt to new location of libcore
  Parse custom text header and ignore it.
  Parse "multipart/vnd.wap.multipart.alternative" which is a part of multipart body (nested multipart).
  'uses-library' was not working for persistent applications.
  Fix an NPE in InputMethodService when mExtractAction is null.
2010-05-03 16:25:15 -07:00
The Android Open Source Project
007ad7700a merge from open-source master
Change-Id: If72ad6758c9e1bf77c38c4afec6b00ec9d5b89e4
2010-05-03 16:19:31 -07:00
takuo
42b21c3333 Parse custom text header and ignore it.
Some MMS carrier append own custom header as text into PduData. We should parse it and ignore it at the moment.

Change-Id: I4d6cf20f5cf99172ebbe310ab18101316eb04c77
2010-04-30 07:11:53 +09:00
takuo
334dc0b270 Parse "multipart/vnd.wap.multipart.alternative" which is a part of multipart body (nested multipart).
And take the first part of parsed as a parent part data.

Change-Id: I2752654f41d642524061802772e2a7eaa10a4e2d
2010-04-30 05:12:19 +09:00
Jesse Wilson
86b0276a39 am f9e90378: am bc284a5f: Merge "Move the public method HttpDateTime.parse() into AndroidHttpClient." into froyo
Merge commit 'f9e90378d50210298d1cec2b913653597cd62be4' into kraken

* commit 'f9e90378d50210298d1cec2b913653597cd62be4':
  Move the public method HttpDateTime.parse() into AndroidHttpClient.
2010-04-10 11:47:45 -07:00
Jesse Wilson
f9e90378d5 am bc284a5f: Merge "Move the public method HttpDateTime.parse() into AndroidHttpClient." into froyo
Merge commit 'bc284a5f9f1e3f19ddd45cfb233f0d1775b612a7' into froyo-plus-aosp

* commit 'bc284a5f9f1e3f19ddd45cfb233f0d1775b612a7':
  Move the public method HttpDateTime.parse() into AndroidHttpClient.
2010-04-10 11:41:38 -07:00
Jesse Wilson
7cfa90fee5 Move the public method HttpDateTime.parse() into AndroidHttpClient.
See bug http://b/2553589

Change-Id: Ide3399c7c63daf9c0b8c18669076f2f4d6e9a876
2010-04-09 13:34:15 -07:00
Daniel Lehmann
ba3147d157 am 140d040b: am d8b9b511: Merge "Pass cookie to TOKEN_CONTACT_INFO so that QuickContact without photo works again Bug:2572239" into froyo
Merge commit '140d040b6a5d2dc01e999e6f7b69863c71b2272b' into kraken

* commit '140d040b6a5d2dc01e999e6f7b69863c71b2272b':
  Pass cookie to TOKEN_CONTACT_INFO so that QuickContact without photo works again
2010-04-06 14:17:57 -07:00
Daniel Lehmann
140d040b6a am d8b9b511: Merge "Pass cookie to TOKEN_CONTACT_INFO so that QuickContact without photo works again Bug:2572239" into froyo
Merge commit 'd8b9b511821a06d86b3ffaab0d71ee9ce3834678' into froyo-plus-aosp

* commit 'd8b9b511821a06d86b3ffaab0d71ee9ce3834678':
  Pass cookie to TOKEN_CONTACT_INFO so that QuickContact without photo works again
2010-04-06 14:14:21 -07:00
Daniel Lehmann
b45c047ba0 Pass cookie to TOKEN_CONTACT_INFO so that QuickContact without photo works again
Bug:2572239

Change-Id: I5fedd6cac64d495ba208ddcb45a7d09a05bb9a65
2010-04-06 10:44:35 -07:00
Amith Yamasani
c778f71d5c am 733a2f65: am 1b4c0d70: Merge "Fix a crash in BatteryStatsImpl, due to a previous fix." into froyo
Merge commit '733a2f654934d452b2febf6f80cd1136830758d5' into kraken

* commit '733a2f654934d452b2febf6f80cd1136830758d5':
  Fix a crash in BatteryStatsImpl, due to a previous fix.
2010-04-05 14:25:31 -07:00
Amith Yamasani
733a2f6549 am 1b4c0d70: Merge "Fix a crash in BatteryStatsImpl, due to a previous fix." into froyo
Merge commit '1b4c0d702066794b9ce97b02721aa9e552997381' into froyo-plus-aosp

* commit '1b4c0d702066794b9ce97b02721aa9e552997381':
  Fix a crash in BatteryStatsImpl, due to a previous fix.
2010-04-05 14:20:57 -07:00
Amith Yamasani
e5795610bd Fix a crash in BatteryStatsImpl, due to a previous fix.
This is probably the real fix for the original bug. The last line was probably not
well formed and resulted in an overrun in the native code.

Bug: 2564824
Change-Id: I8a9cc267f8045a61eff4b5d532258afa32a8b837
2010-04-05 12:43:44 -07:00
Mike Lockwood
79e642e8ed Call LocationManager.sendNiResponse() instead of calling directly to GpsLocationProvider
Change-Id: I6a5b47abb0519f5228d29bc3340bb2490564803e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-04 18:44:05 -04:00