Commit Graph

95 Commits

Author SHA1 Message Date
Dianne Hackborn
0f253efba5 Don't re-parse the framework resources all the time.
A small optimization to the resource code, to not re-parse the framework
resources every time we build a new AssetManager.  Instead, you can now
construct a ResTable from a previously created one...  of course, like the
existing code for using the data in-place, you can't delete the original
ResTable until you have deleted the one that has been constructed from it.
2009-07-06 11:12:37 -07:00
Android (Google) Code Review
f777ac1a2b Merge change 6084 into donut
* changes:
  Return CAMERA_ERROR_SERVER_DIED to camera app when camera service dies (bug 1956726)
2009-07-02 11:00:41 -07:00
James Dong
16f3d35459 Return CAMERA_ERROR_SERVER_DIED to camera app when camera service dies (bug 1956726) 2009-07-02 10:04:20 -07:00
Joe Onorato
00dae0a084 Less logging in some places. More in others. 2009-07-01 21:04:03 -04:00
Android (Google) Code Review
faeef8ede6 Merge change 5829 into donut
* changes:
  Fix issue #1673793: Theme styles don't apply.
2009-06-30 14:04:55 -07:00
Dianne Hackborn
e356292467 Fix issue #1673793: Theme styles don't apply.
It turns out this was not a problem in the resource code at all.  Rather,
the system process has a cache of pre-loaded attributes it uses to avoid
continually reloading things as it needs them.  Well it turns out this
cache wasn't flushed after a package was uninstalled or a configuration
changed, so you could re-install an app where you change its style resources
so its theme now points to one that is inconsistent in the cache.

This is mostly a problem for developers, where they continually install
new versions of an app where resources have changed.  This could possibly
show up when updating an app on a normal phone, although the problem would
eventually correct itself since this cache uses weak references.

Anyway, the cache is now reworked to be flushed appropriately.

This change also includes an update to aapt to be able to dump the
contents of bags in resources.
2009-06-30 13:27:30 -07:00
Wu-cheng Li
988fb62884 Allow setPreviewDisplay after startPreview. 2009-07-01 01:41:25 +08:00
Mathias Agopian
6b3287b5d4 fix [1947273] the DimLayer causes the whole screen to update during transactions 2009-06-28 02:54:16 -07:00
Android (Google) Code Review
d8c2564bbf 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
6eabaa311f Better (and less) logging from backup. 2009-06-26 17:19:11 -04:00
Dianne Hackborn
21342c5c19 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
Mathias Agopian
a8664df810 move ui/Time.cpp to core/jni, since this is the only place it is used 2009-06-25 14:39:56 -07:00
Christopher Tate
bd95c1d3af Only report "unknown metadata" once per restore helper
Also removes the auto-free object, replacing it with direct memory manipulation.
2009-06-24 13:57:29 -07:00
Christopher Tate
6441a76b2e Put back LOGP -> printf in the backup helper code 2009-06-24 11:20:51 -07:00
Android (Google) Code Review
8068d16df6 Merge change 5162 into donut
* changes:
  Preserve file access mode when backing up / restoring files
2009-06-24 11:18:01 -07:00
Dave Sparks
dc76f7bfa1 Remove deprecated callback function support.
This is the last of a 3-part change to modify the camera to use
a more streamlined callback interface. This change removes the
old code.
Bug 1884362
2009-06-24 07:58:27 -07:00
Dave Sparks
bbbc7cb77e 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
Christopher Tate
5c2882b25c Preserve file access mode when backing up / restoring files
This change adds a fixed-size metadata block at the head of each file's content
entity.  The block is versioned, and fixed-size on the theory that it might be
nice to be able to recover the content (if not the full metadata) of the files
if we're ever confronted with data backed up some hypothetical future helper
that stored expanded metadata.

The net effect is that now on restore, we assign the same access mode to the
file that it originally had when backed up.

Also, some of the code was failing to properly free transient heap-based buffers
when it encountered errors.  This has been fixed with the addition of a tiny
stack-based object whose job it is to free() its designated pointer from its
destructor.
2009-06-23 17:40:44 -07:00
Christopher Tate
ab2e9e81e1 Add file mode to the file-backup saved state blobs
This change puts the file's access mode into the saved-state blob used by the
file backup helpers.  The tests have been updated for the new blob content
format.

What this change *doesn't* do is actually backup/restore the file mode.  This
change is a prerequisite for that, but mode preservation in backup/restore will
require adding metadata to the backup data stream itself, so will be approached
a bit more carefully.

(Also fixed one outright bug in the test program: ReadEntityData() had been
changed to return a ssize_t union of either a byte-count or a negative number
indicating error, but the test program was still assuming that nonzero == error,
and was spuriously failing.)
2009-06-23 13:07:47 -07:00
Android (Google) Code Review
cfb991d1f8 Merge change 4910 into donut
* changes:
  fix warnings that will show up with GCC 4.4 (in master)
2009-06-22 14:01:25 -07:00
Joe Onorato
9cda3e02c6 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
Mathias Agopian
52ed26a78b fix warnings that will show up with GCC 4.4 (in master) 2009-06-22 02:35:32 -07:00
Dianne Hackborn
be1bc0a1f9 Report densities in badging, debugging for nine patch bug.
The aapt tool now reports all available densities like it already did
for locales.  Also this includes more resource data output, which I
was using to examine bug #1867049 (which at this point I am unable to
reproduce).
2009-06-19 15:13:28 -07:00
David 'Digit' Turner
ae71accf63 Fix sim-eng build and simplify previous lcd-density related patch 2009-06-19 04:41:12 +02:00
Joe Onorato
6bda7fd556 backup stuff 2009-06-18 18:41:11 -07:00
Joe Onorato
da1430be26 Make RestoreHelper and friends also write out the snapshot state. 2009-06-18 18:41:11 -07:00
Android (Google) Code Review
bcb14286cc Merge change 4565 into donut
* changes:
  Allow the qemu.sf.lcd_density property to override the value of ro.sf.lcd_density
2009-06-18 15:41:34 -07:00
David 'Digit' Turner
694e10ba87 Allow the qemu.sf.lcd_density property to override the value of ro.sf.lcd_density
ro.sf.lcd_density is usually defined in the build.prop file which is parsed by init
before anything else. Since its name begins with "ro.", this property is write-once
and cannot later be modified, e.g. in /system/etc/init.goldfish.sh.

In other words, you cannot use "emulator -prop ro.sf.lcd_density=<value>", since
it is impossible to override the value defined in build.prop

This patch modifies the system to recognize "qemu.sf.lcd_density" as an override
value, which can be set with "emulator -prop qemu.sf.lcd_density=<value>", forcing
a specific density.

A later patch will allow the emulator to automatically set this property depending
on AVD hardware configuration settings.
2009-06-19 00:17:31 +02:00
Joe Onorato
f509f669cf FileRestoreHelper and RestoreHelperDispatcher work. 2009-06-17 16:20:55 -07:00
Joe Onorato
03aa8d7d04 checkpoint BackupDatAInput / RestoreHelper 2009-06-16 18:46:50 -07:00
Joe Onorato
7bdc440894 Add RestoreFileHelper, BackupDataInput, and add java wrappers for the methods on BackupDataOutput. 2009-06-12 16:21:24 -07:00
Joe Onorato
1a9e19a73e Make the file backup helper not crash if a file you requested
can't be stated.  This means you don't need to know if the files
you are backing up exist or not -- we'll figure it out for you.
2009-06-11 14:51:45 -07:00
Joe Onorato
0ad6120dad 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
Christopher Tate
173e38d47c Fix back_up_files() error detection when opening/CRCing the file 2009-06-04 17:02:56 -07:00
Mathias Agopian
f446ba9dcb rename a few files to camel-case, add copyright notices 2009-06-04 13:53:57 -07:00
Android (Google) Code Review
489d3953f0 Merge change 2747 into donut
* changes:
  log the geomerty of surfaces causing an out of memory in SurfaceFlinger.
2009-05-29 14:55:48 -07:00
Mathias Agopian
3c4d8c83da log the geomerty of surfaces causing an out of memory in SurfaceFlinger. 2009-05-29 14:55:06 -07:00
Eric Laurent
01c4ba3563 Fix issue 1883666: Audio coming from the music player stopped suddenly
The problem comes from the code handling the automatic change of audio routing to speaker when notifications are played. The music is also muted while the sound is forced to speaker.
To avoid truncating the end of the notification, a delay is inserted between the end of the notification and the restoration of the audio routing.  If a new notification starts during this delay, the current music mute state read and saved before muting music corresponds to the forced mute due to previous notification. When the new notification ends, the mute state restored is muted and music stream stays muted for ever.

The fix consists in reading and saving music mute state only if the audio routing has been restored (check that mForcedRoute is back to 0).
2009-05-29 02:03:21 -07:00
Mathias Agopian
35801cea5f minor clean-up to Rect and Point.
- return "const" objects for overloaded operators to disallow constructs like: (a+b) = c;
- don't return references to non-static members, it's not always safe.
- Point.cpp was empty, so get rid of it
2009-05-26 17:47:39 -07:00
Eric Laurent
570dd0b4da 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
Android (Google) Code Review
ca7b80e431 Merge change 2359 into donut
* changes:
  Fix for the simultor build breakage.
2009-05-23 14:05:50 -07:00
Nicolas Catania
b4c4265f9e Fix for the simultor build breakage.
Added missing include sys/time.h for utimes.

Detects when stat64 uses a timespec for the modif and access times
and work around the missing st_*time_nsec.

Apologies for the whitespace changes, emacs removed them automatically.
2009-05-22 15:54:26 -07:00
Android (Google) Code Review
b6333b34a2 Merge change 2351 into donut
* changes:
  Fix a major bug in Bundle when unparcelling from AIDL.
2009-05-22 14:51:22 -07:00
Dianne Hackborn
8af0f82d89 Fix a major bug in Bundle when unparcelling from AIDL.
There was a serious problem in the Bundle(Parcel) and readFromParcel() methods,
where it wasn't doing the copying of the Parcel that Parcel.readBundle() does
and is a basic requirement for it to work correctly.

This re-arranges the code to make all of these functions (hopefully) correct.

Also fix a problem in Parcel where we were not duping fds when copying data from
one Parcel to another.
2009-05-22 13:51:47 -07:00
Marco Nelissen
d95aabc9eb This should fix the simulator build. 2009-05-22 12:25:56 -07:00
Mathias Agopian
a1ecca920e split boot animation out of SurfaceFlinger
Conflicts:

	data/etc/platform.xml
2009-05-21 19:21:59 -07:00
Mathias Agopian
53f6f3c799 bring the native_handle stuff back from master_gl 2009-05-20 14:33:23 -07:00
Joe Onorato
473b6e2d2d Hook up the backup data writer, and add a utility to read the backup data files. 2009-05-20 11:24:20 -07:00
Dave Sparks
6c41033c47 Remove deprecated openInputStream factory method 2009-05-19 18:56:13 -07:00
Dave Sparks
6554773d62 Update more references to openInputStream in support classes.
Continuation of bug 1846343
2009-05-19 18:28:20 -07:00