125 Commits

Author SHA1 Message Date
Dave Sparks
da57856d74 Add logging to help track down intermittent bug 2009-07-21 08:43:29 -07:00
Android (Google) Code Review
261a784c44 Merge change 7720 into donut
* changes:
  Fix global ref leak in android.media.AudioRecord. Delete global refs to the native AudioRecord pointer and the callback cookie (for native to Java calls) in the finalize() function and when an error occurs during the allocation of the native resources.
2009-07-17 14:39:52 -07:00
Jean-Michel Trivi
4bac5a3928 Fix global ref leak in android.media.AudioRecord. Delete global refs
to the native AudioRecord pointer and the callback cookie (for native
to Java calls) in the finalize() function and when an error occurs
during the allocation of the native resources.
2009-07-17 12:05:31 -07:00
Android (Google) Code Review
09a903ab5b Merge change 7696 into donut
* changes:
  add hidden Options field for native allocations
2009-07-17 11:04:06 -07:00
Mike Reed
1b22b97925 add hidden Options field for native allocations 2009-07-17 11:21:47 -04:00
Jean-Michel Trivi
8a1496855c Delete leaked global ref in AudioTrack constructor. 2009-07-16 15:59:44 -07:00
Dave Sparks
8978bd0174 Cleanup of unused enums 2009-07-14 08:02:37 -07:00
Dave Sparks
c4ca420625 Fix build 2009-07-13 09:42:43 -07:00
Dave Sparks
a95f495f75 Use SetByteArrayRegion to minimize copy overhead and JNI calls. 2009-07-10 18:13:36 -07:00
Dave Sparks
75acd89648 Avoid memcpy's by using GetPrimitiveArrayCritical. 2009-07-10 16:10:49 -07:00
Android (Google) Code Review
463aacfbd2 Merge change 6661 into donut
* changes:
  wifi: WifiManager.startScan() will now do passive scans by default.
2009-07-09 14:22:25 -07:00
Android (Google) Code Review
16f676f4f8 Merge change 6660 into donut
* changes:
  Fix a small bug in array length bounds checking.
2009-07-09 14:10:38 -07:00
Mike Lockwood
a5ec95cdb1 wifi: WifiManager.startScan() will now do passive scans by default.
Active scans will only happen if a hidden AP is in use, or if the new method
WifiManager.startScanActive() is called.
This fixes some audio playback problems with bluetooth A2DP.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-09 16:54:39 -04:00
Dan Egnor
6d877383bc Fix a small bug in array length bounds checking. 2009-07-09 13:48:36 -07:00
Dave Sparks
59c1a93529 Add timestamps to video frames to improve A/V sync.
Bug 1927069.
2009-07-08 15:59:25 -07:00
Eric Laurent
88e209dcf8 Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR
Store sample rate on 32 bits instead of 16 bits in audio_track_cblk_t.
Removed sampleRate() methods from AudioTrack and AudioRecord: replaced by getSampleRate().
AudioTrack::setSampleRate() no returns a status.
2009-07-07 07:10:45 -07:00
James Dong
a1b653d41d Return CAMERA_ERROR_SERVER_DIED to camera app when camera service dies (bug 1956726) 2009-07-02 10:04:20 -07:00
Dave Sparks
d0cbb1a52d Check to make sure the Java camera object is still valid on the
callback from native. Omitted from previous fix. Bug 1936850.
2009-06-30 13:20:30 -07:00
Wu-cheng Li
b8a10fe456 Allow setPreviewDisplay after startPreview. 2009-07-01 01:41:25 +08:00
Android (Google) Code Review
d09f86ce17 Merge changes 5548,5549 into donut
* changes:
  Better (and less) logging from backup.
  Add an extra null terminator.  String8::unlockBuffer is supposed to be doing this, but it's not and I can't figure out why.  This makes BackupHelperDispatcher able to read the keys correctly.
2009-06-26 14:19:59 -07:00
Joe Onorato
12a4da328a Add an extra null terminator. String8::unlockBuffer is
supposed to be doing this, but it's not and I can't
figure out why.  This makes BackupHelperDispatcher able
to read the keys correctly.

Also, we weren't writing the data size.
2009-06-26 17:18:01 -04:00
Android (Google) Code Review
17a80081a4 Merge change 5544 into donut
* changes:
  Pipe all the camera callbacks to Java to facilitate the addition of new features. This will make it easy to add things like zoom callbacks without modifying the entire camera stack. Bug 1837832.
2009-06-26 14:02:10 -07:00
Dianne Hackborn
723738cfae Expand support for different screen sizes.
Applications can now declare that they support small, normal, or
large screens.  Resource selection can also be done based on these
sizes.  By default, pre-Donut apps are false for small and large,
and Donut or later apps are assumed to support all sizes.  In either
case they can use <supports-screens> in their manifest to declare
what they actually support.
2009-06-26 13:37:05 -07:00
Dave Sparks
c62f9bd133 Pipe all the camera callbacks to Java to facilitate the addition
of new features. This will make it easy to add things like zoom
callbacks without modifying the entire camera stack.
Bug 1837832.
2009-06-26 13:33:32 -07:00
San Mehat
7d619f18a2 framework: process: Set the control group of a thread to the background group
if the priority is logically-lower than ANDROID_PRIORITY_BACKGROUND

Signed-off-by: San Mehat <san@google.com>
2009-06-26 08:38:13 -07:00
Joe Onorato
4ababd922e Make the BackupHelperDispatcher properly handle multiple helpers. 2009-06-25 20:36:09 -04:00
Mathias Agopian
864c0d50cd move ui/Time.cpp to core/jni, since this is the only place it is used 2009-06-25 14:39:56 -07:00
Amith Yamasani
add868ceba Skip spaces and tabs in readProcLines()
This is to fix a problem in the parsing of /proc/pid/status file.
2009-06-25 12:24:56 -07:00
Dave Sparks
5e27115995 Use a ref-counted callback interface for Camera.
This allows the camera service to hang onto the callback interface
until all callbacks have been processed. This prevents problems
where pending callbacks in binder worker threads are processed
after the Java camera object and its associated native resources
have been released.
Bug 1884362
2009-06-24 07:58:27 -07:00
Joe Onorato
06290a4bb9 Helper API cleanup. Allows multiple helpers to function,
because they'll always go in the same order, and this lets
us not have to write headers to keep them paired.
2009-06-22 13:02:24 -07:00
Wei-Ta Chen
8cdcb12752 Add prepareToDraw() to Bitmap for fixing http://b/issue?id=1907995.
The function is used to rebuild any caches associated with the bitmap.
In the case of purgeable bitmaps, this call ensures that the pixels
are decoded for drawing, and therefore prefetching techniques
implemented by callers can be leveraged.
2009-06-22 18:01:47 +08:00
Android (Google) Code Review
066e6bfd01 Merge change 4792 into donut
* changes:
  when we reset a paint, it should return to the state it was in when it was first created. for java, this means setting its text-encoding to UTF16...
2009-06-19 13:30:15 -07:00
Mike Reed
290f5baf91 when we reset a paint, it should return to the state it was in when it was first created.
for java, this means setting its text-encoding to UTF16...
2009-06-19 15:13:39 -04:00
Mike Lockwood
a9e546169b gps: Set SUPL server via hostname rather than IP address.
The GPS engine needs the hostname for the secure SUPL case
and deferring the DNS lookup to the HAL might be helpful in the future
if the SUPL server is on a carrier's private network.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-06-19 14:54:42 -04:00
Joe Onorato
d2d9ceb730 Make RestoreHelper and friends also write out the snapshot state. 2009-06-18 18:41:11 -07:00
Nick Pelly
4a364130fb Fix runtime restarts due to sending the wrong flags to dbus.
In eventLoopMain we were correctly translating from unix events to dbus flags,
but a coding typo then gave the unix events to dbus. Fix this typo.

Also noticed that we were passing raw dbus flags to poll() in another area.
This did not cause any immediate problem, since POLLIN | POLLPRI is harmless
and we do not usually need POLLOUT. But fixed anyway.
2009-06-18 15:33:31 -07:00
Android (Google) Code Review
ed336839d2 Merge change 4515 into donut
* changes:
  Tell DBUS not to call _exit() if the DBUS connection disconnects.
2009-06-17 15:41:51 -07:00
Nick Pelly
9e0a19515b Tell DBUS not to call _exit() if the DBUS connection disconnects.
This was causing the system server to quietly die. Naughty DBUS!!

Now you will just see errors in the log "DBUS connection disconnected"
on every DBUS call.

There is still the root cause problem of why the DBUS connection disconnects,
which is not addressed by this change.
2009-06-17 15:27:59 -07:00
Joe Onorato
5f15d151b5 checkpoint BackupDatAInput / RestoreHelper 2009-06-16 18:46:50 -07:00
Android (Google) Code Review
b4f7592b03 Merge change 4299 into donut
* changes:
  Allow pre-Donut apps to use indirect Buffers in GL11 Pointer methods.
2009-06-15 21:55:01 -07:00
Jack Palevich
91a27ae2fe Allow pre-Donut apps to use indirect Buffers in GL11 Pointer methods.
Apps targeting Donut and newer will throw an exception.

We use a heuristic to determine whether an app is pre-Donut or not:
We take the address space's __progname, and use that as the application's
package name. For simple applications this is correct.
2009-06-15 21:03:24 -07:00
San Mehat
1fd0ec738b process: Fix bug where if a thread exited while we were changing its control
group, we'd bail out and report an exception. This situation is *not*
    an error.

Signed-off-by: San Mehat <san@google.com>
2009-06-15 16:56:52 -07:00
Christopher Tate
2fdd428e0f Fix some backup reader/writer issues; make local transport do backup
As of this change, LocalTransport is successfully propagating data changes from
the backup data format into a repository stored in /cache/backup/[packagename].
Each backup key gets a separate file there for ease of manipulation and testing.

The general semantics of BackupDataReader have been tweaked, too; it now just
returns simple "we're done with the data" when it hits the end, even if no
footer has been found, because on the writing side the footer isn't being
written.  Also, reading an entity now merely requires a "big enough" buffer, not
an exactly-sized one.

This is all a work in progress, but this is at least working now for purposes of
this local transport.

Still to do: proper change vs deletion detection, as well as expanding the data
format itself to include necessary metadata etc.
2009-06-14 19:39:29 -07:00
Joe Onorato
03f4df4b3b Fix the jni initializer. 2009-06-12 18:59:25 -07:00
Joe Onorato
1cf587496f Add RestoreFileHelper, BackupDataInput, and add java wrappers for the methods on BackupDataOutput. 2009-06-12 16:21:24 -07:00
Joe Onorato
23ecae3bbb Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.
This took quite a bit of refactoring.
2009-06-11 11:29:57 -07:00
Mike Lockwood
d26ce0d903 GpsLocationProvider: Add hooks for GPS location injection.
This will allow injecting cell ID location to the GPS
(not implemented yet).

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-06-11 12:42:25 -04:00
San Mehat
0cb53209c3 process: Clean up cgroup management
Signed-off-by: San Mehat <san@google.com>
2009-06-10 09:10:42 -07:00
Wu-cheng Li
ba55b3654b Change exceptions to RuntimeException.
This is to follow hardware/Cmaera.java because those exceptiones are not declared to be thrown.
2009-06-10 17:17:31 +08:00
Mathias Agopian
8ae2335a3c rename a few files to camel-case, add copyright notices 2009-06-04 13:53:57 -07:00