141 Commits

Author SHA1 Message Date
Robert Greenwalt
91f22f901b Use new wifi cmd rssi-approx when polling.
Cheaper approx call should be used when polling every 3 sec for
wifi signal strength.  Fixes bug 1903653.
2009-06-08 18:33:24 -07:00
Mathias Agopian
8ed6beb515 rename string_array.h to StringArray.h and move the implementation from the header file to a new cpp file.
StringArray is used in two places in framework/base and in the Sim. Ideally we should get rid of it and use Vector<String8> instead of creating new code.
2009-06-05 01:26:23 -07:00
Android (Google) Code Review
1b6aee1515 am 2a318867: Merge change 3203 into donut
Merge commit '2a3188672ab2b65c0ce7c9c598a463e382c47696'

* commit '2a3188672ab2b65c0ce7c9c598a463e382c47696':
  rename a few files to camel-case, add copyright notices
2009-06-04 22:44:18 -07:00
Android (Google) Code Review
7d53a6bf4d am a4196206: Merge change 3074 into donut
Merge commit 'a41962065a93b63e7161cffd662b564e01a9e189'

* commit 'a41962065a93b63e7161cffd662b564e01a9e189':
  Modify the decoding logic in the FD case when a purgeable flag is set,
2009-06-04 22:42:01 -07:00
Mathias Agopian
8ae2335a3c rename a few files to camel-case, add copyright notices 2009-06-04 13:53:57 -07:00
Wei-Ta Chen
2a2c5cd741 Modify the decoding logic in the FD case when a purgeable flag is set,
and lower the threshold of bitmap size for using ashmem().

For the decoding logic, we now go through the "non-purgeable" path if isShareable is false,
irrespective of the value of the purgeable flag.
2009-06-03 14:27:52 -07:00
Android (Google) Code Review
3ddc43945c Merge change 2969
* changes:
  Implement and expose SCO socket support in BluetoothSocket.java.
2009-06-03 10:11:29 -07:00
Bjorn Bringert
c0cbfda0fe am 963cd006: Allow creating AssetFileDescriptors for MemoryFiles.
Merge commit '963cd006c45716b034f656bf7e7179e6476f7e4d'

* commit '963cd006c45716b034f656bf7e7179e6476f7e4d':
  Allow creating AssetFileDescriptors for MemoryFiles.
2009-06-03 04:56:49 -07:00
Bjorn Bringert
963cd006c4 Allow creating AssetFileDescriptors for MemoryFiles.
This allows content providers to use in-memory data to implement
ContentProvider.openAssetFile(), instead of just normal files
and sockets as before.

To test cross-process use of AssetFileDescriptors for MemoryFiles,
a test content provider and a client for it are added to
AndroidTests.

Fixes http://b/issue?id=1871731
2009-06-03 12:53:42 +01:00
Nick Pelly
6a669fac38 Implement and expose SCO socket support in BluetoothSocket.java.
Implement L2CAP socket support, but do not expose it (untested).

NEXT: Switch to Builder style constructor instead of factory method.
2009-06-02 16:05:09 -07:00
Android (Google) Code Review
7174bc48dc Merge change 2898
* changes:
  Implement bulk read and writes for Bluetooth sockets.
2009-06-02 12:44:35 -07:00
Nick Pelly
47e82dee6b Implement bulk read and writes for Bluetooth sockets.
Before: 0.1 kB/s
After: 100 kB/s
(in my java BT speed test app)
2009-06-02 12:35:48 -07:00
Android (Google) Code Review
385a4894d0 am 4ff42ad6: Merge change 2843 into donut
Merge commit '4ff42ad6d7218b89435424b53951c1bdb8ef6b8b'

* commit '4ff42ad6d7218b89435424b53951c1bdb8ef6b8b':
  Use JNI region calls in MemoryFile read and write.
2009-06-02 01:27:06 -07:00
Bjorn Bringert
ad984f1933 Use JNI region calls in MemoryFile read and write.
This will reduce copying or pinning, depending on GC policies, which should
improve performance. See dalvik/docs/jni-tips.html#RegionCalls for more information.

Fixes http://b/issue?id=1887911
2009-06-02 09:22:42 +01:00
Fred Quintana
03d9490758 - create a new generic ISyncAdapter implementation, SyncAdapterNew
- change the applyBatch to take an ArrayList rather than an []
 - change Entity to be a final flass that contains ContentValues
 - remove the ability to update/insert Entities by a ContentProviderOperation
2009-06-01 16:17:03 -07:00
Mathias Agopian
3b4062eeb0 get rid of utils.h 2009-05-31 19:13:00 -07:00
Bjorn Bringert
0ad6dc0ebc am 761e0918: Unmap memory in MemoryFile.close().
Merge commit '761e0918d30b6a3f292625b44b86dffd1538bc78'

* commit '761e0918d30b6a3f292625b44b86dffd1538bc78':
  Unmap memory in MemoryFile.close().
2009-05-29 06:48:43 -07:00
Bjorn Bringert
761e0918d3 Unmap memory in MemoryFile.close().
As reported in http://b/issue?id=1398215 MemoryFile did not
munmap(2) the ashmem region after closing it. This
causes the process to leak virtual address space.

This change fixes the problem by calling munmap(2) in
close(). The unmapping is done by a helper method deactivate().
The change also replaces the use of an int for the
file descriptor with a FileDescriptor object to
make sure that we keep track of when the file descriptor
has been closed. I chose to implement it this way because I
will need decativate() and a FileDescriptor object in an
upcoming change that allows sending MemoryFile file
descriptors between processes.

The change also adds a number of tests for the behavior
of close(). The testCloseRead() and testCloseWrite() fail
with the old MemoryFile implementation, and testCloseLeak()
causes a segfault. They all pass now.
2009-05-29 13:28:14 +01:00
Patrick Scott
9b36f494e5 Fix the boot. The signature needed a V at the end. 2009-05-27 12:53:20 -04:00
Android (Google) Code Review
67880624cc am c0139711: Merge change 2432 into donut
Merge commit 'c0139711b0e4a07ad997fb4130c674ed2d90e2fc'

* commit 'c0139711b0e4a07ad997fb4130c674ed2d90e2fc':
  Make android_runtime to not include libemoji but use dlopen() instead.
2009-05-27 04:50:13 -07:00
Android (Google) Code Review
c0139711b0 Merge change 2432 into donut
* changes:
  Make android_runtime to not include libemoji but use dlopen() instead. This must be submitted with change 2432
2009-05-27 04:48:21 -07:00
Android (Google) Code Review
0d1e146cb7 Merge change 2007
* changes:
  New BluetoothSocket API.
2009-05-26 19:47:08 -07:00
Nick Pelly
0b6955a48b New BluetoothSocket API.
Modeled on blocking java.net.Socket and java.net.ServerSocket library.

Public interface is:

public final class BluetoothSocket implements Closeable {
   public static BluetoothSocket createRfcommSocket(String address, int port) throws IOException;
   public static BluetoothSocket createInsecureRfcommSocket(String address, int port) throws IOException;

   public void connect() throws IOException;
   public void close() throws IOException;

   public String getAddress();
   public InputStream getInputStream() throws IOException;
   public OutputStream getOutputStream() throws IOException;
}

public final class BluetoothServerSocket implements Closeable {
   public static BluetoothServerSocket listenUsingRfcommOn(int port) throws IOException;
   public static BluetoothServerSocket listenUsingUnsecureRfcommOn(int port) throws IOException;

   public BluetoothSocket accept() throws IOException;
   public BluetoothSocket accept(int timeout) throws IOException;
   public void close() throws IOException;

}
2009-05-26 19:39:21 -07:00
Android (Google) Code Review
c5d0343b67 am de8268d6: Merge change 2331 into donut
Merge commit 'de8268d6d1cd168510c490b17e93154d2eab767c'

* commit 'de8268d6d1cd168510c490b17e93154d2eab767c':
  Fix issue 1846343 - part 1
2009-05-26 10:11:44 -07:00
Android (Google) Code Review
3ef9697397 am 8fc5a63d: Merge change 2431 into donut
Merge commit '8fc5a63d422fd32258dc18fe0e635b4f1486fd61'

* commit '8fc5a63d422fd32258dc18fe0e635b4f1486fd61':
  wifi: Fix problem parsing RSSI when the AP name contains a space.
2009-05-26 10:11:36 -07:00
Android (Google) Code Review
de8268d6d1 Merge change 2331 into donut
* changes:
  Fix issue 1846343 - part 1
2009-05-26 10:04:50 -07:00
Daisuke Miyakawa
63507babb6 Make android_runtime to not include libemoji but use dlopen() instead.
This must be submitted with change 2432
2009-05-27 00:27:23 +09:00
Eric Laurent
4bc035a65c Fix issue 1846343 - part 1
This change is the first part of a fix for issue 1846343, :
- Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources.
- renamed streamType to inputSource in all native functions handling audio record.

A second change is required in opencore author driver and android audio input to completely fix the issue.
2009-05-26 07:44:28 -07:00
Mike Lockwood
c5ad0f4725 wifi: Fix problem parsing RSSI when the AP name contains a space.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-25 22:34:20 -04:00
Mike Lockwood
b57d6c9939 am 270e87f7: Sensors: Use a native_handle for the data channel instead of a single file descriptor.
Merge commit '270e87f71abc2edf446dbec20c725c823e8c7f37'

* commit '270e87f71abc2edf446dbec20c725c823e8c7f37':
  Sensors: Use a native_handle for the data channel instead of a single file descriptor.
2009-05-23 10:36:58 -07:00
Mike Lockwood
270e87f71a Sensors: Use a native_handle for the data channel instead of a single file descriptor.
This eliminates the requirement that all sensors share a single file descriptor.
This, along with concurrent changes in other projects, fixes bugs b/1614524 and b/1614481

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-23 13:22:08 -04:00
Nick Pelly
f5e17310d1 Remove Database.java API.
This provided SDP functionality to Java, but is not currently used by any Apps.

I will shortly be providing SDP functionality in a new API, but it will be
quite different to this one, and in the mean-time keeping this stale code
updated with other API changes is a pain.
2009-05-20 15:24:14 -07:00
Mathias Agopian
0795272aa2 move libbinder's header files under includes/binder 2009-05-20 12:55:03 -07:00
Mathias Agopian
25ba5b6564 checkpoint: split libutils into libutils + libbinder 2009-05-20 12:55:02 -07:00
Android (Google) Code Review
bad962bf40 am e2914615: Merge change 2099 into donut
Merge commit 'e29146158b6048936671decc060d398a68333fc0'

* commit 'e29146158b6048936671decc060d398a68333fc0':
  Hook up the backup data writer, and add a utility to read the backup data files.
2009-05-20 11:58:08 -07:00
Joe Onorato
d2110dbce0 Hook up the backup data writer, and add a utility to read the backup data files. 2009-05-20 11:24:20 -07:00
Android (Google) Code Review
ab66d5c9fa am 90bd7338: Merge change 2075 into donut
Merge commit '90bd7338df76c0a6185f4ff2fe7f981fa1a1d36c'

* commit '90bd7338df76c0a6185f4ff2fe7f981fa1a1d36c':
  Fix bad filtering of error code when set_position_mode() is being called.
2009-05-20 08:54:42 -07:00
David 'Digit' Turner
9a940e8b3d Fix bad filtering of error code when set_position_mode() is being called. 2009-05-20 14:23:46 +02:00
San Mehat
e27a8c9b1e am 3e458241: process: Add setProcessGroup() hidden API call to set the cgroup of a process and all its child threads.
Merge commit '3e458241d9930465a20a861ecb42744355d48e48'

* commit '3e458241d9930465a20a861ecb42744355d48e48':
  process: Add setProcessGroup() hidden API call to set the cgroup of
2009-05-19 15:01:47 -07:00
San Mehat
3e458241d9 process: Add setProcessGroup() hidden API call to set the cgroup of
a process and all its child threads.

Signed-off-by: San Mehat <san@google.com>
2009-05-19 14:44:16 -07:00
Android (Google) Code Review
3e9b3eae7c am ce2372de: Merge change 1836 into donut
Merge commit 'ce2372de58ad018623748f63e61ffc70c9eb8895'

* commit 'ce2372de58ad018623748f63e61ffc70c9eb8895':
  Fix bug 1856713 gl Pointer functions should use Buffer position
2009-05-18 09:31:42 -07:00
Jack Palevich
16e7972f0d Fix bug 1856713 gl Pointer functions should use Buffer position
JSR239 and android.opengl gl Pointer functions (glColorPointer, etc.)
now respect the current setting of the Buffer position.

This fixes a regression introduced when we started requiring the
Buffers passed to the Pointer functions to be direct Buffers.
2009-05-15 18:13:34 -07:00
Eric Fischer
d2146d4a7c resolved conflicts w/ 5bd644caf73e76750feef1a82b8817d32f5367fc merge.... 2009-05-15 11:38:38 -07:00
Eric Fischer
5bd644caf7 Start using CLDR for some date-and-time strings and formats.
Use java.text.DateFormat where possible, since that is already using
the CLDR data for the things it supports.  Remove an unused date format
object from DatePickerDialog.

Add a new method for getting the standalone month names from applications,
although @hidden for now because it is an API change.

Pass the standalone month names down to native code in Time so that
tztime's strftime() can use them.

And then the bulk of the change: replace all the names for the months
and the days of the week, and AM and PM, and yesterday, today, and tomorrow,
with strings from CLDR.  And replace several of the date format strings
with ones derived from CLDR, but reformatted to use strftime() style
instead of SimpleDateFormat style.

All these resource changes go into new donottranslate-cldr.xml files
and are removed from strings.xml so that they aren't part of the
normal translation process and the translators don't have to bother
with them (and risk messing them up).
2009-05-15 10:15:50 -07:00
Android (Google) Code Review
a64b860749 am aa642c0c: Merge changes 1591,1596 into donut
Merge commit 'aa642c0cc20293137376d44f8221876c121e5be9'

* commit 'aa642c0cc20293137376d44f8221876c121e5be9':
  Get the backup calling through to the file backup helper.
  Fix typos.
  Add a new feature to android.os.Debug to add the ability to inject only specific fields when calling setFieldsOn().
  Fixes #1836075. Adds consistency checks for the View hierarchy. To enable them, you need a debug build and ViewDebug.sConsistencyCheckEnabled set to true in debug.prop. This change also lets you easily enable drawing and layout profiling in ViewRoot by setting ViewRoot.sProfileDrawing, ViewRoot.sProfileLayout and ViewRoot.sShowFps in debug.prop with a debug build.
  Add Intent.ACTION_APP_ERROR
2009-05-14 14:53:27 -07:00
Joe Onorato
290bb011c5 Get the backup calling through to the file backup helper.
This includes some cleanup to make the parameters match
between BackupService.onBackup and FileBackupHelper.performBackup.
2009-05-14 09:39:32 -04:00
Android (Google) Code Review
7118a2cf54 am 807f23b: Merge change 1057 into donut
Merge commit '807f23b2d8c7148cf6fc95bb88cfc2f78e4be66a'

* commit '807f23b2d8c7148cf6fc95bb88cfc2f78e4be66a':
  * Add regoin scaling for transparent support
2009-05-12 22:39:07 -07:00
Romain Guy
15203958fd am 2bb3ea1: Fix native core runtime. A messy declaration was causing a p
Merge commit '2bb3ea162a58c0f1dddccdbe68b64e02456f11f9'

* commit '2bb3ea162a58c0f1dddccdbe68b64e02456f11f9':
  Fix native core runtime. A messy declaration was causing a problem at boot time.
2009-05-12 22:39:06 -07:00
Android (Google) Code Review
807f23b2d8 Merge change 1057 into donut
* changes:
  * Add regoin scaling for transparent support
2009-05-12 15:45:25 -07:00
Romain Guy
2bb3ea162a Fix native core runtime. A messy declaration was causing a problem at boot time. 2009-05-12 15:43:26 -07:00