573 Commits

Author SHA1 Message Date
Nick Pelly
cb2555ebb6 am d19c397b: Merge "Do not log AT command traffic by default." into froyo
Merge commit 'd19c397b04f485e0af5990f3541e703934869290' into froyo-plus-aosp

* commit 'd19c397b04f485e0af5990f3541e703934869290':
  Do not log AT command traffic by default.
2010-06-24 11:55:56 -07:00
Nick Pelly
801dbe26ee Do not log AT command traffic by default.
Bug: 2792732
Change-Id: I0ef25f38f38685291af6680cf653046eb391da5a
2010-06-24 11:48:54 -07:00
The Android Open Source Project
7d10df4e24 merge from open-source master
Change-Id: I0684cac9eb230d864614aef0634c072f4e3ef6a3
2010-06-15 11:37:17 -07:00
Szymon Jakubczak
9bf3bb21c0 - updates NetUtils to use new libnetutils headers
- updates WifiStateTracker to track net.XXX.dnsX properties for name servers
- removes dhcp from WifiNative (use NetworkUtils instead)

Change-Id: Ic69ff253e8784cad34e9291e7970ee38bfa235b9
2010-06-15 10:22:25 -07:00
Irfan Sheriff
0631c608b0 merge from open-source master
Change-Id: I8a950276787e9439420db396d0e32f88bd6e04cc
2010-06-11 15:14:29 -07:00
Mikael Kanstrup
ea8bd1d167 WLAN: Reset power save mode to startup value after DHCP response.
When the driver was configured to run with power save mode disabled the
power save mode incorrectly got reverted back to AUTO mode right after
DHCP response. The power save mode value is now saved so that the device
properly reverts back to a previous mode after DHCP response.

Change-Id: I5035aad10146812ecef1be8ea4b22a03e230ccc9
2010-06-10 14:51:43 +02:00
Christopher Tate
ecaa7b41ca Watchdog now records kernel stacks when it fires
The kernel threads are appended to the usual /data/anr/traces.txt file
and dropboxed along with the usual Dalvik stack dumps.

Change-Id: I120f1f5ee54c965efe9ac0c7f40fdef56385f1fa
NOTE: this change depends on the kernel publishing /proc/$PID/stack
2010-06-04 14:55:02 -07:00
Dianne Hackborn
906497c574 Hopefully fix issue #2662536: Why is launcher being killed?
It looks like there was a subtle bug where Process.setOomAdj() could
return false just because the given process doesn't exist, even though
it is documented to only return false if OOM killing is not supported
at all.  This would cause the activity manager to fall into its code
path of trying to clean up processes itself, which it does a much
poorer problem at.  I am thinking we may be seeing this problem more
now that the activity manager is killing background processes itself
when there are too many of them.

In addition, this change cleans up and reduces some of the logging
around killing processes.

Finally, try to improve process LRU management a bit by taking
into account process dependencies.  Any dependent processes are
pulled up in the LRU list with the processes that is actually
moving.  Also, we bring a process up if someone accesses its content
provider.

Change-Id: I34ea161f839679345578ffe681e8d9c5d26ab948
2010-05-10 17:19:58 -07:00
Daisuke Miyakawa
5763c1f501 Call register_localized_collators() with the current locale.
Make JNI function for setLocale() call register_localized_collators()
with the current locale, not previous one, every time it is possible.

This is a partial cherry-pick of b945639d0c3fa1850c07a2b80f476c8d242a8bde

BUG: 2514026
Change-Id: I584f1f68814dc084e699714e9d14a034123b49da
2010-05-05 09:01:48 -07:00
Marco Nelissen
8138cb49e4 Make Surface.toString() show more useful info to help debug bug 2594388.
Change-Id: I005d3388503d8886e11a26fece30b87572934f15
2010-04-26 16:51:17 -07:00
Carl Shapiro
8ba73ac72c Remove code to pass the nonexistant lockprofsample flag to Dalvik.
Change-Id: If334e21d770bc21a9b7c4f04d0fb652f53359231
2010-04-20 01:27:50 -07:00
Carl Shapiro
d8f3ec6e83 Add command line flags to enable lock profiling. 2010-04-15 22:42:17 -07:00
Dan Egnor
4e8d8238e1 Fix sim build (sim doesn't have strl*() reliably...)
Just stub out the TrafficStats code for the sim.
Bug: 2578938

Change-Id: Ie555f67f581d05ee446ea29cb2223feb350c52f9
2010-04-08 23:47:06 -07:00
Dan Egnor
78158db510 Hail-Mary attempt to avoid apparent blocking problems in readEvents().
Use the same procedure (select() with a short timeout) used by "logcat -d",
which doesn't seem to have any blocking problems.

Bug: 2569403
Change-Id: Ia27bb4207919a1288716b41a007b4b4b52f8e90a
2010-04-08 22:59:43 -07:00
Dan Egnor
2b4abcd0c7 Change TrafficStats to a new JNI implementation.
Also change phone's ConnectionStateTrackers to use it directly,
rather than through the INetStat binder interface.

Bug: 2578938
Change-Id: I8858e2609cbec3be845a0ce5178cb03f67e01b41
2010-04-07 19:06:29 -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
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
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