5171 Commits

Author SHA1 Message Date
Mathias Agopian
a0f40033c0 Merge "fix [3385504] Surface flinger hang when adding dim surface" into honeycomb 2011-01-26 12:41:02 -08:00
Winson Chung
dd071fea23 am 38fe6ff4: am 2c070bae: Merge "Re-enabling queued unbinding of services after requests to the service. (3394210)" into honeycomb
* commit '38fe6ff45a6cbc328d1b92c9b9d79c65c3fb29ae':
  Re-enabling queued unbinding of services after requests to the service. (3394210)
2011-01-26 12:35:21 -08:00
Winson Chung
38fe6ff45a am 2c070bae: Merge "Re-enabling queued unbinding of services after requests to the service. (3394210)" into honeycomb
* commit '2c070bae4493cd1976c5086ec4cbf6ce10482742':
  Re-enabling queued unbinding of services after requests to the service. (3394210)
2011-01-26 12:32:50 -08:00
Winson Chung
2c070bae44 Merge "Re-enabling queued unbinding of services after requests to the service. (3394210)" into honeycomb 2011-01-26 12:30:26 -08:00
Winson Chung
16c8d8a558 Re-enabling queued unbinding of services after requests to the service. (3394210)
- Fix for crash when detaching from window
- Potential fix for occasional IllegalStateException when updating List based widgets

Change-Id: I3d3f2bb691552a1136111043db686c4926b510c6
2011-01-26 12:09:27 -08:00
Joe Onorato
b648c60854 am a4a5ec5e: am 1aadb210: Merge changes I48392c75,Id09437a4,I4a0aa878 into honeycomb
* commit 'a4a5ec5e748f99c40301c9c422b3d36cb44c6081':
  Expose the window flags for lights out mode.
  Make TabletStatusBar call into StatusBarManagerService when it goes out of lights out mode on its own.
  Make FLAG_FULLSCREEN not go into lights out mode anymore.
2011-01-26 11:50:38 -08:00
Joe Onorato
a4a5ec5e74 am 1aadb210: Merge changes I48392c75,Id09437a4,I4a0aa878 into honeycomb
* commit '1aadb2108d7614d9d1ff61b41c6c31cb8d211ab9':
  Expose the window flags for lights out mode.
  Make TabletStatusBar call into StatusBarManagerService when it goes out of lights out mode on its own.
  Make FLAG_FULLSCREEN not go into lights out mode anymore.
2011-01-26 11:48:48 -08:00
Jean-Michel Trivi
2ba92c71b5 do not merge bug 3370834 Cherrypick from master
Cherripick from master CL 79833, 79417, 78864, 80332, 87500

Add new audio mode and recording source for audio communications
 other than telelphony.

The audio mode MODE_IN_CALL signals the system the device a phone
 call is currently underway. There was no way for audio video
 chat or VoIP applications to signal a call is underway, but not
 using the telephony resources. This change introduces a new mode
 to address this. Changes in other parts of the system (java
 and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
 state variable directly, but to use two new convenience methods,
 isInCall() and isStateInCall(int) instead.

Add a recording source used to designate a recording stream for
voice communications such as VoIP.

Update the platform-independent audio policy manager to pass the
 nature of the audio recording source to the audio policy client
 interface through the AudioPolicyClientInterface::setParameters()
 method.

SIP calls should set the audio mode to MODE_IN_COMMUNICATION,
 Audio mode MODE_IN_CALL is reserved for telephony.

SIP: Enable built-in echo canceler if available.
1. Always initialize AudioRecord with VOICE_COMMUNICATION.
2. If echo canceler is available, disable our echo suppressor.

Note that this CL is intentionally not correcting the
 getAudioSourceMax() return value in MediaRecorder.java as the
 new source is hidden here.

Change-Id: Ie68cd03c50553101aa2ad838fe9459b2cf151bc8
2011-01-26 11:20:01 -08:00
Kenny Root
f4b2c0422c am 91c459ec: Copy user info from PackageSetting as well
* commit '91c459ec7dba6d56816ff5cbd92c627e0f718915':
  Copy user info from PackageSetting as well
2011-01-26 11:00:20 -08:00
Joe Onorato
55bf3809b9 Make TabletStatusBar call into StatusBarManagerService when it goes out of lights out mode on its
own.

Bug: 3241144
Change-Id: Id09437a4f32f1d64daa7ae65e41c99897b5964d7
2011-01-26 10:32:18 -08:00
Joe Onorato
644f9c3ad9 Make FLAG_FULLSCREEN not go into lights out mode anymore.
Change-Id: I4a0aa8789f537717f82df4efb6a35108e1ab1784
2011-01-26 10:32:18 -08:00
Kenny Root
29a208e12c am ff271a22: am 2ec4af59: am 138757db: Merge "Make OBB results a one-way call" into gingerbread
* commit 'ff271a2288f375fc7a5854ac0d1f7c969d91996d':
  Make OBB results a one-way call
2011-01-26 10:13:54 -08:00
Kenny Root
ff271a2288 am 2ec4af59: am 138757db: Merge "Make OBB results a one-way call" into gingerbread
* commit '2ec4af59209ab3a7088a001bbbcb10ef0b846564':
  Make OBB results a one-way call
2011-01-26 10:11:21 -08:00
Kenny Root
2ec4af5920 am 138757db: Merge "Make OBB results a one-way call" into gingerbread
* commit '138757db4f19cb626ef5c1d371d4fca004304a08':
  Make OBB results a one-way call
2011-01-26 09:25:43 -08:00
Kenny Root
138757db4f Merge "Make OBB results a one-way call" into gingerbread 2011-01-26 09:17:28 -08:00
Mathias Agopian
d35c6667c8 fix [3385504] Surface flinger hang when adding dim surface
Change-Id: I8e0cda414bcad5854d2ca5dde8370bfd8b2e5ea4
2011-01-25 20:52:46 -08:00
Jeff Brown
0a9f335e70 Fix build.
Change-Id: Id08f3ccced1281f1c6840cc67713bcedcf9a53c0
2011-01-25 18:52:34 -08:00
Jeff Brown
ab2f096030 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
707bf521a4 am 1b0cee36: Merge "Disable mouse support. (DO NOT MERGE)" into honeycomb
* commit '1b0cee368b35262a8de49c7a3c28e12195817533':
  Disable mouse support.  (DO NOT MERGE)
2011-01-25 18:20:40 -08:00
Jeff Brown
12b2dc9088 am b1e0a870: Merge "Fix crashes caused by some input devices." into honeycomb
* commit 'b1e0a870e4099490127bb917bb4fc7a8f48db893':
  Fix crashes caused by some input devices.
2011-01-25 18:20:35 -08:00
Jeff Brown
1b0cee368b Merge "Disable mouse support. (DO NOT MERGE)" into honeycomb 2011-01-25 18:18:10 -08:00
Jeff Brown
7fe57bfa0d Disable mouse support. (DO NOT MERGE)
Change-Id: Ica9703a18195079d227caff8c2389c750559f3d0
2011-01-25 17:52:01 -08:00
Kenny Root
b7db2726e9 Make OBB results a one-way call
OBB result back to an application needs to be a one-way binder call.

Bug: 3353699
Change-Id: I0e625914d18a001c2fa9d764ea6463f34cf96743
2011-01-25 17:29:59 -08:00
Jeff Brown
58a2da843f 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
df8368925a 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
af4fa5d83d am 1955a5c9: Merge "partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)" into gingerbread
* commit '1955a5c9da421dc89bb1a1dd3d3193159192cde9':
  partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)
2011-01-25 14:46:35 -08:00
Mathias Agopian
6b72702f30 am d0441f92: Merge "fix a small bug that caused screenshot to show garbage in some cases (DO NOT MERGE)" into gingerbread
* commit 'd0441f921b2b1879fb44041f521d9bfaa5a547d0':
  fix a small bug that caused screenshot to show garbage in some cases (DO NOT MERGE)
2011-01-25 14:46:31 -08:00
Mathias Agopian
2d665dd37a am 043a3cdd: Merge "workaround [3201922] display not on: log full of gralloc errors (DO NOT MERGE)" into gingerbread
* commit '043a3cddf67e2baf38711bcb125084599f8f9802':
  workaround [3201922] display not on: log full of gralloc errors (DO NOT MERGE)
2011-01-25 14:46:27 -08:00
Mathias Agopian
88bccab35c 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
21956040a7 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
68d3478860 partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)
We used to guarantee that a layer in SurfaceFlinger would never be
destroyed before all references (to its ISurface) on the client
side would be released. At some point, this guarantee got
relaxed to allow to free gralloc resources sooner. This last
change was incorrect, because:
- in implementations with reference-counting the gralloc resources
wouldn't be released anyways, until all the mapping were gone
- in implementations without ref counting, the client side
would most likely crash or do something bad
- it also caused the SharedBufferStack slot to be reallocated
to another surface, which could be problematic if the client
continued to use the surface after the window manager destroyed it.

So, we essentially reinstate the guarantee that layers won't be
destroyed until after all references to their ISurface are
released.

NOTE: This doesn't entirely fix 3306150 because there is another
problem there where the Browser continues to use a surface after it
has been destroyed.

also improve SurfaceFlinger 'dumpsys' log

list the purgatory, which shows windows that have been closed,
but for which the client still has references.
2011-01-25 14:19:13 -08:00
Mathias Agopian
8aa11d82f3 fix a small bug that caused screenshot to show garbage in some cases (DO NOT MERGE)
we were not clearing the screen entirely, which caused garbage when
the screen wasn't entirely covered by windows.

Change-Id: Ia7aa13c36a8a314e0e8427d419b16b9aa2165ddf
2011-01-25 14:18:58 -08:00
Mathias Agopian
84c6f5a44c workaround [3201922] display not on: log full of gralloc errors (DO NOT MERGE)
we make sure to call compositionComplete after everytime we do
composition with the GPU (even for the screenshot case), which is
where the buffer locks are released.

Change-Id: I450430d1e4d1ee9ce1023970642378c42cdcfa4c
2011-01-25 14:18:29 -08:00
Mathias Agopian
728d849fc9 minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
Change-Id: I1ddbbbec4fa5b2521ef3787bc28efe1bc90d0060
2011-01-25 14:18:15 -08:00
Robert Greenwalt
fc8e55850b am 678c6a35: am d14239a2: Merge "Fix tethering when switching default connection" into honeycomb
* commit '678c6a358dc14beb7825b30346ab09df432ba1fe':
  Fix tethering when switching default connection
2011-01-25 10:34:53 -08:00
Robert Greenwalt
678c6a358d am d14239a2: Merge "Fix tethering when switching default connection" into honeycomb
* commit 'd14239a2fb12d775f7b2345286d36ac02234e0a7':
  Fix tethering when switching default connection
2011-01-25 10:30:36 -08:00
Robert Greenwalt
d14239a2fb Merge "Fix tethering when switching default connection" into honeycomb 2011-01-25 10:27:51 -08:00
Jean-Michel Trivi
138ca4affa Merge "Bug 3376700 Add support in APM for stream-specific volume curves" 2011-01-25 10:10:24 -08:00
Jean-Michel Trivi
3aab0583d9 Bug 3376700 Add support in APM for stream-specific volume curves
The stream volume was handled the same way for all different stream,
 the only potential difference between each of them being the number
 of steps available to the user to change the volume. This was
 mapped to 99 steps of 0.5dB amplitude, offering a maximum attenuation
 of -49.5dB.
This change consists in defining for each stream a curve with two
 knees (3 segments) for conversion from volume index to attenuation.
 This curve is defined in the AudioPolicyManager in
 initializeVolumeCurves(), and can therefore be overridden by the
 platform.
Note that this change doesn't modify the volume curves: this CL
 enables the curves to be changed by overriding this default
 behavior.

Change-Id: I575b66799c52df2906db248943b15120b8a79ea2
2011-01-25 10:04:31 -08:00
satok
e9423b7c7a am 6ee3bcf6: am 3a92c5fd: Merge "Fix the return value of switch to last ime." into honeycomb
* commit '6ee3bcf6c6b4e8a03903ca029fee5ee5df7668d3':
  Fix the return value of switch to last ime.
2011-01-25 08:04:57 -08:00
satok
6ee3bcf6c6 am 3a92c5fd: Merge "Fix the return value of switch to last ime." into honeycomb
* commit '3a92c5fd3262236e0c6969591da7f6cb50dbddfc':
  Fix the return value of switch to last ime.
2011-01-25 08:02:42 -08:00
satok
c445bcd0bc Fix the return value of switch to last ime.
Change-Id: I5fe8cc696433a7ee72973d16d8f121d3362ab0e0
2011-01-26 00:49:51 +09:00
Dianne Hackborn
1563966ca0 am 98d169ea: am 5d9d03a0: Maybe fix issue #3093599: java.lang.IndexOutOfBoundsException...
* commit '98d169eacd65e6278bb8eab354f0278065771e9f':
  Maybe fix issue #3093599: java.lang.IndexOutOfBoundsException...
2011-01-24 22:31:26 -08:00
Dianne Hackborn
98d169eacd am 5d9d03a0: Maybe fix issue #3093599: java.lang.IndexOutOfBoundsException...
* commit '5d9d03a0234faa3cffd11502f973057045cafe82':
  Maybe fix issue #3093599: java.lang.IndexOutOfBoundsException...
2011-01-24 22:12:36 -08:00
Dianne Hackborn
5d9d03a023 Maybe fix issue #3093599: java.lang.IndexOutOfBoundsException...
...Invalid index 0, size is 0 at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:2326)

It looks like if an arrow key is dispatched between the time the
list view is told its data set has changed and it does the resulting
layout pass, we could try to move the position to a now invalid
index.  This may prevent that from happening.

Also put in a better error message if saving state of a fragment
whose target is no longer in the fragment manager.

And fix a bug in PackageManager where we could return a null from
queryIntentActivities().

And add a new API to find out whether a fragment is being removed,
to help fix issue #3306021: NPE at
android.app.AlertDialog.getDefaultDialogTheme(AlertDialog.java)

Next, for new HC apps we can delay committing data to
storage until the activity is stopped.

Finally, use the new multi-threaded AyncTask executor in a few
places, so we don't have worked blocked by long-running tasks from
the application.

Change-Id: I27b2aafedf2e1bf3a2316309889613fa539760f3
2011-01-24 21:23:03 -08:00
Mathias Agopian
b85b2f5fa2 am 977553e4: am 34edd5b2: Merge "tone down the log spew regarding taking screenshots." into honeycomb
* commit '977553e4d493986819858e0f0032185cada06869':
  tone down the log spew regarding taking screenshots.
2011-01-24 19:51:40 -08:00
Mathias Agopian
977553e4d4 am 34edd5b2: Merge "tone down the log spew regarding taking screenshots." into honeycomb
* commit '34edd5b2678332e23bb78c59d4720c5b7b0e842e':
  tone down the log spew regarding taking screenshots.
2011-01-24 19:49:14 -08:00
Mathias Agopian
3431f47b47 tone down the log spew regarding taking screenshots.
Change-Id: I673806bda23eba6aab25f7505b7e0170afc9920b
2011-01-24 18:13:54 -08:00
Jeff Brown
d1953bcbc7 am 747aee5a: am 8bb7e488: Merge "Fix regression setting input windows." into honeycomb
* commit '747aee5ab96503796e55fcd444c440197cecd39a':
  Fix regression setting input windows.
2011-01-24 17:02:14 -08:00
Jeff Brown
747aee5ab9 am 8bb7e488: Merge "Fix regression setting input windows." into honeycomb
* commit '8bb7e488e2564b75d8d920850891675090debcca':
  Fix regression setting input windows.
2011-01-24 17:00:28 -08:00