3522 Commits

Author SHA1 Message Date
Dianne Hackborn
f6f9f2d025 Add more control over a service's start state.
One of the problems I have been noticing is background services
sitting around running and using resources.  Some times this is
due to the app developer doing this when they shouldn't, but there
are also a number of issues with the current Service interaction
model that make it very difficult (or impossible) to avoid
getting services stuck in the started state.  This is a
change/enhancement to the Service API to try to address this.

The main change is that Service.onStart() has been deprecated,
replaced with a new Service.onStartCommand() that allows the
service to better control how the system should manage it.  The
key part here is a new result code returned by the function, telling
the system what it should do with the service afterwards:

- START_STICKY is basically the same as the previous behavior,
  where we usually leave the service running.  The only difference
  is that it if it gets restarted because its process is killed,
  onStartCommand() will be called on the new service with a null
  Intent instead of not being called at all.

- START_NOT_STICKY says that, upon returning to the system, if
  its process is killed with no remaining start commands to
  deliver, then the service will be stopped instead of restarted.
  This makes a lot more sense for services that are intended to
  only run while executing commands sent to them.

- START_REDELIVER_INTENT is like START_NOT_STICKY, except if
  the service's process is killed before it calls stopSelf()
  for a given intent, that intent will be re-delivered to it
  until it completes (unless after 4 or more tries it still
  can't complete, at which point we give up).

Change-Id: I978f5ca420d70023d1b5e7f97de639d09381f8ad
2009-08-24 17:00:54 -07:00
Robert Greenwalt
e426654676 am 123d6f37: am ec9fe467: Fix a race condition for data change notification
Merge commit '123d6f372fcd7bdc18245cac984005bab3d534af'

* commit '123d6f372fcd7bdc18245cac984005bab3d534af':
  Fix a race condition for data change notification
2009-08-24 16:41:29 -07:00
Robert Greenwalt
ec9fe4672a Fix a race condition for data change notification
We could sometimes not be told about network state changes breaking subsequent mms access.
Turning on more logging too.

bug: 2069106
2009-08-24 16:19:42 -07:00
Mike Lockwood
335dd4e5e4 am ce80db46: am 2e951b55: Merge change 22493 into eclair
Merge commit 'ce80db469b3b4c229445548bdaa46a74a28a2912'

* commit 'ce80db469b3b4c229445548bdaa46a74a28a2912':
  Add resources to specify display rotation when in keyboard open or docked state.
2009-08-24 15:45:13 -07:00
Android (Google) Code Review
2e951b5511 Merge change 22493 into eclair
* changes:
  Add resources to specify display rotation when in keyboard open or docked state.
2009-08-24 15:41:30 -07:00
Mike Lockwood
391305e740 Add resources to specify display rotation when in keyboard open or docked state.
Also added constant for SW_LID input event.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-24 15:38:47 -07:00
Wei Huang
84018fd342 am b664235f: am 5e6ad478: Merge change 22496 into eclair
Merge commit 'b664235fd3210cda7e0be71d67bed3d9b60303fe'

* commit 'b664235fd3210cda7e0be71d67bed3d9b60303fe':
  fix typo
2009-08-24 15:09:41 -07:00
Android (Google) Code Review
5e6ad4786d Merge change 22496 into eclair
* changes:
  fix typo
2009-08-24 15:04:46 -07:00
Wei Huang
cc6bd5a0d3 fix typo 2009-08-24 14:29:44 -07:00
Leon Scroggins
f3c55d5bc8 am d0dcd101: am 7bc08e9d: Merge change 21944 into eclair
Merge commit 'd0dcd1011617e4bed5c1f16f8c2c8f3a9fb7217b'

* commit 'd0dcd1011617e4bed5c1f16f8c2c8f3a9fb7217b':
  Implement new title bar hiding/showing behavior.
2009-08-24 14:18:03 -07:00
Leon Scroggins
b2359262b4 Implement new title bar hiding/showing behavior.
Remove the code that hides the title bar when the page finishes loading.
When the user double taps, if it did not result in changing the viewing
mode (i.e. on a mobile site), send a message to the client so we can
toggle the title bar's visibility.  Required for a change to
packages/apps/Browser

Change-Id: I0040fd183ce5673a4069e943f38eb31599c0ca7d
2009-08-24 16:55:42 -04:00
Satish Roddom
6557ee2570 am aae6751c: am c0234a9d: Merge change 22474 into eclair
Merge commit 'aae6751c48e9690033f73c5a6323ffb82854701c'

* commit 'aae6751c48e9690033f73c5a6323ffb82854701c':
  Compose Message "To" field allows adding sequence of characters as contact
2009-08-24 13:49:58 -07:00
Mike Lockwood
c66fab337c am 2f6d42fc: am 4df8dd8a: Merge change 22470 into eclair
Merge commit '2f6d42fc43dad2b15b3aba4a259ead86241c996f'

* commit '2f6d42fc43dad2b15b3aba4a259ead86241c996f':
  Fix some Javadoc typos.
2009-08-24 13:49:55 -07:00
Android (Google) Code Review
c0234a9df9 Merge change 22474 into eclair
* changes:
  Compose Message "To" field allows adding sequence of characters as contact
2009-08-24 13:45:30 -07:00
Android (Google) Code Review
4df8dd8aea Merge change 22470 into eclair
* changes:
  Fix some Javadoc typos.
2009-08-24 13:15:47 -07:00
Mike Lockwood
725fcbf5ec Fix some Javadoc typos.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-24 13:09:20 -07:00
Cary Clark
1c6646bd69 am decbc3db: am 840b856d: Merge change 22452 into eclair
Merge commit 'decbc3dbc4d4d3c368319ae0784307b5182bd2fe'

* commit 'decbc3dbc4d4d3c368319ae0784307b5182bd2fe':
  don't center zoom on size change if zoom is in progress
2009-08-24 11:52:28 -07:00
Android (Google) Code Review
840b856d2a Merge change 22452 into eclair
* changes:
  don't center zoom on size change if zoom is in progress
2009-08-24 11:47:53 -07:00
Cary Clark
a91874d1f9 don't center zoom on size change if zoom is in progress
The onSizeChange code is called when the device is rotated and
when the title bar is hidden. In the latter case, it is in response
to the zooming transition from overview mode to reading mode, and
the zoom center should not be recomputed.

http://b/issue?id=2060720
2009-08-24 14:08:43 -04:00
Patrick Scott
595159ee0c am ab3803bd: am d507ff21: Merge change 22449 into eclair
Merge commit 'ab3803bd8db8c4d73ae2566764408f9c4a0d24ab'

* commit 'ab3803bd8db8c4d73ae2566764408f9c4a0d24ab':
  Check for a null history item to avoid crashing.
2009-08-24 11:04:38 -07:00
Android (Google) Code Review
d507ff2129 Merge change 22449 into eclair
* changes:
  Check for a null history item to avoid crashing.
2009-08-24 11:00:30 -07:00
Steve Block
c84e475d41 am dbaf246e: am ba9f5f3f: Merge change 22440 into eclair
Merge commit 'dbaf246ef7996db74b41a5f54d8defa336c39644'

* commit 'dbaf246ef7996db74b41a5f54d8defa336c39644':
  Java-side changes to persist Geolocation permissions between browser sessions.
2009-08-24 11:00:11 -07:00
Patrick Scott
af31c3a42d Check for a null history item to avoid crashing.
The history item may be null if this page is loaded through loadDataWithBaseURL
so we cannot count on the item being non-null.

Bug: 2073490
2009-08-24 13:59:55 -04:00
Android (Google) Code Review
ba9f5f3f6b Merge change 22440 into eclair
* changes:
  Java-side changes to persist Geolocation permissions between browser sessions.
2009-08-24 10:56:10 -07:00
Satish Roddom
e43a6a02dd Compose Message "To" field allows adding sequence of characters as contact
When we select this option, this sequence of characters (which is neither a
valid email address nor a phone number), gets stored in contact with type MOBILE.

Fix: In function canAddToContacts, adding a check to validate whether the contact
to be added is a valid email address or phone number. If not, user will not be shown
with the option "Add to Contacts".
2009-08-24 09:19:08 -07:00
Patrick Scott
3bcc52e963 am 1aa196ef: am 4e9718d6: Fix synchronous xml requests with ssl errors.
Merge commit '1aa196ef7a7649f9c7394619235541b70221899c'

* commit '1aa196ef7a7649f9c7394619235541b70221899c':
  Fix synchronous xml requests with ssl errors.
2009-08-24 09:06:57 -07:00
Patrick Scott
4e9718d6ae Fix synchronous xml requests with ssl errors.
Use the in-memory ssl preference table before posting a message to the WebCore
thread. Since the WebCore thread is blocked waiting for the ssl resource, we
cannot query the user for their preference. If the table does not contain the
user's decision, bail on the request to avoid a deadlock.

Also mark a few of the ssl handler's method's as synchronized. This was reported
by findbugs.
2009-08-24 12:02:51 -04:00
Grace Kloba
b5f970b06e am 92bd45f9: am 7fdab7f9: Merge change 22377 into eclair
Merge commit '92bd45f9444d3b1fca7bf687b73b46ccc7d8fcec'

* commit '92bd45f9444d3b1fca7bf687b73b46ccc7d8fcec':
  The new webkit won't keep RAM cache if http header has "no-store". So remove
2009-08-24 08:48:31 -07:00
Android (Google) Code Review
7fdab7f967 Merge change 22377 into eclair
* changes:
  The new webkit won't keep RAM cache if http header has "no-store". So remove it from StreamLoader. And fix the code where we only want to cache network  result.
2009-08-24 08:45:06 -07:00
Steve Block
9d3273f622 Java-side changes to persist Geolocation permissions between browser sessions.
This fixes bug http://b/issue?id=2054365.
2009-08-24 11:59:42 +01:00
Steve Block
a4940c8555 am 4cc89b91: am 8a2000df: Merge change 22262 into eclair
Merge commit '4cc89b91b75cd605868f71a932d652f3fc7e320c'

* commit '4cc89b91b75cd605868f71a932d652f3fc7e320c':
  Adds Java-side of logic to make Geolocation obey Browser 'Enable Location' setting.
2009-08-24 03:10:29 -07:00
Android (Google) Code Review
8a2000df6d Merge change 22262 into eclair
* changes:
  Adds Java-side of logic to make Geolocation obey Browser 'Enable Location' setting.
2009-08-24 03:07:15 -07:00
Steve Block
06cd751b05 Adds Java-side of logic to make Geolocation obey Browser 'Enable Location' setting.
This fixes bug http://b/issue?id=2067559.
2009-08-24 10:59:57 +01:00
Jeff Sharkey
b8f93863dd am a711fadb: am 84235ee9: Add extra to exclude specific MIME-types from Fast-Track.
Merge commit 'a711fadb07328ec625e1bed3121093ef28b43fe0'

* commit 'a711fadb07328ec625e1bed3121093ef28b43fe0':
  Add extra to exclude specific MIME-types from Fast-Track.
2009-08-23 23:37:39 -07:00
Jeff Sharkey
84235ee923 Add extra to exclude specific MIME-types from Fast-Track.
Also added ContactHeaderWidget accessor for passing along
this list when triggering Fast-Track.  This is used so that
the header widget can hide the profile icon when launched
while already looking at the profile.
2009-08-23 14:11:00 -07:00
Jeff Sharkey
7d73881fdb am f942558b: am 06a0323a: Add fields to pass ungrouped counts to UI.
Merge commit 'f942558bc57025c0724596832817295a52ceea91'

* commit 'f942558bc57025c0724596832817295a52ceea91':
  Add fields to pass ungrouped counts to UI.
2009-08-23 00:22:43 -07:00
Jeff Sharkey
06a0323a54 Add fields to pass ungrouped counts to UI. 2009-08-23 00:17:44 -07:00
Jeff Sharkey
209109070d am 4421e5cd: am f03733e7: Merge change 22160 into eclair
Merge commit '4421e5cd3480d0393f2b41bded69bfa01e4e9d9d'

* commit '4421e5cd3480d0393f2b41bded69bfa01e4e9d9d':
  Add dither XML flag to StateListDrawable.
2009-08-22 23:01:47 -07:00
Jeff Sharkey
6afa16feb3 Add dither XML flag to StateListDrawable.
We currently allow the dither="true" flag to be set on
individual <bitmap> and <nine-patch> objects, but that flag
is overridden when they are included in a <selector>.  This
change adds the dither="true" flag to StateListDrawable so
they can be dithered when desired.

Fixes http://b/issue?id=2068024
2009-08-22 22:44:00 -07:00
Scott Su
07b46695e5 am 9d11ef2b: am a5fa3648: Merge change 22383 into eclair
Merge commit '9d11ef2b4a39f8e881e315a322c4990d7e20fcae'

* commit '9d11ef2b4a39f8e881e315a322c4990d7e20fcae':
  Remove the decleration of com.android.im.plugin.jar in platform.xml
2009-08-22 11:12:47 -07:00
Android (Google) Code Review
a5fa36481c Merge change 22383 into eclair
* changes:
  Remove the decleration of com.android.im.plugin.jar in platform.xml Add a column definition for keep_signed_in when query the active account with a given provider
2009-08-22 11:07:20 -07:00
Scott Su
527f015b9a Remove the decleration of com.android.im.plugin.jar in platform.xml
Add a column definition for keep_signed_in when query the active account with a given provider
2009-08-22 10:48:23 -07:00
Eric Fischer
c740d140b9 am a3598d9a: am 688b0f12: am 36d5aaec: Merge change 22322 into donut
Merge commit 'a3598d9acdc1de1cf63e40cc08e29fcbe1cdc041'

* commit 'a3598d9acdc1de1cf63e40cc08e29fcbe1cdc041':
  Add FLAG_ACTIVITY_NEW_TASK flag when adding a word to the dictionary.
2009-08-22 07:51:11 -07:00
Eric Fischer
688b0f1235 am 36d5aaec: Merge change 22322 into donut
Merge commit '36d5aaec2ee1f11ea80639c8194e4aac2be3892d' into eclair

* commit '36d5aaec2ee1f11ea80639c8194e4aac2be3892d':
  Add FLAG_ACTIVITY_NEW_TASK flag when adding a word to the dictionary.
2009-08-22 07:43:44 -07:00
Grace Kloba
c3fa098ff6 The new webkit won't keep RAM cache if http header has "no-store". So remove
it from StreamLoader. And fix the code where we only want to cache network  result.
2009-08-21 17:31:11 -07:00
Ken Shirriff
79afd5053e am 8fca03a8: am 426ac065: Merge change 22328 into eclair
Merge commit '8fca03a88be981f9737974bbaff4f2fa82f5e19d'

* commit '8fca03a88be981f9737974bbaff4f2fa82f5e19d':
  Fix recurrence parsing for all-day events.
2009-08-21 16:02:49 -07:00
Android (Google) Code Review
426ac065d0 Merge change 22328 into eclair
* changes:
  Fix recurrence parsing for all-day events.
2009-08-21 15:58:43 -07:00
Wei Huang
3c2a6e0ff8 am 0949f652: am d3d79453: Merge change 22331 into eclair
Merge commit '0949f652ee2e84ef46d12ac692620286925ded6e'

* commit '0949f652ee2e84ef46d12ac692620286925ded6e':
  add a "display_sent_time" column to the message table, to provide a hint that the UI should display time stamp for this message always. Add Gservices settings for gtalk stuff.
2009-08-21 15:25:46 -07:00
Android (Google) Code Review
d3d7945309 Merge change 22331 into eclair
* changes:
  add a "display_sent_time" column to the message table, to provide a hint that the UI should display time stamp for this message always. Add Gservices settings for gtalk stuff.
2009-08-21 15:20:31 -07:00
Alex Gruenstein
f1b64f64ab do not merge. Remove voicesearch-specific functionality from framework. 2009-08-21 14:59:26 -07:00