562 Commits

Author SHA1 Message Date
Jaikumar Ganesh
2023b2359d am d4afde3d: am b8fc825d: am 3a0d1d11: Merge "Fix crash while turning bluetooth on, due to a race condition." into froyo 2010-03-31 23:33:55 -07:00
Jaikumar Ganesh
d4afde3d12 am b8fc825d: am 3a0d1d11: Merge "Fix crash while turning bluetooth on, due to a race condition." into froyo
Merge commit 'b8fc825dfafd8792a4d9daead9d3d1b4a4b55de5' into kraken

* commit 'b8fc825dfafd8792a4d9daead9d3d1b4a4b55de5':
  Fix crash while turning bluetooth on, due to a race condition.
2010-03-31 23:22:51 -07:00
Jaikumar Ganesh
3a0d1d11eb Merge "Fix crash while turning bluetooth on, due to a race condition." into froyo 2010-03-31 18:36:35 -07:00
Jaikumar Ganesh
b8aa037602 Fix crash while turning bluetooth on, due to a race condition.
Bug: 2561150

Race condition: We were basing whether the event loop is
running or not on whether nat->pollData was null or not.
In rare cases, eventLoopMain would have not started,
isEventLoopRunning returns true; java side makes a dbus call
and the watches get set to null, causing a crash in
dbus_connection_set_watch_functions when eventLoopMain starts.

Change-Id: I863f182185a8e956fd53cb58783b7fe0ecfb2ddb
2010-03-31 11:29:18 -07:00
Mike Lockwood
8acdb911f4 Merge "Add support for GPS privacy lock. DO NOT MERGE" into froyo 2010-03-30 17:29:41 -07:00
Wu-cheng Li
a369ad0302 am 4d47e1b1: am 0ca25191: Add some comments for zoom methods. 2010-03-29 10:25:46 -07:00
Wu-cheng Li
0ca25191c6 Add some comments for zoom methods.
Also change RuntimeException to IllegalArgumentException.
bug:2458926

Change-Id: I87af31f5f3f10244131a1117bd1725c2d292b587
2010-03-29 16:21:12 +08:00
Mike Lockwood
a3ba63dc8a Add support for GPS privacy lock. DO NOT MERGE
Change-Id: Ieb55794453f86fb7100c9010a0729839990eb9f7
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-28 09:34:41 -04:00
Mike Lockwood
43e33f2872 Move files internal to LocationManagerService from framework.jar to services.jar
Change-Id: I3dbb40210d87708e0bff46729f707d4ab8e29e42
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-26 10:41:48 -04:00
Brad Fitzpatrick
5348c01412 Better fix for gettid() sim-eng breakage from last night.
Change-Id: I2e8762d43b3c224a2e102ff82fc79072a85bb4c6
2010-03-25 12:43:56 -07:00
Mike Reed
cd06ff13c9 Merge "update dox that we ignore the exact parameter on computeBounds" 2010-03-25 11:04:02 -07:00
Mike Reed
54900e8c05 update dox that we ignore the exact parameter on computeBounds
Change-Id: I6051210ea2a73b4d1c6cd631a285209ab130b4e5
2010-03-25 14:02:40 -04:00
Nick Pelly
f4264011c0 Merge "Fix Phone App crash due to binary data in HSP/HFP stream." 2010-03-25 10:01:21 -07:00
Nick Pelly
8457b0f0c6 Fix Phone App crash due to binary data in HSP/HFP stream.
The BMW 2005 E46 sends binary data amongst the AT commands. Log below.

There were a couple of problems when this happened.
o Off by one error causing overflow of read buffer.
o No validation that input can be parsed by NewStringUTF()

This commit fixes the off-by-one, and validates that the input is ASCII.

I also increased the read buffer size to 256 to make it less likely we split
commands across buffers. We will lose the command when this happens.

2010-03-24 16:00:29.934185 > ACL data: handle 1 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 0]
      0000: 29 ef 13 41 54 2b 43 49  4e 44 3f 0d 6a           )ï.AT+CIND?.j
2010-03-24 16:00:29.940502 < ACL data: handle 1 flags 0x00 dlen 38
    0000: 22 00 40 00 2b ef 3d 0d  0a 2b 43 49 4e 44 3a 20  ".@.+ï=..+CIND:
    0010: 31 2c 30 2c 30 2c 30 2c  34 2c 30 2c 35 0d 0a 0d  1,0,0,0,4,0,5...
    0020: 0a 4f 4b 0d 0a b0                                 .OK..°
2010-03-24 16:00:29.949657 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 1 packets 1
2010-03-24 16:00:30.004284 > ACL data: handle 1 flags 0x02 dlen 9
    L2CAP(d): cid 0x0040 len 5 [psm 0]
      0000: 29 ff 01 01 76                                    )ÿ..v
2010-03-24 16:00:30.137218 > ACL data: handle 1 flags 0x02 dlen 144
    L2CAP(d): cid 0x0040 len 140 [psm 0]
      0000: 29 ef 0e 01 02 a9 03 58  02 a9 03 64 02 a9 03 98  )ï...©.X.©.d.©..
      0010: 02 a9 03 98 02 a9 03 98  02 a9 03 98 02 a9 03 98  .©...©...©...©..
      0020: 02 a9 03 98 02 a9 03 98  02 a9 03 98 02 a9 03 98  .©...©...©...©..
      0030: 02 a9 04 d8 02 a9 03 a4  02 a9 03 b0 02 a9 03 bc  .©.Ø.©.¤.©.°.©.¼
      0040: 02 a9 03 c8 02 a9 03 fc  02 a9 04 38 02 a9 04 44  .©.È.©.ü.©.8.©.D
      0050: 02 a9 04 50 02 a9 04 84  02 a9 04 90 02 a9 04 9c  .©.P.©...©...©..
      0060: 02 a9 04 a8 02 a9 04 b4  02 a9 04 c0 02 a9 04 d8  .©.¨.©.´.©.À.©.Ø
      0070: 02 a9 04 d8 02 a9 04 cc  02 a9 10 7c 02 a9 10 d8  .©.Ø.©.Ì.©.|.©.Ø
      0080: 02 a9 10 e4 02 a9 10 f4  02 a9 11 6a              .©.ä.©.ô.©.j

Change-Id: I7ccff70bc95a7945d8ff03527764fd8f4da04d24
Bug: 2539053
2010-03-25 09:56:01 -07:00
Brad Fitzpatrick
ad8fd282dd Hopefully fix the sim-eng build, part 2.
This is kinda gross, but I can't find a good way to check for the
existence of gettid(), except by finding its syscall number.  Then
might as well just use it rather than hope gettid's around, as it's
not in sim-eng.

Change-Id: Ieb7b39426dec08bd715b6fe1a9ab5b2801bdf775
2010-03-25 02:01:32 -07:00
Brad Fitzpatrick
8f26b323d8 Try to fix sim build. Looks like gettid() is in unistd.h.
Change-Id: Ib1ecea86246ad75b2553b0ccc8ce03a53ffdf218
2010-03-25 00:25:37 -07:00
Brad Fitzpatrick
2c5da313dd Log blocking Binder calls to the EventLog.
This mimics what we do already for SQLiteDatabase's db_operation and
ContentProvider's content_query_operation and
content_update_operation:  over a threshold things are always logged,
and under which they're sub-sampled.

Change-Id: Ia0280b9b07b336ee88b17be2a31a7af0fd7c5770
2010-03-24 23:57:34 -07:00
Jeff Brown
4b4d3039ec Merge "Ensure Binder finalizer handles partially initialized instances." 2010-03-24 20:06:41 -07:00
Jeff Brown
582763ae4e Ensure Binder finalizer handles partially initialized instances.
If the Binder is allocated but its constructor does not run for some
reason, then Binder.init() will not be called.  Since the object was
allocated, it is still eligible for finalization.  Eventually when
the finalizer runs and calls Binder.destroy(), it will have a NULL
binder holder pointer.  Previously this would cause Binder.destroy()
to attempt to decrement a reference count on a NULL pointer.

Now we check and ignore the binder if it does not have a valid
holder pointer.

Bug: b/2533956
Change-Id: Ifc2729b2f2abe8bceea5a0645ae0a4c1575b7846
2010-03-24 19:44:50 -07:00
Ben Cheng
69c997a5c6 Update a stale JIT option name.
Change-Id: I4b2f2c215a0258adf52861bac025e32df7f40b14
2010-03-24 16:15:43 -07:00
Mike Reed
39f10ec7da If we detect a 9patch chunk, force the config chooser to avoid 565, with its pre-dithering madness
Change-Id: I0a2d1b094ccb16d479524779acec0216dc7a80ee
2010-03-24 10:12:35 -04:00
Mathias Agopian
af1e11b849 one step toward fixing [2501808] sapphire: OOM in GPU Surface area
when a surface was returned from a remote process through the binder we
would leak its resources until a GC happened.

implement writeToParcel to release the source when PARCELABLE_WRITE_RETURN_VALUE
is set

Change-Id: I6a9fa369b0d164a9ca1229b8a2944d3c132a3720
2010-03-23 15:31:21 -07:00
The Android Open Source Project
02034d3568 merge from open-source master
Change-Id: Ie60db5faf407344b8fbe3d5c1e7c01e927ff251e
2010-03-22 15:55:38 -07:00
Eric Olsen
aa0071d11b Add check for null name on SCO connect
Change-Id: I5f5064fd57a5fffaf02b3e96b7faab219c490e86
Signed-off-by: Eric Olsen <eolsen@android.com>
2010-03-19 13:50:56 -07:00
Eric Olsen
5e12aec163 Add the blacklist for the SCO connections
Change-Id: Ibfdfb21fb2f27d01d2b8bff48041398aa4308353
Signed-off-by: Eric Olsen <eolsen@android.com>
2010-03-18 18:08:02 -07:00
Vasu Nori
cc17ed29e0 ignore not-so-useful warning messages from sqlite logging func
bug:2524260
Change-Id: Ie397c0df9b63414205bbf8ea7ae9d1498f198524
2010-03-18 11:41:25 -07:00
Johannes Carlsson
ed0d1ab286 Everytime Bluetooth was turned off two file descriptors were not closed
Using close instead of shutdown on the file descriptors and only clear the file
descriptor that was closed. If both file descriptors are cleared the thread
will not be able to close it.
2010-03-16 15:12:39 +01:00
Daisuke Miyakawa
b945639d0c Make JNI function for setLocale() call register_localized_collators()
with the current locale, not previous one, every time it is possible.

Add a unit test verifying this fix.

BUG: 2514026
Change-Id: I4dd1b047e1ab4bf399e2c3ebc0304c0cfa3a0928
2010-03-16 09:54:10 +09:00
Dave Sparks
e6335c904a Add locking around AudioRecord release() function in JNI. Bug 2481952.
There is a potential threading issue where an app could call release()
on two threads. This hack adds a static lock object that serializes
access to the Java fields that contain the pointer to the native
AudioRecord object and weak reference to the Java object. Also
modifies finalize() to call release() so that both use the locking
scheme.

Change-Id: I09dcb19b7f501dc582e40e8718142b493eba2518
2010-03-15 07:47:05 -07:00
Vasu Nori
06ea4c7c6b Merge "add more debug info to SQL section in bugreport" 2010-03-11 11:42:45 -08:00
Vasu Nori
c3849200fa add more debug info to SQL section in bugreport
after this CL, adb bugreport will the following info (under SQL section
of each app's meminfo dump)

 SQL
            heap:      344       memoryUsed:      344
pageCacheOverflo:       67  largestMemAlloc:       50

 DATABASES
  Pagesize   Dbsize  Lookaside  Dbname
      1024        7         24  googlesettings.db
      1024       26        110  talk.db
      1024       11          0    (attached) transient_talk_db
      1024       11         32  subscribedfeeds.db
      1024       20         27  gservices.db

Change-Id: Iabd13be9793d9794137c60a045b84fa632f13498
2010-03-11 11:38:31 -08:00
Mike Reed
36ad54acef force purgeability for assets
Change-Id: I1067cfb91846a05290ed26ce9a62eb82d3170719
http://b/issue?id=1860187
2010-03-10 13:11:47 -05:00
Chia-chi Yeh
aa86859b10 YuvImage: jpeg_set_quality() should be called after jpeg_set_defaults().
Change-Id: I6579ad9241dd5ee6aabf54e1a1128d17b4f6b3e6
2010-03-10 17:08:58 +08:00
Jaikumar Ganesh
ae58f6d747 Merge "Add an API to set the link timeout." 2010-03-09 16:56:36 -08:00
Jaikumar Ganesh
b7e029d03c Add an API to set the link timeout.
This fixes the problem where the car dock is
powered on and off pretty quickly.

Change-Id: I8724641b8c337019f089b005cb236fc90549cf6f
2010-03-09 16:51:09 -08:00
Ficus Kirkpatrick
1a9c27c312 Add a LOG_TAG for android.graphics.Graphics JNI.
It occasionally logs when it fails an allocation but wasn't
defining one before.

Change-Id: Ifc41addc870eb126616ad44465638423d51568d9
2010-03-09 10:00:31 -08:00
Vasu Nori
c8195ffcfd Merge "rollback AFTER commit causes warning message from sqlite bug:2486731" 2010-03-08 11:08:10 -08:00
Mike Lockwood
2390380944 Merge "location: dump LocationProvider internal state" 2010-03-08 06:47:49 -08:00
Mike Reed
5bffb45057 Merge "hidden api sameAs() to compare the pixels of 2 bitmaps for equality" 2010-03-08 05:54:42 -08:00
Mike Reed
76d1e01d5e hidden api sameAs() to compare the pixels of 2 bitmaps for equality 2010-03-08 08:53:23 -05:00
Fred Fettinger
3c8fbdf5dd location: dump LocationProvider internal state
For each location provider, call getInternalState() to see if it has any
state information to include in a bugreport. If the returned string is not
null, then print a header with the provided name followed by the returned
string.

Change-Id: I0a388d7fba14ac8cadcb80eda0a0ceb95032410b
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-07 09:29:15 -05:00
Vasu Nori
78f307d229 rollback AFTER commit causes warning message from sqlite bug:2486731 2010-03-05 22:12:51 -08:00
Christopher Tate
7adc274abd Fix up missed refactoring in JNI reg and preloaded-classes
Change-Id: I079bdf4edfb9083eba3e15d8e4dbf3b2bad9190c
2010-03-05 18:26:41 -08:00
Christopher Tate
4528186e0d Refactor android.backup => android.app.backup
Change-Id: I0b21316ff890d7f3c7d4b82837bb60670724c2e8
2010-03-05 16:27:15 -08:00
Vasu Nori
16d8cf905b Merge "provide databasename to the logging func registration func" 2010-03-05 10:06:48 -08:00
Vasu Nori
bd29b7c2b7 provide databasename to the logging func registration func
this will allow sqlite to return this name, along with the message.
otherwise, sqlite logging messages are confusing without database
name to associate them with.
2010-03-04 16:16:03 -08:00
Dianne Hackborn
20cb56e26e Fix some bugs.
Bug #2376231: Apps lose window focus (and back key causes ANR) if the
lock screen is dismissed while the phone is in landscape mode

This is another case where we weren't recomputing the focused window
after changing the visibility policy.

bug #2479958: Investigate source of "Resources don't contain package
for resource number 0x7f0a0000"

Um, okay, so it turns out there were bugs all over the place where
we would load an XML resource from a another application, but not
use the Resources for that application to retrieve its resources...!
I think the only reason any of this stuff was working at all was
because it typically only cared about retrieving the resource
identifiers of the items (it would look up the values later).

Bug #2401082: Passion ERE26 monkey crash - InputMethodManagerService

Add some null checks.
2010-03-04 11:52:14 -08:00
Vasu Nori
91d0e3c950 resubmit reverted CL https://android-git.corp.google.com/g/#change,42682
register a logging func with sqlite, to get extra info on errors
sqlite3 (latest patch) from DRH included this functionality.
use it to get more useful debugging info from sqlite
2010-03-02 14:12:19 -08:00
Andy McFadden
7d7ce2bbdd Merge "Tone down a log message." 2010-03-02 07:36:23 -08:00
Mathias Agopian
5d26c1e38d Added a name to Surface created by SurfaceFlinger
Updated the window manager to use this new facility.
Surfaces name are now printed by "dumpsys".
2010-03-01 18:34:50 -08:00