Commit Graph

958 Commits

Author SHA1 Message Date
Mathias Agopian
3790e7997a revert surfaceflinger leak fix as it uncovered a crasher on xoom
Bug: 4600244
Change-Id: Ia68ebf0f243a051ff6a21b3863e3e5d259bbf7ac
2011-06-15 19:31:04 -07:00
Mathias Agopian
35cc0fcd51 am afffa8fa: fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
* commit 'afffa8fa9f82a7343e1158bf921931fd3e3df615':
  fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
2011-06-15 14:13:04 -07:00
Mathias Agopian
fbb8272db3 am a9007fbd: am 69b4587b: DO NOT MERGE. may fix build on some version of gcc
* commit 'a9007fbdae6671f66535da4b9dad04b19aaf9186':
  DO NOT MERGE. may fix build on some version of gcc
2011-06-14 13:30:34 -07:00
Mathias Agopian
7b1ef58d56 DO NOT MERGE. may fix build on some version of gcc
Change-Id: Iff6d9ab3a7caf58f65fc3f60633a3bd577b7af25
2011-06-14 12:05:42 -07:00
Mathias Agopian
7a87ec7115 may fix build on some version of gcc
Change-Id: Ia88787c0432ec84d51fe505fd6a2b6f98ebe8f33
2011-06-14 11:50:22 -07:00
Mathias Agopian
ddc31c3e2b fix RefBase so it retains binary-compatibility with gingerbread
Bug: 4595257
Change-Id: I0d5e10f497e3f39868bff58f6ded510c38b44b12
2011-06-13 18:39:45 -07:00
Mathias Agopian
a67932fe68 unify SurfaceTexture and Surface
Add the concept of synchronous dequeueBuffer in SurfaceTexture
Implement {Surface|SurfaceTextureClient}::setSwapInterval()
Add SurfaceTexture logging
fix onFrameAvailable
2011-06-13 15:51:35 -07:00
Mathias Agopian
7794b30589 am 77079399: am a9c9a4ba: fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
* commit '77079399fca3e9c71e2ac06f3da26934e1c278b9':
  fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
2011-06-13 14:15:00 -07:00
Mathias Agopian
76feee7a58 fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
Bug: 4595257
Change-Id: I4773cf4fe59b2509db0ed733739eb6961d473b25
2011-06-13 13:58:34 -07:00
Mathias Agopian
867740df05 fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
Bug: 4595257
Change-Id: I1db83149107d7dab1f0b7e73c684e0ff82e17e62
2011-06-13 13:44:28 -07:00
Jamie Gennis
ac642349ba Merge "libutils: add a binary blob cache implementation." 2011-06-13 12:32:46 -07:00
Jamie Gennis
72f6af8630 Merge changes I56779420,I044e44e1,Ic5adfa29,Ied541ab8
* changes:
  SurfaceTexture: add some GL->GL tests.
  SurfaceTexture: fix up a comment.
  SurfaceTexture: add getTransformMatrix tests.
  SurfaceTexture: fix a getTransformMatrix crash.
2011-06-13 11:14:57 -07:00
Jamie Gennis
ae468f4341 SurfaceTexture: fix up a comment.
Change-Id: I044e44e17319e08af657a7ec9fa39100876fe862
2011-06-13 10:50:13 -07:00
Jamie Gennis
736aa9573b SurfaceTexture: fix a getTransformMatrix crash.
This change moves the computation of the transform matrix out of
getTransformMatrix and instead performs the computation when
updateTexImage gets called.  This is needed in order for
getTransformMatrix to succeed even if the buffers have been freed (e.g.
by changing the buffer count) because the computation depends upon the
properties of the current GraphicBuffer.

Change-Id: Ied541ab8747b7ad604f862717135f9a16a816be9
Bug: 4490420
2011-06-13 10:50:12 -07:00
Glenn Kasten
c4a0feaaf4 Merge "Remove redundant memory barrier" 2011-06-13 10:30:29 -07:00
Glenn Kasten
d9e1bb76fe Remove redundant memory barrier
pthread_create already includes the necessary memory barriers:
 - parent at pthread_create : pthread_mutex_unlock(start_mutex)
 - child at __thread_entry : pthread_mutex_lock(start_mutex)

Add lock around uses of mThread.

Added comments:
 - uses of mThread require lock
 - androidCreateRawThreadEtc returned ID is not safe for direct use from non-parent threads.

Change-Id: I18cb296b41ddaf64cf127b57aab31154319b5970
2011-06-10 17:07:46 -07:00
Dianne Hackborn
66168d4bb4 resolved conflicts for merge of f51ded0f to master
Change-Id: Ida356524a68aeb2b9b0013dfbb6ab4bd11e616e2
2011-06-10 12:45:36 -07:00
Dianne Hackborn
199512446d am a8d7ea06: am 220cd77d: Merge "Enforce public resource restriction on bag parents." into honeycomb-mr2
* commit 'a8d7ea067cf22baeee2ff0a33e5a8c5a35936942':
  Enforce public resource restriction on bag parents.
2011-06-09 16:06:07 -07:00
Dianne Hackborn
d4bfc93113 Enforce public resource restriction on bag parents.
Need to put some more styles in the SDK to avoid breaking apps.

Also, welcome Android 3.2.

Change-Id: Ia31d07c9b1b91ad868d8630437fdc1b5ae24f37d
2011-06-09 15:27:39 -07:00
Jeff Brown
5d99f17e82 am 61220e88: am bbbab26e: am 2c180499: Merge "Revert velocity damping. Bug: 4364920" into honeycomb-mr2
* commit '61220e880ac4d9d76b7fd50744439e68e929c697':
  Revert velocity damping. Bug: 4364920
2011-06-07 17:52:30 -07:00
Jeff Brown
b7edd04f7a am bbbab26e: am 2c180499: Merge "Revert velocity damping. Bug: 4364920" into honeycomb-mr2
* commit 'bbbab26ebe9bc789ba9abac757895a6c31de7cc5':
  Revert velocity damping. Bug: 4364920
2011-06-06 20:36:49 -07:00
Jeff Brown
1d3a7130f9 Merge "Revert velocity damping. Bug: 4364920" into honeycomb-mr2 2011-06-06 20:32:18 -07:00
Jeff Brown
7ca7ba2064 Revert velocity damping.
Bug: 4364920

Velocity damping proved to be a bad idea because it would
cause a significant ramp in velocity at the beginning of
a gesture, instead of the desired smooth behavior.  Oh well.

Change-Id: Ie631946f47ef2492bd71fbed1ab44bbb39a875a8
2011-06-06 20:23:54 -07:00
Mathias Agopian
f3d939c5e5 merge various SF fixes from gingerbread to honeycomb-mr2 (DO NOT MERGE)
Fix a race that could cause GL commands to be executed from the wrong thread.
  RefBase subclasses can now decide how they want to be destroyed.
  Fix a race in SurfaceFlinger that could cause layers to be leaked forever.
  Fix a race-condtion in SurfaceFlinger that could lead to a crash.

initial cherry-pick:
resolved conflicts for merge of b9783b49 to honeycomb-plus-aosp

Change-Id: I2a335e03fff219e35c18a7b0089b3a11d636576f
2011-06-06 15:14:25 -07:00
Marco Nelissen
0129f1a27f resolved conflicts for merge of b9783b49 to honeycomb-plus-aosp
Change-Id: I1d86ea56b3d1d1b69f6671e5b0df0ca3f0c79643
2011-06-06 09:55:15 -07:00
Jeff Brown
36f49c133e am 56503b8d: am 8186a5f0: am 10c3f367: Merge "Implement pointer acceleration." into honeycomb-mr2
* commit '56503b8ddfe5c82407da32e18061e725f668432d':
  Implement pointer acceleration.
2011-06-03 15:30:33 -07:00
Jeff Brown
576768ca0d am 8186a5f0: am 10c3f367: Merge "Implement pointer acceleration." into honeycomb-mr2
* commit '8186a5f065fac2b82c90cd18d79cd234bc221402':
  Implement pointer acceleration.
2011-06-02 17:33:55 -07:00
Dianne Hackborn
b18d467bbc resolved conflicts for merge of 54cb63e2 to master
Change-Id: I5b741a1781e3f76c03fc1534ffce871117effd10
2011-06-02 16:44:52 -07:00
Dianne Hackborn
dccd089992 am da9837fb: am c058d386: am ff762299: Merge "Small fixes and cleanup of resource config handling." into honeycomb-mr2
* commit 'da9837fb61c8aa53c67921682016d97655332089':
  Small fixes and cleanup of resource config handling.
2011-06-02 16:24:12 -07:00
Jeff Brown
adab620383 Implement pointer acceleration.
Bug: 4124987
Change-Id: I1f31a28f1594c55302ccabe13fe3ca6d2ff71d50
2011-06-02 14:12:05 -07:00
Mathias Agopian
b62013f6aa 9-axis sensor fusion with Kalman filter
Add support for 9-axis gravity and linear-acceleration sensors
virtual orientation sensor using 9-axis fusion

Change-Id: I6717539373fce781c10e97b6fa59f68a831a592f
2011-05-27 17:04:55 -07:00
Dianne Hackborn
caf5f71308 am 528c49f1: am b96cbbd1: Add "tv" density for 720p screens.
* commit '528c49f112dce5f9687f30a9751e783196eca0c6':
  Add "tv" density for 720p screens.
2011-05-27 14:27:46 -07:00
Dianne Hackborn
c6291e0ff4 Add "tv" density for 720p screens.
Change-Id: I028969b007f2fceea66947d77a2ae31ef1d1a630
2011-05-27 13:40:26 -07:00
Dianne Hackborn
fff4e3f140 am c058d386: am ff762299: Merge "Small fixes and cleanup of resource config handling." into honeycomb-mr2
* commit 'c058d38602a1ffe00e14b4ab32c876c252eabe6d':
  Small fixes and cleanup of resource config handling.
2011-05-27 12:47:59 -07:00
Dianne Hackborn
c3f07924a5 Small fixes and cleanup of resource config handling.
Change-Id: I402c31b68f2b4825cb4c610a65ee8e1da471c7bb
2011-05-27 12:09:11 -07:00
Jeff Brown
98d1f99704 am 8148cc3e: am 86ea1f5f: Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)
* commit '8148cc3e47e50c916066e2fed562618b5827188f':
  Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)
2011-05-25 14:46:53 -07:00
Jeff Brown
9a2c1ca2dd am af685f3b: am 85a7f99c: Merge "Refactor how timeouts are calculated. (DO NOT MERGE)" into honeycomb-mr2
* commit 'af685f3bb566f297deee1615d55d4f33d5580ba3':
  Refactor how timeouts are calculated. (DO NOT MERGE)
2011-05-25 14:42:20 -07:00
Jeff Brown
689e53cc82 am 16330e24: am 94e838f6: Merge "Improve VelocityTracker numerical stability. (DO NOT MERGE)" into honeycomb-mr2
* commit '16330e249663fed890df0e95fce4016c2971120a':
  Improve VelocityTracker numerical stability. (DO NOT MERGE)
2011-05-25 14:42:06 -07:00
Jeff Brown
446b400910 am 4bd89fb0: am 82e4373e: Merge "Use touch pad gestures to manipulate the pointer. (DO NOT MERGE)" into honeycomb-mr2
* commit '4bd89fb00f319c5d6d4f17b39fd4c0b3dc827ad1':
  Use touch pad gestures to manipulate the pointer. (DO NOT MERGE)
2011-05-25 14:42:01 -07:00
Jeff Brown
d3e6d3e763 Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)
Added a new PointerIcon API (hidden for now) for loading
pointer icons.

Fixed a starvation problem in the native Looper's sendMessage
implementation which caused new messages to be posted ahead
of old messages sent with sendMessageDelayed.

Redesigned the touch pad gestures to be defined in terms of
more fluid finger / spot movements.  The objective is to reinforce
the natural mapping between fingers and spots which means there
must not be any discontinuities in spot motion relative to
the fingers.

Removed the SpotController stub and folded its responsibilities
into PointerController.

Change-Id: Ib647dbd7a57a7f30dd9c6e2c260df51d7bbdd18e
2011-05-25 14:37:17 -07:00
Jamie Gennis
8cd5ba4b7f SurfaceTexture: clean up some comments, tests, etc.
This change fixes up some stale comments, member variable names, log
messages and disables a failing test.

Change-Id: Ic1d3344b18066cf710e4a42838b2417c6b1f2f6c
2011-05-25 12:27:33 -07:00
Simon Wilson
be93983384 am c9cd2387: Merge changes I37f0f315,I8cbf6044,Ibb598931,I5262bf11 into gingerbread
* commit 'c9cd2387b6938a6fbefc731d2177902266f2a130':
  Fix a race that could cause GL commands to be executed from the wrong thread.
  RefBase subclasses can now decide how they want to be destroyed.
  Fix a race in SurfaceFlinger that could cause layers to be leaked forever.
  Fix a race-condtion in SurfaceFlinger that could lead to a crash.
2011-05-24 17:29:12 -07:00
Dianne Hackborn
3ae00fabc7 resolved conflicts for merge of bbca8133 to master
Change-Id: I81493674dceab848e41d380a77a37e5a9be06db6
2011-05-24 11:27:11 -07:00
Jeff Brown
1eb42cf6db Refactor how timeouts are calculated. (DO NOT MERGE)
Added a timeout mechanism to EventHub and InputReader so that
InputMappers can request timeouts to perform delayed processing of
input when needed.

Change-Id: I89c1171c9326c6e413042e3ee13aa9f7f1fc0454
2011-05-23 17:20:42 -07:00
Jeff Brown
c5982b7bee Improve VelocityTracker numerical stability. (DO NOT MERGE)
Replaced VelocityTracker with a faster and more accurate
native implementation.  This avoids the duplicate maintenance
overhead of having two implementations.

The new algorithm requires that the sample duration be at least
10ms in order to contribute to the velocity calculation.  This
ensures that the velocity is not severely overestimated when
samples arrive in bursts.

The new algorithm computes the exponentially weighted moving
average using weights based on the relative duration of successive
sample periods.

The new algorithm is also more careful about how it handles
individual pointers going down or up and their effects on the
collected movement traces.  The intent is to preserve the last
known velocity of pointers as they go up while also ensuring
that other motion samples do not count twice in that case.

Bug: 4086785
Change-Id: I95054102397c4b6a9076dc6a0fc841b4beec7920
2011-05-23 17:19:59 -07:00
Jeff Brown
247da72a5b Use touch pad gestures to manipulate the pointer. (DO NOT MERGE)
1. Single finger tap performs a click.
2. Single finger movement moves the pointer (hovers).
3. Button press plus movement performs click or drag.
   While dragging, the pointer follows the finger that is moving
   fastest.  This is important if there are additional fingers
   down on the touch pad for the purpose of applying force
   to an integrated button underneath.
4. Two fingers near each other moving in the same direction
   are coalesced as a swipe gesture under the pointer.
5. Two or more fingers moving in arbitrary directions are
   transformed into touches in the vicinity of the pointer.
   This makes scale/zoom and rotate gestures possible.

Added a native VelocityTracker implementation to enable intelligent
switching of the active pointer during drags.

Change-Id: I7b7ddacc724fb1306e1590dbaebb740d3130d7cd
2011-05-23 17:19:38 -07:00
Dianne Hackborn
2f118cd350 am 4bb78889: am 40277df7: Merge "Add "television" mode." into honeycomb-mr2
* commit '4bb78889d04594c01a6af7f6d38c1764e9f575f9':
  Add "television" mode.
2011-05-23 16:16:54 -07:00
Mathias Agopian
3d6881f394 RefBase subclasses can now decide how they want to be destroyed.
This adds a destroy() virtual on RefBase which
sublasses can implement. destroy() is called
in lieu of the destructor whenthe last strong
ref goes away.

Bug: 4483050
Change-Id: I8cbf6044a6fd3f01043a45592b5a60fa1e5fade2
2011-05-23 16:13:48 -07:00
Dianne Hackborn
a6b34ef26a Add "television" mode.
Change-Id: Ida1fdb61b036a8b489dbeda196fb4bc82e651b2b
2011-05-23 15:11:08 -07:00
Dianne Hackborn
79ba9b5e39 resolved conflicts for merge of 06a8ceac to master
Change-Id: Id51574c825affddfac14ad7214c5496d6a3d6e69
2011-05-19 21:44:52 -07:00
Mathias Agopian
20aeb1caa4 RefBase subclasses can now decide how they want to be destroyed.
This adds a destroy() virtual on RefBase which
sublasses can implement. destroy() is called
in lieu of the destructor whenthe last strong
ref goes away.
2011-05-19 19:40:01 -07:00
Dianne Hackborn
7583282db6 am c851ea56: am 69cb8757: Add new "-swNNNdp" resource qualifier.
* commit 'c851ea5672f6e042c2e89b2a2ce4a2467e1fcd2a':
  Add new "-swNNNdp" resource qualifier.
2011-05-19 19:34:21 -07:00
Dianne Hackborn
22585947ff Add new "-swNNNdp" resource qualifier.
Change-Id: I0101e88ca9d8d44138bdcaf571f24b0352f4f6ce
2011-05-19 18:23:29 -07:00
Jamie Gennis
58c8dd2aa9 libutils: add a binary blob cache implementation.
This change adds an implementation of a cache that stores key/value
pairs of unstructured binary blobs.

Change-Id: Idd01fdabedfa3aed6d359a6efb0592967af52651
2011-05-17 16:58:37 -07:00
Jeff Brown
e959ed2533 Add initial API for stylus and mouse buttons.
Added the concept of pointer properties in a MotionEvent.
This is currently used to track the pointer tool type to enable
applications to distinguish finger touches from a stylus.

Button states are also reported to application as part of touch events.

There are no new actions for detecting changes in button states.
The application should instead query the button state from the
MotionEvent and take appropriate action as needed.

A good time to check the button state is on ACTION_DOWN.

As a side-effect, applications that do not support multiple buttons
will treat primary, secondary and tertiary buttons identically
for all touch events.

The back button on the mouse is mapped to KEYCODE_BACK
and the forward button is mapped to KEYCODE_FORWARD.

Added basic plumbing for the secondary mouse button to invoke
the context menu, particularly in lists.

Added clamp and split methods on MotionEvent to take care of
common filtering operations so we don't have them scattered
in multiple places across the framework.

Bug: 4260011
Change-Id: Ie992b4d4e00c8f2e76b961da0a902145b27f6d83
2011-05-13 12:11:17 -07:00
Dianne Hackborn
89178d4de2 am 46a282f3: am 0ed2e845: Merge "DO NOT MERGE. Integrate add new screen width/height in "dp" configs." into honeycomb-mr2
* commit '46a282f323bc05606e4fe1eba795bd9ac7c99819':
  DO NOT MERGE.  Integrate add new screen width/height in "dp" configs.
2011-05-13 11:21:26 -07:00
Dianne Hackborn
88c0d696cc DO NOT MERGE. Integrate add new screen width/height in "dp" configs.
You can now specify resource configuration variants "wNNNdp"
and "hNNNdp".  These are the minimum screen width/height in "dp"
units.  This allows you to do things like have your app adjust
its layout based only on the about of horizontal space available.

This introduces a new configuration change flag for screen size.
Note that this configuration change happens each time the orientation
changes.  Applications often say they handle the orientation change
to avoid being restarted at a screen rotation, and this will now
cause them to be restarted.  To address this, we assume the app can
handle this new config change if its target SDK version is < ICS.

Change-Id: I4acb73d82677b74092c1da9e4046a4951921f9f4
2011-05-12 18:39:51 -07:00
Mathias Agopian
cf46eb9817 fix onFrameAvailable
Change-Id: I391fe9f6684ac9fd4f91416ce18b583f7087d966
2011-05-11 18:01:51 -07:00
Mathias Agopian
68c7794183 Add SurfaceTexture logging
Change-Id: If1b74be5230813fb76429935d88b9d4a7c41700c
2011-05-11 18:01:51 -07:00
Mathias Agopian
8072711307 Implement {Surface|SurfaceTextureClient}::setSwapInterval()
Change-Id: I8382e346ddaa2c4c8ff56ac3ffd7f0109572f188
2011-05-11 18:01:51 -07:00
Mathias Agopian
b3e518c820 Add the concept of synchronous dequeueBuffer in SurfaceTexture
Change-Id: Ic94cbab092953243a0746e04bbe1b2eb0cc930ef
2011-05-11 18:01:51 -07:00
Mathias Agopian
eafabcdc16 unify SurfaceTexture and Surface
Change-Id: I49da2f5d8408e4cd7e148cfb777bb4ff68cd8f37
2011-05-11 18:01:51 -07:00
Mathias Agopian
c04f153353 Fix a bug where setgeometry couldn't be undone
This change the binder protocol between SurfaceTextureClient
and SurfaceTexture. dequeueBuffer() now takes the requested
parameters for the buffer. SurfaceTexture decides if the
buffer needs to be reallocated and does the allocation
if needed. In that case it returns BUFFER_NEEDS_REALLOCATION
to tell SurfaceTextureClient that it needs to call
requestBuffer (which all parameters have been removed) to
acquire a pointer to the buffer.

dequeueBuffer and requestBuffer could be folded into a single
IPC call, but we chose to optimize the case where buffers are
not created and avoid some complexity in the marshalling code.

Change-Id: I097a7f6f40a3491e10f3f3742eab33999286c304
2011-05-11 18:01:51 -07:00
Christopher Tate
d78797f6e6 Full local backup infrastructure
This is the basic infrastructure for pulling a full(*) backup of the
device's data over an adb(**) connection to the local device.  The
basic process consists of these interacting pieces:

1. The framework's BackupManagerService, which coordinates the
   collection of app data and routing to the destination.

2. A new framework-provided BackupAgent implementation called
   FullBackupAgent, which is instantiated in the target applications'
   processes in turn, and knows how to emit a datastream that contains
   all of the app's saved data files.

3. A new shell-level program called "bu" that is used to bridge from
   adb to the framework's Backup Manager.

4. adb itself, which now knows how to use 'bu' to kick off a backup
   operation and pull the resulting data stream to the desktop host.

5. A system-provided application that verifies with the user that
   an attempted backup/restore operation is in fact expected and to
   be allowed.

The full agent implementation is not used during normal operation of
the delta-based app-customized remote backup process.  Instead it's
used during user-confirmed *full* backup of applications and all their
data to a local destination, e.g. via the adb connection.

The output format is 'tar'.  This makes it very easy for the end
user to examine the resulting dataset, e.g. for purpose of extracting
files for debug purposes; as well as making it easy to contemplate
adding things like a direct gzip stage to the data pipeline during
backup/restore.  It also makes it convenient to construct and maintain
synthetic backup datasets for testing purposes.

Within the tar format, certain artificial conventions are used.
All files are stored within top-level directories according to
their semantic origin:

apps/pkgname/a/  : Application .apk file itself
apps/pkgname/obb/: The application's associated .obb containers
apps/pkgname/f/  : The subtree rooted at the getFilesDir() location
apps/pkgname/db/ : The subtree rooted at the getDatabasePath() parent
apps/pkgname/sp/ : The subtree rooted at the getSharedPrefsFile() parent
apps/pkgname/r/  : Files stored relative to the root of the app's file tree
apps/pkgname/c/  : Reserved for the app's getCacheDir() tree; not stored.

For each package, the first entry in the tar stream is a file called
"_manifest", nominally rooted at apps/pkgname.  This file contains some
metadata about the package whose data is stored in the archive.

The contents of shared storage can optionally be included in the tar
stream. It is placed in the synthetic location:

shared/...

uid/gid are ignored; app uids are assigned at install time, and the
app's data is handled from within its own execution environment, so
will automatically have the app's correct uid.

Forward-locked .apk files are never backed up.  System-partition
.apk files are not backed up unless they have been overridden by a
post-factory upgrade, in which case the current .apk *is* backed up --
i.e. the .apk that matches the on-disk data.  The manifest preceding
each application's portion of the tar stream provides version numbers
and signature blocks for version checking, as well as an indication
of whether the restore logic should expect to install the .apk before
extracting the data.

System packages can designate their own full backup agents.  This is
to manage things like the settings provider which (a) cannot be shut
down on the fly in order to do a clean snapshot of their file trees,
and (b) manage data that is not only irrelevant but actively hostile
to non-identical devices -- CDMA telephony settings would seriously
mess up a GSM device if emplaced there blind, for example.

When a full backup or restore is initiated from adb, the system will
present a confirmation UI that the user must explicitly respond to
within a short [~ 30 seconds] timeout.  This is to avoid the
possibility of malicious desktop-side software secretly grabbing a copy
of all the user's data for nefarious purposes.

(*) The backup is not strictly a full mirror.  In particular, the
    settings database is not cloned; it is handled the same way that
    it is in cloud backup/restore.  This is because some settings
    are actively destructive if cloned onto a different (or
    especially a different-model) device: telephony settings and
    AndroidID are good examples of this.

(**) On the framework side it doesn't care that it's adb; it just
    sends the tar stream to a file descriptor.  This can easily be
    retargeted around whatever transport we might decide to use
    in the future.

KNOWN ISSUES:

* the security UI is desperately ugly; no proper designs have yet
  been done for it
* restore is not yet implemented
* shared storage backup is not yet implemented
* symlinks aren't yet handled, though some infrastructure for
  dealing with them has been put in place.

Change-Id: Ia8347611e23b398af36ea22c36dff0a276b1ce91
2011-05-10 17:52:51 -07:00
Dianne Hackborn
db05e228a4 resolved conflicts for merge of 05be6d6f to master
Change-Id: Ic6a6c5bb300f6f1d43f9ed550b284282b4f16212
2011-05-09 19:00:59 -07:00
Dianne Hackborn
d97f6b4ef9 am 4907d1d5: am 0c6cbf41: Merge "Better compat mode part one: start scaling windows." into honeycomb-mr2
* commit '4907d1d5e2c7d244b07579b8c52153df69754e85':
  Better compat mode part one: start scaling windows.
2011-05-09 17:10:34 -07:00
Dianne Hackborn
16fe3c2c1f Better compat mode part one: start scaling windows.
First step of improving app screen size compatibility mode.  When
running in compat mode, an application's windows are scaled up on
the screen rather than being small with 1:1 pixels.

Currently we scale the application to fill the entire screen, so
don't use an even pixel scaling.  Though this may have some
negative impact on the appearance (it looks okay to me), it has a
big benefit of allowing us to now treat these apps as normal
full-screens apps and do the normal transition animations as you
move in and out and around in them.

This introduces fun stuff in the input system to take care of
modifying pointer coordinates to account for the app window
surface scaling.  The input dispatcher is told about the scale
that is being applied to each window and, when there is one,
adjusts pointer events appropriately as they are being sent
to the transport.

Also modified is CompatibilityInfo, which has been greatly
simplified to not be so insane and incomprehendible.  It is
now simple -- when constructed it determines if the given app
is compatible with the current screen size and density, and
that is that.

There are new APIs on ActivityManagerService to put applications
that we would traditionally consider compatible with larger screens
in compatibility mode.  This is the start of a facility to have
a UI affordance for a user to switch apps in and out of
compatibility.

To test switching of modes, there is a new variation of the "am"
command to do this: am screen-compat [on|off] [package]

This mode switching has the fundamentals of restarting activities
when it is changed, though the state still needs to be persisted
and the overall mode switch cleaned up.

For the few small apps I have tested, things mostly seem to be
working well.  I know of one problem with the text selection
handles being drawn at the wrong position because at some point
the window offset is being scaled incorrectly.  There are
probably other similar issues around the interaction between
two windows because the different window coordinate spaces are
done in a hacky way instead of being formally integrated into
the window manager layout process.

Change-Id: Ie038e3746b448135117bd860859d74e360938557
2011-05-09 17:03:24 -07:00
Iliyan Malchev
697526bc9e frameworks/base: android_native_buffer_t -> ANativeWindowBuffer
Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-03 16:40:14 -07:00
Iliyan Malchev
ec10d231c0 frameworks/base: move ANativeWindow/android_native_buffer_t out
These definitions have been moved to system/core.

Change-Id: I021b6b5f2fd72d538b5ccdcb33860ebd3004d9ad
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-03 16:39:54 -07:00
Iliyan Malchev
41abd67302 frameworks/base: make the ANativeWindow query() method const
query() does not modify the object's data, so it needs to be a const method

Change-Id: I67c40a3c865461e6f1cc2193fd2d74286ff6ac8f
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-03 15:49:40 -07:00
Mathias Agopian
75c1535eb3 remove last traces of copybit
Change-Id: Ia0f13a0ee6f702256482b5eb29d7fa2aa840bfc7
2011-05-02 16:27:21 -07:00
Mathias Agopian
9cdb01da71 get rid of dependency on copybit HAL module
Change-Id: Ia608099a2426c11a91d33063ba53c93e1eccb428
2011-04-28 19:50:21 -07:00
Mathias Agopian
d5b421aaa7 fix typo in Vector<>:: push_back and push_front
parameter were inverted.

Change-Id: I867b01de5f58354bb9668fa662dd2a7d78dd3b37
2011-04-25 22:59:07 -07:00
Mathias Agopian
e60e1fd23d Add some basic STL compatibility to Vector<>
Change-Id: Iaf72623170ee415372c7989d7ba9ff627167449e
2011-04-25 15:28:17 -07:00
Mathias Agopian
0ef4e15a6c Get rid of the "pid" parameter from createSurface
Change-Id: I28635e3f803e6abe965d79998e305f54a202465d
2011-04-20 14:26:11 -07:00
Jeff Brown
96dfedc55c Merge "Initial checkin of spot presentation for touchpad gestures." 2011-04-19 15:37:32 -07:00
Jeff Brown
4815f2a6ad Initial checkin of spot presentation for touchpad gestures.
Added a new PointerIcon API (hidden for now) for loading
pointer icons.

Fixed a starvation problem in the native Looper's sendMessage
implementation which caused new messages to be posted ahead
of old messages sent with sendMessageDelayed.

Redesigned the touch pad gestures to be defined in terms of
more fluid finger / spot movements.  The objective is to reinforce
the natural mapping between fingers and spots which means there
must not be any discontinuities in spot motion relative to
the fingers.

Removed the SpotController stub and folded its responsibilities
into PointerController.

Change-Id: I5126b1e69d95252fda7f2a684c9287e239a57163
2011-04-19 15:35:51 -07:00
Mathias Agopian
7e3d7f341a Merge "changes to SurfaceTexture needed for unification with SF" 2011-04-18 19:51:26 -07:00
Andreas Huber
6e9eb7453f Merge "Parcel::appendFrom({const } Parcel *parcel, size_t, size_t)" 2011-04-18 08:12:36 -07:00
Mathias Agopian
a36a302e92 Merge "Fix a GraphicBuffer leak in SurfaceTexture" 2011-04-15 18:15:13 -07:00
Bjorn Bringert
a2ad6b74a3 Add Java API for writing TTS engines
This removes the old non-public C++ API for TTS
engines and replaces it with a Java API.

The new API is still @hidden, until it has been approved.

Bug: 4148636
Change-Id: I7614ff788e11f897e87052f684f1b4938d539fb7
2011-04-15 10:04:31 +01:00
Andreas Huber
51faf46e29 Parcel::appendFrom({const } Parcel *parcel, size_t, size_t)
As far as I can tell "parcel" isn't actually modified by the implementation.

Change-Id: Ib806eefdc13c97b932773e1dc9ca3a4aad4422b2
2011-04-13 10:21:56 -07:00
Kenny Root
81bc567745 resolved conflicts for merge of 18490fb9 to master
Change-Id: I6c68e6fb0f9c1182a955689bbffc161a8f30bd37
2011-04-12 12:51:08 -07:00
Kenny Root
f6bbefd581 resolved conflicts for merge of 87b3c0dc to honeycomb-plus-aosp
Change-Id: Ia1a0024aabf531438203eb9fea3a10dd15eabe53
2011-04-12 10:27:15 -07:00
Mathias Agopian
7a042bf324 changes to SurfaceTexture needed for unification with SF
- implement connect/disconnect
- implement missing query
- handle texture_2d in addition to texture_external_oes

Change-Id: I971a70821f00f22b01f5337de4a7d451177fec4d
2011-04-11 21:19:55 -07:00
Kenny Root
8a1a615176 am 08d9d9a4: Merge "Runtime resource overlay, iteration 1."
* commit '08d9d9a46250c4fad66e9b637e8898a3524c4286':
  Runtime resource overlay, iteration 1.
2011-04-11 15:33:19 -07:00
Mathias Agopian
4cb18881b5 Fix a GraphicBuffer leak in SurfaceTexture
This leak was intentional, it was there to deal with the fact that
some gralloc implementations don't track buffer handles with
file-descriptors so buffers needed to stay alive until there were
registered, which is not guaranteed by binder transactions.

In this new implementation, we use a small BBinder holding a
reference to the buffer, which with tuck into the parcel. This forces
the reference to stay alive until the parcel is destroyed, which
is guaranteed (by construction) to happen after the buffer is
registered.

this allows the public facing API to not expose the previous hack.

Change-Id: I1dd6cd83679a2b7457ad628169e2851acc027143
2011-04-08 19:28:04 -07:00
Mathias Agopian
b561dd29b5 Merge "remove more unused references to ISurface" 2011-04-06 12:22:29 -07:00
Dianne Hackborn
592e3fc150 Add new resource configurations for screen width/height in "dp".
You can now specify resource configuration variants "wNNNdp"
and "hNNNdp".  These are the minimum screen width/height in "dp"
units.  This allows you to do things like have your app adjust
its layout based only on the about of horizontal space available.

This introduces a new configuration change flag for screen size.
Note that this configuration change happens each time the orientation
changes.  Applications often say they handle the orientation change
to avoid being restarted at a screen rotation, and this will now
cause them to be restarted.  To address this, we assume the app can
handle this new config change if its target SDK version is < ICS.

Change-Id: I22f8afa136b4f274423978c570fa7c9855040496
2011-04-06 11:00:37 -07:00
Mathias Agopian
47d8730a24 remove more unused references to ISurface
Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
2011-04-05 20:11:55 -07:00
Mathias Agopian
27fd410be4 Merge "SurfaceTexture can now force the client to request a buffer" 2011-04-01 14:58:43 -07:00
Mathias Agopian
a5c75c0162 SurfaceTexture can now force the client to request a buffer
SurfaceTexture now has the concept of default size a new method,
setDefaultBufferSize() to set it. When the default size is
changed, dequeueBuffer() will return a value telling the
client that it must ask for a new buffer.

The above only applies if the client has not
overriden the buffer size with setGeometry.

Change-Id: I520dc40363054b7e37fdb67d6a2e7bce70326e81
2011-04-01 14:43:35 -07:00
Jeff Brown
02988ec716 Merge "Add a little input event consistency verifier." 2011-04-01 12:56:35 -07:00
MÃ¥rten Kongstad
5f29c87ef2 Runtime resource overlay, iteration 1.
Runtime resource overlay allows unmodified applications to appear
as if they had been compiled with additional resources defined. See
libs/utils/README for more information.

This commit is the first iteration of runtime resource overlay. It
provides the actual overlay modifications and loading of trusted overlay
packages (ie residing in /vendor) targeting framework-res.apk.

This commit loads exactly one overlay package. The overlay,
if present, must target framework-res.apk and be located at
/vendor/overlay/framework/framework-res.apk.

Change-Id: If26ee7754813004a96c043dba37fbe99fa3919db
2011-04-01 14:12:10 +02:00
Jeff Brown
3847f62209 Add a little input event consistency verifier.
The idea is to assist with debugging by identifying cases in which
the input event stream is corrupted.

Change-Id: I0a00e52bbe2716be1b3dfc7c02a754492d8e7f1f
2011-03-31 19:57:00 -07:00
Russell Brenner
7faee43a9d am c6b22e27: Updated JBQ\'s original SurfaceTexture stubs to make webkit MR1 buildable
* commit 'c6b22e2727bd3730edd5ad72831a9bb4670d00f3':
  Updated JBQ's original SurfaceTexture stubs to make webkit MR1 buildable
2011-03-31 18:55:26 -07:00
Russell Brenner
0686717d79 Updated JBQ's original SurfaceTexture stubs to make webkit MR1 buildable
Change-Id: If1c1610efcc0e0bc6de88c75712baed91624b1a7
2011-03-31 17:40:08 -07:00
Jeff Brown
8f2fff35b0 Merge "Add input filter mechanism for accessibility." 2011-03-30 17:20:56 -07:00
Jeff Brown
37159af66d Add input filter mechanism for accessibility.
This patch adds a mechanism for capturing, filtering, transforming
and injecting input events at a very low level before the input
dispatcher attempts to deliver them to applications.  At this time,
the mechanism is only intended to be used by the accessibility
system to implement built-in system-level accessibility affordances.

The accessibility input filter is currently just a stub.
It logs the input events receives and reinjects them unchanged,
except that it transforms KEYCODE_Q into KEYCODE_Z.

Currently, the accessibility input filter is installed whenever
accessibility is enabled.  We'll probably want to change that
so it only enables the input filter when a screen reader is
installed and we want touch exploration.

Change-Id: I35764fdf75522b69d09ebd78c9766eb7593c1afe
2011-03-30 16:55:15 -07:00
Mathias Agopian
1cd921eab3 Revert "retire android_native_window_t"
this type is still used by partner's source trees.
we will get rid of it in next release's timeframe.

This reverts commit 7b49b976277cb3538242151e7dbd24681ddec73e.
2011-03-30 15:28:21 -07:00
Iliyan Malchev
5cfbdc87d6 retire android_native_window_t
Change-Id: I232c526168e1a93977d1c2d0fa74c8937cdeb23b
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-03-23 16:43:20 -07:00
Jeff Brown
f98f1364f8 Merge "Refactor how timeouts are calculated." 2011-03-17 20:16:42 -07:00
Jeff Brown
c0a5e8df03 Refactor how timeouts are calculated.
Added a timeout mechanism to EventHub and InputReader so that
InputMappers can request timeouts to perform delayed processing of
input when needed.

Change-Id: Iec2045baaf4e67690b15eef3c09a58d5cac76897
2011-03-17 17:29:09 -07:00
Eino-Ville Talvala
edc5ac145b Merge "Add support for timestamps into SurfaceTexture." 2011-03-17 15:52:34 -07:00
Eino-Ville Talvala
1d01a12e71 Add support for timestamps into SurfaceTexture.
API addition: The timestamps are represented as nanoseconds from some
arbitrary time point. Like the SurfaceTexture transform matrix, the
timestamp retrieved by getTimestamp is for the last frame sent to the
GL texture using updateTexImage().

Camera HAL change: Expect vendors to set these timestamps using
native_window_set_buffers_timestamp().  For now, they are
autogenerated by SurfaceTextureClient if set_buffers_timestamp() is
never called, but such timing is likely not accurate enough to pass a
CTS test.

bug:3300707

Change-Id: Ife131a0c2a826ac27342e11b8a6c42ff49e1bea7
2011-03-17 13:10:03 -07:00
Mathias Agopian
939fee8819 am e22aa623: am 25594e19: am f40e638e: fix [4093196] Device lock up - log spam with SharedBufferStack: waitForCondition(LockCondition) timed out
* commit 'e22aa62362a3007ee59ac62d4b5969e216987995':
  fix [4093196] Device lock up - log spam with SharedBufferStack: waitForCondition(LockCondition) timed out
2011-03-17 00:13:49 -07:00
Mathias Agopian
d0b55c011a fix [4093196] Device lock up - log spam with SharedBufferStack: waitForCondition(LockCondition) timed out
a memory corruption happned when the buffer pool was resized
(like when playing a video or using camera) and there was
no current active buffer. In this case, the faulty code
would index into an array at position -1 which corrupted
24 bytes of data.

also improved region validation code (ifdef'ed out by default)

Bug: 4093196
Change-Id: I915c581d131148959d720e00e3892e9186ab733d
2011-03-17 00:04:42 -07:00
Romain Guy
043e3d42f1 am 72064c66: am b0204d0a: am c2b91a61: Merge "Modify the GL renderer\'s functor to pass the clip to WebView" into honeycomb-mr1
* commit '72064c66e20b9cc86900a9d833c228c345a2b2a4':
  Modify the GL renderer's functor to pass the clip to WebView
2011-03-16 17:31:30 -07:00
Romain Guy
a08152f43c Modify the GL renderer's functor to pass the clip to WebView
Change-Id: If5efe399ca58f3000b2883e24e9f3736a2025184
2011-03-16 15:31:33 -07:00
Jeff Brown
5aaab9c6d8 Add 3D mode key and others.
Related to an AOSP change request.

Change-Id: I3f4f84b56a1af626a8783f5ecbb823eb12ba9fbe
2011-03-16 11:31:42 -07:00
Jeff Brown
e3d4a68f2d Merge "Improve VelocityTracker numerical stability." 2011-03-15 20:01:16 -07:00
Jeff Brown
1593354388 Improve VelocityTracker numerical stability.
Replaced VelocityTracker with a faster and more accurate
native implementation.  This avoids the duplicate maintenance
overhead of having two implementations.

The new algorithm requires that the sample duration be at least
10ms in order to contribute to the velocity calculation.  This
ensures that the velocity is not severely overestimated when
samples arrive in bursts.

The new algorithm computes the exponentially weighted moving
average using weights based on the relative duration of successive
sample periods.

The new algorithm is also more careful about how it handles
individual pointers going down or up and their effects on the
collected movement traces.  The intent is to preserve the last
known velocity of pointers as they go up while also ensuring
that other motion samples do not count twice in that case.

Bug: 4086785
Change-Id: I2632321232c64d6b8faacdb929e33f60e64dcdd3
2011-03-15 19:59:47 -07:00
Glenn Kasten
77b6f0a9ed am 7d7dcb5e: am 4528a7db: Merge "Bug 4016329 do full string comparisons" into honeycomb-mr1
* commit '7d7dcb5ea891ad4c3252ed832ebd06accc96153d':
  Bug 4016329 do full string comparisons
2011-03-15 13:51:17 -07:00
Glenn Kasten
ad4c66d8bb Merge "Bug 4016329 do full string comparisons" into honeycomb-mr1 2011-03-15 13:44:58 -07:00
Jamie Gennis
3f13cf1be5 am c570ee21: am 41a894ad: am 75597105: Merge "SurfaceTextureClient: Add ISurfaceTexture getter." into honeycomb-mr1
* commit 'c570ee21e2c2b9802c9d1f58dba024e884b225e6':
  SurfaceTextureClient: Add ISurfaceTexture getter.
2011-03-15 10:45:01 -07:00
Jamie Gennis
cefc876234 am ceb7cb14: am 02805a40: Merge "ANativeWindow: add query for the concrete type." into honeycomb-mr1
* commit 'ceb7cb1460484eda1a3cb9cd271d7caf3a3dcbd1':
  ANativeWindow: add query for the concrete type.
2011-03-15 10:42:06 -07:00
Glenn Kasten
bb959f5b10 Bug 4016329 do full string comparisons
Use full string comparisons instead of partial for
  file extension and MIME type.
Do case-insensitive comparison of MIME type and file extensions.
Fix error in comment for String8::getPathExtension.
Remove dead code -- StringTokenizer is unused.

Change-Id: I322be6235abbdaab5f7eafa48926dbb2cf46dc29
2011-03-14 17:59:51 -07:00
Jamie Gennis
bae774eb20 SurfaceTextureClient: Add ISurfaceTexture getter.
This change adds a getter method to SurfaceTextureClient to get the
ISurfaceTexture object with which the SurfaceTextureClient is
communicating.

Bug: 4086509
Change-Id: Ifec621e0fe5392a5be56b2348fdc54067cbebcdd
2011-03-14 17:47:11 -07:00
Jamie Gennis
391bbe2246 ANativeWindow: add query for the concrete type.
This change adds a query to the ANativeWindow interface for getting the
concrete type of the ANativeWindow.

Bug: 4086509
Change-Id: I64aa86d72fbca3b52a98e1fc35608737781a3178
2011-03-14 17:47:11 -07:00
Jeff Brown
fa773aa745 Use touch pad gestures to manipulate the pointer.
1. Single finger tap performs a click.
2. Single finger movement moves the pointer (hovers).
3. Button press plus movement performs click or drag.
   While dragging, the pointer follows the finger that is moving
   fastest.  This is important if there are additional fingers
   down on the touch pad for the purpose of applying force
   to an integrated button underneath.
4. Two fingers near each other moving in the same direction
   are coalesced as a swipe gesture under the pointer.
5. Two or more fingers moving in arbitrary directions are
   transformed into touches in the vicinity of the pointer.
   This makes scale/zoom and rotate gestures possible.

Added a native VelocityTracker implementation to enable intelligent
switching of the active pointer during drags.

Change-Id: I5ada57e7f2bdb9b0a791843eb354a8c706b365dc
2011-03-14 14:12:03 -07:00
Jeff Brown
15a4fd40c7 am e6f0ae12: am efd3266b: Input improvements and bug fixes.
* commit 'e6f0ae12b18819424dd8395b433a8fc9caefa77b':
  Input improvements and bug fixes.
2011-03-09 18:39:46 -08:00
Jeff Brown
46689da7ee Input improvements and bug fixes.
Associate each motion axis with the source from which it comes.
It is possible for multiple sources of the same device to define
the same axis.  This fixes new API that was introduced in MR1.
(Bug: 4066146)

Fixed a bug that might cause a segfault when using a trackball.

Only fade out the mouse pointer when touching the touch screen,
ignore other touch pads.

Changed the plural "sources" to "source" in several places in
the InputReader where we intend to refer to a particular source
rather than to a combination of sources.

Improved the batching code to support batching events from different
sources of the same device in parallel.  (Bug: 3391564)

Change-Id: I0189e18e464338f126f7bf94370b928e1b1695f2
2011-03-09 18:30:28 -08:00
Jamie Gennis
7488244282 am 7b13e27e: am 6167a390: Merge "ANativeWindow: add queues-to-window-composer check." into honeycomb-mr1
* commit '7b13e27ee4a42c205b4a20d145610e8c912e7b0c':
  ANativeWindow: add queues-to-window-composer check.
2011-03-09 15:03:04 -08:00
Jamie Gennis
ec8a5ef78d Merge "ANativeWindow: add queues-to-window-composer check." into honeycomb-mr1 2011-03-09 14:47:56 -08:00
Jamie Gennis
134f042286 ANativeWindow: add queues-to-window-composer check.
This change adds a new 'method' to the ANativeWindow interface to check
whether buffers queued to the window will be sent directly to the system
window compositor.

Change-Id: I4d4b199e328c110b68b250029aea650f03c8724d
Bug: 3495535
2011-03-08 16:49:51 -08:00
Romain Guy
8c5cffc2e5 am d00353fe: am bc8a8e8c: Merge "Add support for partial invalidates in WebView Bug #3461349" into honeycomb-mr1
* commit 'd00353fe3191571a6773ef2d11921cfcff260bc4':
  Add support for partial invalidates in WebView Bug #3461349
2011-03-07 22:45:52 -08:00
Romain Guy
8a2a2f4689 Merge "Add support for partial invalidates in WebView Bug #3461349" into honeycomb-mr1 2011-03-07 22:40:27 -08:00
Romain Guy
9fb2277f39 Add support for partial invalidates in WebView
Bug #3461349

This change also fixes two bugs that prevented partial invalidates
from working with other views. Both bugs were in our EGL implementation:
they were preventing the caller from comparing the current context/surface
with another context/surface. This was causing HardwareRenderer to always
redraw the entire screen.

Change-Id: I33e096b304d4a0b7e6c8f92930f71d2ece9bebf5
2011-03-07 18:09:03 -08:00
Mathias Agopian
5f1e78d730 am df6410dc: Merge "Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only" into gingerbread
* commit 'df6410dce3dae0bdb7e13118b3878079a1dcce03':
  Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only
2011-03-07 18:04:06 -08:00
Mathias Agopian
ee65ac8a71 Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only
37c2a37 fix [3408713] Dialog window invisible sometimes
d35c666 fix [3385504] Surface flinger hang when adding dim surface
1723b04 fix [3389263] OMX.Nvidia.h264.decode fails to shutdown
1b0114f fix a surface leak in SurfaceFlinger

Bug: 3513017

Change-Id: Ia13ed8c9cdcb1f484e177cdcaff687e7c88a10c3
2011-03-07 16:56:16 -08:00
Jeff Brown
e89d1041dd Joystick tweaks. (DO NOT MERGE)
Ensure that the joystick can always reach -1.0, 0.0 and 1.0 positions
even when noise filtering is applied.  (Bug: 3514510)

Add support for a few more standard axes.

Add additional mapping modes for axes.
Some axes are inverted from standard interpretation
or are actually intended to be split into two distict axes
such as left/right trigger controls or accelerator/brake.

Add key layout file for a G25 racing wheel and XBox 360 controller
to tweak behavior.  They work fine without them but the axis mappings
are not ideal.

Change-Id: I0fddd90309af4dc14d35f34fe99ed6e521c0b7c7
2011-03-04 19:12:41 -08:00
Jeff Brown
8bb99ad892 Joystick tweaks.
Ensure that the joystick can always reach -1.0, 0.0 and 1.0 positions
even when noise filtering is applied.  (Bug: 3514510)

Add support for a few more standard axes.

Add additional mapping modes for axes.
Some axes are inverted from standard interpretation
or are actually intended to be split into two distict axes
such as left/right trigger controls or accelerator/brake.

Add key layout file for a G25 racing wheel and XBox 360 controller
to tweak behavior.  They work fine without them but the axis mappings
are not ideal.

Change-Id: Id4c86a0a272331c680039a9bde6815bb7eba44ab
2011-03-04 18:53:32 -08:00
Fabrice Di Meglio
b83025cf80 Merge "Add TextLayout Cache" 2011-03-03 12:21:15 -08:00
Jeff Brown
d5ed285606 Wake screen from external HID peripherals.
Added some plumbing to enable the policy to intercept motion
events when the screen is off to handle wakeup if needed.

Added a basic concept of an external device to limit the scope
of the wakeup policy to external devices only.  The wakeup policy
for internal devices should be based on explicit rules such as
policy flags in key layout files.

Moved isTouchEvent to native.

Ensure the dispatcher sends the right event type to userActivity
for non-touch pointer events like HOVER_MOVE and SCROLL.

Bug: 3193114
Change-Id: I15dbd48a16810dfaf226ff7ad117d46908ca4f86
2011-03-02 19:57:07 -08:00
Jeff Brown
80f3e7cc15 Fade out the mouse pointer after inactivity or other events.
Fades out the mouse pointer:
- after 15 seconds of inactivity normally
- after 3 seconds of inactivity in lights out mode
- after a non-modifier key down
- after a touch down

Extended the native Looper to support enqueuing time delayed
messages.  This is used by the PointerController to control
pointer fade timing.

Change-Id: I87792fea7dbe2d9376c78cf354fe3189a484d9da
2011-03-02 15:37:57 -08:00
Fabrice Di Meglio
e88a9a42ca Add TextLayout Cache
- use GenerationCache for caching
- move GenerationCache.h from libs/hwui/utils to include/utils
- add #define for cache activation / deactivation

Change-Id: Ifaf519f0b5e33b087a453e4aa6430162d8438f20
2011-03-02 13:29:20 -08:00
Mathias Agopian
17290c5583 Merge "Add support for up to 32 buffers per Surface" 2011-03-01 20:08:07 -08:00
Jamie Gennis
ea72db3737 Merge "Add the MIN_UNDEQUEUED_BUFFERS query to ANW." 2011-03-01 14:38:20 -08:00
Mathias Agopian
acd116daea Add support for up to 32 buffers per Surface
Bug: 3488016

Change-Id: Ie5536ad77d42a4d0e8270e0fd87ecb73471bcbbc
2011-03-01 14:09:06 -08:00
Christopher Tate
b1586e69a1 Merge "Binder linkage no longer depends on JNI objrefs as persistent tokens" 2011-02-28 12:50:09 -08:00
Jamie Gennis
9d4d6c101d Add the MIN_UNDEQUEUED_BUFFERS query to ANW.
This change adds a new query to ANativeWindow for getting the minimum
number of buffers that must be left un-dequeued during the steady-state
operation of the ANativeWindow.

Change-Id: Ie8c461fc26b02ecde02ddb4f95bf763662cf1551
Related-Bug: 3356050
2011-02-28 12:24:40 -08:00
Christopher Tate
71f64dd876 Binder linkage no longer depends on JNI objrefs as persistent tokens
There are two areas that have changed to eliminate the assumption that
local jobject references are both canonical and persistent:

1. JavaBBinderHolder no longer holds onto and reuses it parent object
reference per se.  Since the underlying JavaBBinder object holds a
real global ref, this was redundant anyway.  Now, for purposes of its
transient need to perform JNI operations, it simply uses the current
jobject ref(s) passed during method invocation, and no longer attempts
to hold these refs beyond the scope of a single invocation.

2. Binder obituaries no longer assume that a jobject reference to a
recipient will always compare == as a 32-bit value with any future
reference to the same object.  The implementation now asks Dalvik
whether object references match.

This amended patch fixes the earlier bug around races between
remote binder death cleanup and local explicit unregistration of
VM-side death recipients.

Bug 2090115

Change-Id: I70bd788a80ea953632b1f466f385ab6b78ef2913
2011-02-28 11:37:20 -08:00
Mathias Agopian
32bebb0a58 Fix sp<> conversion operator / constructor
some of the conversion operators were not using the proper
pointer type when calling incStrong/decStrong, usually it
has no bad consequences, but for some implementation
of the ref-counted object it could lead to recording the wrong
owner id.

Change-Id: If574b9069b8a4cf6e0911a992c8f095aba799995
2011-02-25 16:20:52 -08:00
Christopher Tate
9f5b53d4b0 Revert "Binder linkage no longer depends on JNI objrefs as persistent tokens"
This reverts commit c2d55dd89743c8a38deb809f3cdf1ad2d1dbac2b.
2011-02-25 15:18:53 -08:00
Mathias Agopian
d4e5832b69 Merge "Fix a wp<> bug where the owner ID would be wrong" 2011-02-24 18:27:40 -08:00
Mathias Agopian
d005004f14 Fix a wp<> bug where the owner ID would be wrong
this was introduced recently. we make sure to use
the correct owner id (the sp) instead of the wp.

Change-Id: I78fdc6ec0c2d3e687278b70442d74d1924b512a2
2011-02-24 18:12:34 -08:00
Mathias Agopian
da26c6662d Merge "Fix some issues with RefBase debugging." 2011-02-24 16:23:51 -08:00
Christopher Tate
5a5ca785e2 Merge "Binder linkage no longer depends on JNI objrefs as persistent tokens" 2011-02-24 13:22:19 -08:00
Christopher Tate
c811e7a775 Binder linkage no longer depends on JNI objrefs as persistent tokens
There are two areas that have changed to eliminate the assumption that
local jobject references are both canonical and persistent:

1. JavaBBinderHolder no longer holds onto and reuses it parent object
reference per se.  Since the underlying JavaBBinder object holds a
real global ref, this was redundant anyway.  Now, for purposes of its
transient need to perform JNI operations, it simply uses the current
jobject ref(s) passed during method invocation, and no longer attempts
to hold these refs beyond the scope of a single invocation.

2. Binder obituaries no longer assume that a jobject reference to a
recipient will always compare == as a 32-bit value with any future
reference to the same object.  The implementation now asks Dalvik
whether object references match.

Bug 2090115

Change-Id: If62edd554d0a9fbb2d2977b0cbf8ad7cc8e2e68d
2011-02-24 13:15:09 -08:00
Glenn Kasten
3477a8cff2 Merge "Bug 3362814 Fix SMP race in access to mRequestExit" 2011-02-24 10:01:31 -08:00
Mathias Agopian
f14a1046e7 Fix some issues with RefBase debugging.
First slipt sp<> out of RefBase into StrongPointer.h so it can be reused
more easily and to make it clear that it doesn't require RefBase.

Note: the rest of the change only affects the system when DEBUG_REFS is enabled.

The main problem we fix here is that the owner id associated with each
reference could get out of date when a sp<> or wp<> was moved, for
instance when they're used in a Vector< >.

We fix this issue by calling into RefBase::moveReferences from
a template specialization for sp<TYPE> and wp<TYPE> of the
type helpers. RefBase::moveReferences() has then a chance to
update the owner ids.

There is a little bit of trickery to implement this generically in
RefBase, where we need to use a templatized functor that can turn
a sp<TYPE>* casted to a void* into a RefBase*.

Introduced a new debug option DEBUG_REFS_FATAL_SANITY_CHECKS
currently set to 0 by default as there seem to be an issue
with sp<ANativeWindow> which trips the sanity checks.

Change-Id: I4825b21c8ec47d4a0ef35d760760ae0c9cdfbd7f
2011-02-23 22:21:41 -08:00
Glenn Kasten
7e453a51a5 Bug 3362814 Fix SMP race in access to mRequestExit
Also fix an unlikely SMP race in access to mHoldSelf on entry to _threadLoop.

Change-Id: I6cbc0b94739c7dd5e77e8a5ba0da22cdc0b1a4db
2011-02-23 17:49:59 -08:00
Mathias Agopian
a08ef4932f Remove RefBase.h dependency on TextOutput.h
Change-Id: I72cd6b98ef82b4868fe1c8ec87862cf43fb4ee73
2011-02-22 18:08:58 -08:00
Jeff Brown
3ea4de826d Add new axes for joysticks and mouse wheels.
Added API on InputDevice to query the set of axes available.
Added API on KeyEvent and MotionEvent to convert keycodes and axes
to symbolic name strings for diagnostic purposes.
Added API on KeyEvent to query if a given key code is a gamepad button.
Added a new "axis" element to key layout files to specify the
mapping between raw absolute axis values and motion axis ids.
Expanded the axis bitfield to 64bits to allow for future growth.
Modified the Makefile for keyboard prebuilts to run the keymap
validation tool during the build.
Added layouts for two game controllers.
Added default actions for game pad button keys.
Added more tests.
Fixed a bunch of bugs.

Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
2011-02-19 05:23:10 -08:00
Jeff Brown
b2d4435dfa Fix a regression with MotionEvent parceling.
Also added some more unit tests.

Change-Id: I413654294d1a998eec056884e6df5eaa50f3daf4
2011-02-17 13:01:34 -08:00
Jeff Brown
3e3414636c Add support for arbitrary axes in MotionEvents.
This change makes it possible to extend the set of axes that
are reported in MotionEvents by defining new axis constants.

The MotionEvent object is now backed by its C++ counterpart
to avoid having to maintain multiple representations of the
same data.

Change-Id: Ibe93c90d4b390d43c176cce48d558d20869ee608
2011-02-15 19:14:37 -08:00
Jean-Baptiste Queru
a240734bae am 93552de8: Merge "stubs"
* commit '93552de8e305027fb003401e347b9493c64c981f':
  stubs
2011-02-11 09:54:59 -08:00
Steve Block
58c40337d0 stubs
Change-Id: I6bc0b8e9d4412a0b60c6226fbd2b7a6d15aceb22
2011-02-11 09:33:40 -08:00
Mathias Agopian
51625d69a0 am c6c3e77d: am b66b7a2c: Merge "fix [3408713] Dialog window invisible sometimes" into honeycomb
* commit 'c6c3e77d4d5cd8de3b1a56bdffdfd42774849512':
  fix [3408713] Dialog window invisible sometimes
2011-02-10 15:46:15 -08:00
Mathias Agopian
a878ce287d am b66b7a2c: Merge "fix [3408713] Dialog window invisible sometimes" into honeycomb
* commit 'b66b7a2c183a1423ea629d4f73ed95f9b87d54b7':
  fix [3408713] Dialog window invisible sometimes
2011-02-10 15:08:33 -08:00
Mathias Agopian
7802bbd20f fix [3408713] Dialog window invisible sometimes
weak pointer comparison operators were implemented wrong,
they were using the internal "unsafe" pointer. We could end up
with two "equal" weak pointer pointing to different objects.

this caused KeyedVector keyed by weak pointer to work incorrectly, in
turn causing a window that just got added to a list to be immediately
removed.

Change-Id: Ib191010c39aafa9229109e4211f6c3b2b2f9696d
2011-02-09 18:38:55 -08:00
Jamie Gennis
08b4ea31a8 am 421d94c2: am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to SurfaceTextureClient." into honeycomb
* commit '421d94c20321e1de528416b279bf148baba47b39':
  Pass the IGraphicBufferAlloc to SurfaceTextureClient.
2011-02-02 16:21:24 -08:00
Jamie Gennis
d7a3ebe031 am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to SurfaceTextureClient." into honeycomb
* commit 'ecb4b3f02340e21eefabbea78559e85ec7ee0089':
  Pass the IGraphicBufferAlloc to SurfaceTextureClient.
2011-02-02 15:56:20 -08:00
Jamie Gennis
1b20cde313 Pass the IGraphicBufferAlloc to SurfaceTextureClient.
This change passes a reference to the IGraphicBufferAlloc binder object
to SurfaceTextureClient objects.  When STC objects are created they
query their associated ISurfaceTexture object for the
IGraphicBufferAlloc that the SurfaceTexture uses to allocate buffers.
Having the SurfaceTextureClient hold this reference prevents the
GraphicBufferAlloc in SurfaceFlinger from freeing the allocated buffers
before the SurfaceTextureClient is done with them.

Change-Id: Ib8e30e8b37fdd60438cbb4cb7e9174d0ba6d661c
related-bug: 3362519
2011-02-02 15:31:47 -08:00
Jean-Baptiste Queru
9d09258217 am a6fb375c: am 056340ac: Merge "stubs"
* commit 'a6fb375cf727b6ded057110875fe49a9b3f230a3':
  stubs
2011-01-31 12:03:59 -08:00
Jean-Baptiste Queru
65881cf8b0 Merge "stubs" 2011-01-31 11:32:33 -08:00
Jamie Gennis
79676ac8e6 am 09443aeb: am 62884505: Merge "Reset ANativeWindow crop on buffer geometry changes." into honeycomb
* commit '09443aeb6470d66f5bc1938b70d74b3e2f9bbbb9':
  Reset ANativeWindow crop on buffer geometry changes.
2011-01-30 15:05:42 -08:00
Jamie Gennis
c043fa28b9 am 62884505: Merge "Reset ANativeWindow crop on buffer geometry changes." into honeycomb
* commit '628845056282a0c5b1a212ce5aeeaac092b91ec8':
  Reset ANativeWindow crop on buffer geometry changes.
2011-01-30 15:03:03 -08:00
Dianne Hackborn
36373fcf15 am 371de969: am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"
* commit '371de9695508073fbbde8181eb230e99cb045206':
  Normalize output from aapt d
2011-01-29 23:10:33 -08:00
Dianne Hackborn
402960177f am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"
* commit 'a1f5e82f37c77af7b1d630b5bca715d1742f1234':
  Normalize output from aapt d
2011-01-29 23:07:48 -08:00
Dianne Hackborn
a8eea2f3d9 am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"
* commit 'a30063d80c08434ac3c7316f338c6d54110449ab':
  Normalize output from aapt d
2011-01-29 23:04:50 -08:00
Dianne Hackborn
73431999ab Merge "Normalize output from aapt d" 2011-01-29 22:53:20 -08:00
Jean-Baptiste Queru
8e543c60f5 stubs
Change-Id: I829039f3817a172e66eeb9df397e896a488a259d
2011-01-29 06:19:37 -08:00
Jamie Gennis
68f9127e88 Reset ANativeWindow crop on buffer geometry changes.
This changes the ANativeWindow API and the two implementations to reset
the window's crop rectangle to be uncropped when the window's buffer
geometry is changed.

Bug: 3359604
Change-Id: I64283dc8382ae687787ec0bebe6a5d5b4a0dcd6b
2011-01-28 18:21:54 -08:00
Glenn Kasten
16f0453fee Protected surface API
To be used by DRM framework, implemented by display HAL

Change-Id: I054a07a94f4d5dbe792f3a597e2e49a100d90eb2
2011-01-28 08:04:00 -08:00
Jeff Brown
ae1d9d7412 am 12b2dc90: am b1e0a870: Merge "Fix crashes caused by some input devices." into honeycomb
* commit '12b2dc90883ef4f930a17907acdef3677b0598a5':
  Fix crashes caused by some input devices.
2011-01-25 18:22:50 -08:00
Jeff Brown
eb8b9d8a22 Fix crashes caused by some input devices.
The touch screen sometimes reports more than 10 pointers even though that's
all we asked for.  When this happens, we start dropping events with more
than 10 pointers.  This confuses applications and causes them to crash.
Raised the limit to 16 pointers.
Bug: 3331247

The default behavior was to identify all touch devices as touch screens.
External devices that are plugged in are more likely to be touch pads
not attached to a screen.  Changed the default to be a touch pad
and renamed some internal constants to avoid confusion.

A certain mouse happens to also behave like a touch pad.  That caused
problems because we would see multiple concurrent traces of motion events
coming from the same input device so we would batch them up.
Added code to ensure that we don't batch events unless they come from
the same *source* in addition to coming from the same *device*.

Due to batching or misbehaving drivers, it's possible for the set of
pointer ids to be different from what we expect when it comes time to
split motion events across windows.  As a result, we can generate motion
events with 0 pointers.  When we try to deliver those events, we cause
an error in the InputTransport so we tear down the InputChannel and kill
the application.
Added code to check out assumption about pointer ids and drop the
event gracefully instead.

Patched up the tests to take into account the change in default behavior
for identifying touch screens and touch pads.

Change-Id: Ic364bd4cb4cc6335d4a1213a26d6bdadc7e33505
2011-01-25 16:02:22 -08:00
Mathias Agopian
275e627ef6 am 239fd805: Merge "fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)" into gingerbread
* commit '239fd805ef7c0e4116b0a89e20caaf287e91f017':
  fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
2011-01-25 14:46:40 -08:00
Mathias Agopian
59f71e7feb am d3fcd0a1: Merge "minor clean-up. SurfaceFlinger doesn\'t need libpixelflinger.so. (DO NOT MERGE)" into gingerbread
* commit 'd3fcd0a1c923498921107bb44fbc8b24582a170a':
  minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
2011-01-25 14:46:22 -08:00
Mathias Agopian
d1a99ec6b2 fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
Generally we never want to lock a buffer for write access if it is at
the "head" on the surfaceflinger side. The only exception (1) is when
the buffer is not currently in use AND there is at least one queued
buffer -- in which case, SurfaceFlinger will never use said buffer
anymore, because on the next composition around, it will be able to
retire the first queued buffer.

The logic above relies on SurfaceFlinger always retiring
and locking a buffer before composition -- unfortunately this
didn't happen during a screenshot.

This could leave us in a situation where a buffer is locked by the
application for write, and used by SurfaceFlinger for texturing,
causing a hang.

Here, we fix this issue by never assuming the exception (1), it was
intended as an optimization allowing ANativeWindow::lockBuffer() to
return sooner and was justified when most of SF composition was
done in software. The actual buffer locking is now ensured by
gralloc. We could have handled screenshots in a similar way to
a regular composition, but it could have caused glitches on screen,
essentially, taking a screenshot could cause to skip a frame.

now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.

noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.
2011-01-25 14:19:13 -08:00
Mathias Agopian
a0c6b76173 minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
Change-Id: I1ddbbbec4fa5b2521ef3787bc28efe1bc90d0060
2011-01-25 14:18:15 -08:00
Chet Haase
66b3d15912 am 2acb67ec: am 67005b05: Merge "Use optimized display lists for all hwaccelerated rendering" into honeycomb
* commit '2acb67ec9fe34316231519373f59dfb76c03d57b':
  Use optimized display lists for all hwaccelerated rendering
2011-01-24 13:30:37 -08:00
Chet Haase
47ab362e8d Use optimized display lists for all hwaccelerated rendering
Previously, display lists were used only if hardware acceleration
was enabled for an application (hardwareAccelerated=true) *and* if
setDrawingCacheEnabled(true) was called. This change makes the framework
use display lists for all views in an application if hardware acceleration
is enabled.

In addition, display list renderering has been optimized so that
any view's recreation of its own display list (which is necessary whenever
the visuals of that view change) will not cause any other display list
in its parent hierarchy to change. Instead, when there are any visual
changes in the hierarchy, only those views which need to have new
display list content will recreate their display lists.

This optimization works by caching display list references in each
parent display list (so the container of some child will refer to its
child's display list by a reference to the child's display list). Then when
a view needs to recreate its display list, it will do so inside the same
display list object. This will cause the content to get refreshed, but not
the reference to that content. Then when the view hierarchy is redrawn,
it will automatically pick up the new content from the old reference.

This optimization will not necessarily improve performance when applications
need to update the entire view hierarchy or redraw the entire screen, but it does
show significant improvements when redrawing only a portion of the screen,
especially when the regions that are not refreshed are complex and time-
consuming to redraw.

Change-Id: I68d21cac6a224a05703070ec85253220cb001eb4
2011-01-24 08:43:20 -08:00
Jeff Brown
d1de37fdab am 265cf2e7: Merge "Fix getSwitchState."
* commit '265cf2e76bef9ee369a7d43d567a22a0c39355ef':
  Fix getSwitchState.
2011-01-22 21:32:58 -08:00
Mathias Agopian
3205864ed8 am 612d7f3c: am a423d868: Merge "clean-up unneeded code" into honeycomb
* commit '612d7f3c092ec2c4a2ae44cb09d6dfb4e525a659':
  clean-up unneeded code
2011-01-20 17:25:14 -08:00
Mathias Agopian
78efe9773e Merge "clean-up unneeded code" into honeycomb 2011-01-20 12:25:26 -08:00
Mathias Agopian
2bd1d95efe clean-up unneeded code
now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.

noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.

Change-Id: I210413d4c8c0998dae05c8620ebfc895d3e6233d
2011-01-20 12:10:11 -08:00
Jeff Brown
cb203b228b Fix getSwitchState.
InputReader::getSwitchState always returns AKEY_STATE_UNKNOWN
because SwitchInputMapper::getSources() returns 0 which cannot
match any source mask including AINPUT_SOURCE_ANY.  As a result
initial lid switch detection is broken.

This change adds a new source constant AINPUT_SOURCE_SWITCH
that indicates that the source has switches.

Change-Id: I5321ecf0ce84f1c2b4535f6c163d3f4dcf9b7a9b
2011-01-19 20:35:47 -08:00
Jeff Brown
6453b75d38 am 5f668c6e: am 8b9df978: Merge "Fix getSwitchState." into honeycomb
* commit '5f668c6e6bb2515325632691a804a7c8f24ebb09':
  Fix getSwitchState.
2011-01-19 18:58:28 -08:00
Jeff Brown
430c21ea87 Fix getSwitchState.
InputReader::getSwitchState always returns AKEY_STATE_UNKNOWN
because SwitchInputMapper::getSources() returns 0 which cannot
match any source mask including AINPUT_SOURCE_ANY.  As a result
initial lid switch detection is broken.

This change adds a new source constant AINPUT_SOURCE_SWITCH
that indicates that the source has switches.

Change-Id: I5321ecf0ce84f1c2b4535f6c163d3f4dcf9b7a9b
2011-01-19 18:41:38 -08:00
Jeff Brown
98e88a7d7a am 41395459: Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread
* commit '41395459e676cf9ab4059e08446656f145662c2d':
  Filter virtual keys after touches.  (DO NOT MERGE)
2011-01-18 14:38:27 -08:00
Jeff Brown
37f7abd457 Merge "Add joystick support to framework." 2011-01-17 15:57:44 -08:00
Jeff Brown
218e7c74e6 Add joystick support to framework.
Change-Id: I95374436708752e1a9cff3f85c5b9bc3e0987961
2011-01-17 13:51:00 -08:00
Dharmaray Kundargi
f47c93b79c Merge "integrate videoeditor preview player." into honeycomb 2011-01-17 10:52:23 -08:00
Jamie Gennis
c4d4aeab52 Implement SurfaceTexture frame-available callback.
This change implements the onFrameAvailable callback for the
SurfaceTexture java class.  It includes the C++ SurfaceTexture code as
well as the JNI and Java code to enable the callback.

Change-Id: Ifd8b8e7ad46ee70cba6da1c2e96dab8045d1ea30
2011-01-16 17:28:39 -08:00
Dharmaray Kundargi
b6783164e8 integrate videoeditor preview player.
Change-Id: I83084f494605c8e6f4d198afa8c36f9e29579667
2011-01-16 16:43:20 -08:00
Mathias Agopian
b353fd9746 Merge "Fix error reporting in Surface::cancelBuffer()" into honeycomb 2011-01-14 19:27:32 -08:00
Mathias Agopian
a317f1ba7f Fix error reporting in Surface::cancelBuffer()
when we validate the surface there, most errors are in fact allowed
because it is legal to cancel a buffer after a surface has been
destroyed (for instance). in that case make sure to not log
error messages as they are very confusing.

Change-Id: Iecdfbaf6d9ee5da54d56cd7ea7a0d430c30934b0
2011-01-14 11:04:34 -08:00
Jamie Gennis
9a78c90cd4 Fix remote GraphicBuffer allocation in SurfaceFlinger.
This change fixes a horrible hack that I did to allow application
processes to create GraphicBuffer objects by making a binder call to
SurfaceFlinger.  This change introduces a new binder interface
specifically for doing this, and does it in such a way that
SurfaceFlinger will maintain a reference to the buffers until the app is
done with them.

Change-Id: Icb240397c6c206d7f69124c1497a829f051cb49b
2011-01-13 12:19:04 -08:00
Jamie Gennis
f238e28500 Implement crop & transform for SurfaceTexture.
This change adds support for the setCrop and setTransform methods of the
SurfaceTexture C++ class.  The crop and transform for the current
texture will be accessed by applications as a single texture coordinate
transform matrix.

Change-Id: I6482bf96f680e5c175364e848936db3908d6c8f8
2011-01-12 11:28:38 -08:00