7595 Commits

Author SHA1 Message Date
Dianne Hackborn
73ab6a49db Fix issue #5755172: Soft menu key disappears when menu is open
We need to work more like before in determining whether the menu
key is needed -- in some cases look back in the window list to
determine this if we don't know the value from the current window.

This requires adding a new private flag indicating whether the
compat menu state is known for a window, which is set by
PhoneWindow as part of its existing process of computing the flag
for its own windows.

Now we can have a new API on WindowState to determine the value
of this flag for a window, which if needed walks back in the window list
to find a window the value is known for (or stops at what the policy
has determined is the top full-screen window, so we stop like we used
to at things like the lock screen or the bottom of an application).

Change-Id: I829de6d629b5af8bcb422cb85249ee4041c7205e
2011-12-13 11:32:11 -08:00
Jeff Sharkey
d04ff11d6f Avoid NPE when missing network stats.
Bug: 5750339
Change-Id: I4b739dbd076b270a5a2b2e2a1e0f6e445d8c124e
2011-12-12 18:51:26 -08:00
Chia-chi Yeh
46a4e81dbd Merge "VPN: delete the "abort" file before starting VPN daemons." into ics-mr1 2011-12-08 17:22:16 -08:00
Chia-chi Yeh
c187273292 VPN: delete the "abort" file before starting VPN daemons.
Bug: 5714296
Change-Id: Idba41b9f3907747a84387ea4f3e930b3a185a06e
2011-12-08 16:51:41 -08:00
Irfan Sheriff
97ff789332 Merge "Fix wifi bring up at boot up" into ics-mr1 2011-12-08 15:59:26 -08:00
Irfan Sheriff
5401f0b87b Fix wifi bring up at boot up
Bug: 5719176
Change-Id: Iac879fc634f6ab6289b73c46931d754bc0af2f87
2011-12-08 15:50:47 -08:00
Irfan Sheriff
4494c90616 Handle emergency call back mode correctly
Bug: 5726996
Change-Id: I5815dd402bd73c530b9ba6d545d8956064949aa2
2011-12-08 11:31:52 -08:00
Jeff Brown
e0e9fd981c Merge "Fix system hotkey handling." into ics-mr1 2011-12-07 23:29:45 -08:00
Jeff Brown
68b909d8ac Fix system hotkey handling.
Fixed a problem where the key up for the ALT or META key was not
delivered to the task switcher dialog because it was deemed
to be inconsistent with the window's observed state.  Consequently
the dialog would not be dismissed when the key was released.

Moved global hotkey handling for META+* shortcuts and ALT/META-TAB
into the window manager policy's interceptKeyBeforeDispatching
method.  This change prevents applications from hijacking these
keys.

The original idea was that these shortcuts would be handled only
if the application did not handle them itself.  That way certain
applications, such as remote desktop tools, could deliberately
override some of these less important system shortcuts.
Unfortunately, that does make the behavior inconsistent across
applications.  What's more, bugs in the onKeyDown handler of
applications can cause the shortcuts to not work at all, for
no good reason.

Perhaps we can add an opt-in feature later to enable specific
applications to repurpose these keys when it makes sense.

Bug: 5720358
Change-Id: I22bf17606d12dbea6549c60d20763e6608576cf7
2011-12-07 21:37:16 -08:00
Dianne Hackborn
87e06ec2fa Merge "Fix issue #5144065: Tap on Music icon from Home screen..." into ics-mr1 2011-12-07 15:01:55 -08:00
Winson Chung
0a361b10a6 Merge "Workaround for issue where the notifyDatasetChanged call chain is broken when Launcher is killed. (Bug 5703782)" into ics-mr1 2011-12-07 14:33:31 -08:00
Dianne Hackborn
ae0a0a84d1 Fix issue #5144065: Tap on Music icon from Home screen...
... a different app opens

In some cases when reparenting activities we could end up with a reply
chain that crosses task boundaries, so if an activity below that needs
to be reparented we pull that and the activities above it up into the
new task.

Change-Id: Ia4fa041ab7069e39dac162ddbf5b8e1de98675b9
2011-12-07 14:03:01 -08:00
Irfan Sheriff
87f0a7b1aa Fix CS wakelock handling
Change-Id: Ibe1c1ab3e26ff0ae7cab7bfb0bd868bfab246037
2011-12-07 11:28:21 -08:00
Winson Chung
c3f581b047 Workaround for issue where the notifyDatasetChanged call chain is broken when Launcher is killed. (Bug 5703782)
Change-Id: Ic57a7ce85f41d58cd40b7d30eef4a1bf685182e5
2011-12-06 14:21:10 -08:00
Dianne Hackborn
0c0120efa2 Merge "Fix issue #5714517: App shortcuts can result in bad task intents" into ics-mr1 2011-12-05 19:16:54 -08:00
Dianne Hackborn
52245ac7c4 Merge "Fix issue #5713576: Home redraws after returning from app on Nexus S 4G" into ics-mr1 2011-12-05 19:07:52 -08:00
Dianne Hackborn
77eaaf04c6 Fix issue #5713576: Home redraws after returning from app on Nexus S 4G
Turn of destroying of activities during memory trimming.

Change-Id: Ibea415c13fca4f67f56adefe81a1495f5f9ad273
2011-12-05 19:00:42 -08:00
Dianne Hackborn
f5b8671c34 Fix issue #5714517: App shortcuts can result in bad task intents
New API to let you build an Intent whose base configuration is correct,
but has an additional "selector" to pick out the specific app that you
would like launched.

Change-Id: Ide9db6dc60e2844b7696cfe09b28337fe7dd63db
2011-12-05 17:42:41 -08:00
Eric Laurent
7b6aff2373 Merge "audioflinger: fix audio skipping over A2DP" into ics-mr1 2011-12-05 17:20:53 -08:00
Eric Laurent
4433169a64 audioflinger: fix audio skipping over A2DP
The maximum sleep time allowed in the mixer thread when audio tracks
are enabled but not ready for mixing is derived from the latency
reported by the output stream.
This does not work for A2DP where the latency also reflects encoding, decoding
and transfer time.

Modified activeSleepTimeUs() to take A2DP case into account.

Issue 5682206.

Change-Id: I3784ac01fb6f836b5a6ce6f764fb15347586de35
2011-12-05 10:40:18 -08:00
Jesse Hall
8a7c940eff SurfaceFlinger: fix layer removal race condition
Layer::lockPageFlip() and layer::onRemove() could be called on
different threads and race such that lockPageFlip() successfully
called mSurfaceTexture->updateTexImage() but then gets NULL back from
mSurfaceTexture->getCurrentBuffer(), leading to a crash.

This change moves Layer::onRemove() calls to
SurfaceFlinger::commitTransaction() so they happen after the Layer is
done being drawn from and only happen on the main surfaceflinger
thread.

Change-Id: I4b550caadff4cc1878d7c3bca6129193fb0c713e
2011-12-02 10:03:25 -08:00
Kenny Root
5a7c91769f Merge "Fix free_cache to actually work" into ics-mr1 2011-12-01 14:14:22 -08:00
Dianne Hackborn
55e81bd0f2 Merge "Improve how we manage the previous app." into ics-mr1 2011-12-01 12:47:43 -08:00
Dianne Hackborn
50685606cf Improve how we manage the previous app.
Setting it when a new activity is being resumed is too soon, because
things like an activity launching an exiting (without being seen by
the user) can knock out the real previous app that we want.

So now we set it when an activity is stopped.  At this point it is
going to move from the preceptible to background oom adj, so it is
a good point to determine whether it should be a previous app to
instead put it to that oom adj.  This also avoids things like
activities that start and immediately finish from impacting the
previous app.

Further, we keep track of the time each activity was last shown, and
use this to further filter what is set as the previous app.

Change-Id: I72d1cac4de0cc2d4598170296028f11b06918d4f
2011-12-01 12:23:37 -08:00
Kenny Root
ad757e9b36 Fix free_cache to actually work
This broke with some other path-related changes, so it was scanning for
/data/*/cache instead of /data/data/*/cache

Also remove redundant call to restat

Bug: 5686310
Change-Id: Id1661f0f1337858fc9ead53c56ab7557f421c591
2011-12-01 09:07:55 -08:00
Daniel Sandler
2a40d0d92b Merge "Put screensavers back in the icebox for now. DO NOT MERGE." into ics-mr1 2011-12-01 06:29:53 -08:00
satok
b94a7fb3d7 Merge "Fix ConcurrentModificationException in TextServicesManagerService" into ics-mr1 2011-11-30 17:37:52 -08:00
Svetoslav Ganov
d8ec8db5e0 Merge "Fixing memory leaks in the accessiiblity layer." into ics-mr1 2011-11-30 16:56:41 -08:00
Dianne Hackborn
88f10c6ce5 Merge "Fix issue #5679504: Device stuck and sudden reboot - Watchdog reset?" into ics-mr1 2011-11-30 14:12:44 -08:00
Dianne Hackborn
f8d20bd649 Merge "Turn off debug log." into ics-mr1 2011-11-30 14:11:17 -08:00
Mathias Agopian
e8ba2aba93 Merge "add a way to access the version string of the h/w implementation of EGL" into ics-mr1 2011-11-30 13:52:21 -08:00
Daniel Sandler
d2b22a885a Put screensavers back in the icebox for now. DO NOT MERGE.
Bug: 5689684
Change-Id: I3a5291c3520bb43e35d55714f1522e4ae7f6e63c
2011-11-30 15:47:36 -05:00
Daniel Sandler
865b98024f Merge "Expanding NotificationManager's event logging." into ics-mr1 2011-11-30 11:54:17 -08:00
Dianne Hackborn
bbb09aceb6 Turn off debug log.
Change-Id: I1d4612133580d493d81d0b15752e009202e95ce0
2011-11-30 11:40:40 -08:00
Dianne Hackborn
1fbee79eb3 Fix issue #5679504: Device stuck and sudden reboot - Watchdog reset?
Calls to get the display size no longer need to acquire the global
window lock.

Change-Id: I751ea6ed0e20f1f521783f4bd5a8f9c31cd43573
2011-11-30 11:29:58 -08:00
Dianne Hackborn
db904b4782 Merge "Fix issue #5628789: Cannot set static/custom wallpaper after clearing Settings data" into ics-mr1 2011-11-30 10:20:29 -08:00
satok
4c3fa642ef Fix ConcurrentModificationException in TextServicesManagerService
Bug: 5687402
Change-Id: I59086f956b6ee618ff0e1b1034d767d9ae295848
2011-11-30 22:46:16 +09:00
Daniel Sandler
b64cb88c32 Expanding NotificationManager's event logging.
Specifically, add the "tag" and "mustNotHaveFlags" columns.

(Hunting bug 5444859.)

Change-Id: Ic9ece44ed4697f7a8ef54e7870f72c9f94518cd9
2011-11-29 23:48:29 -05:00
Svetoslav Ganov
d116d7c78a Fixing memory leaks in the accessiiblity layer.
1. AccessibilityInteractionConnections were removed from the
   AccessiiblityManagerService but their DeathRecipents were
   not unregistered, thus every removed interaction connection
   was essentially leaking. Such connection is registered in
   the system for every ViewRootImpl when accessiiblity is
   enabled and inregistered when disabled.

2. Every AccessibilityEvent and AccessiilbityEventInfo obtained
   from a widnow content querying accessibility service had a
   handle to a binder proxy over which to make queries. Hoewever,
   holding a proxy to a remote binder prevents the latter from
   being garbage collected. Therefore, now the events and infos
   have a connection id insteand and the hindden singleton
   AccessiiblityInteaction client via which queries are made
   has a registry with the connections. This class looks up
   the connection given its id before making an IPC. Now the
   connection is stored in one place and when an accessibility
   service is disconnected the system sets the connection to
   null so the binder object in the system process can be GCed.
   Note that before this change a bad implemented accessibility
   service could cache events or infos causing a leak in the
   system process. This should never happen.

3. SparseArray was not clearing the reference to the last moved
   element while garbage collecting thus causing a leak.

bug:5664337

Change-Id: Id397f614b026d43bd7b57bb7f8186bca5cdfcff9
2011-11-29 18:51:30 -08:00
Dianne Hackborn
ebac48c6ad Fix issue #5628789: Cannot set static/custom wallpaper after clearing Settings data
Need to make sure the "files" directory is created.

Change-Id: I8d5b374a5a03590a5ce7fafb5171705414f7b2f9
2011-11-29 18:01:50 -08:00
Mathias Agopian
cadd325aff add a way to access the version string of the h/w implementation of EGL
we use a hidden egl extension. the version string is printed
in SF's dumpsys log.

Change-Id: I123eb4bde6de462bb2404c67b74d6d6219a48d6a
2011-11-29 18:00:35 -08:00
Mathias Agopian
bb1e7d4324 Merge changes I7e973a35,Ib3386fcc into ics-mr1
* changes:
  SurfaceTexture: add EGL_KHR_fence_sync option
  SurfaceTexture: add a blit-to-FBO test
2011-11-29 17:46:35 -08:00
Jamie Gennis
77cec6132a SurfaceTexture: add EGL_KHR_fence_sync option
This change adds a compile-time option for SurfaceTexture to use the
EGL_KHR_fence_sync extension to synchronize access to Gralloc buffers.

Bug: 5122031
Change-Id: I7e973a358631fff5308acf377581b811911fe790
2011-11-29 17:09:01 -08:00
Dianne Hackborn
1808f214b0 Merge "Fix issue #5636525: ANR observed in setup wizard after changing language" into ics-mr1 2011-11-29 15:28:41 -08:00
Dianne Hackborn
8bf0aa9b2b Fix issue #5636525: ANR observed in setup wizard after changing language
We could sometimes allow a process to be killed while still waiting for
an activity in it to finish stopping.

Change-Id: Ibf89665c4ad6da6be22de04a82b19ef778a7fda0
2011-11-29 13:54:43 -08:00
Dianne Hackborn
50b2042502 Merge "Another attempt at getting OOM reports to batch." into ics-mr1 2011-11-29 13:05:26 -08:00
Dianne Hackborn
672342c309 Another attempt at getting OOM reports to batch.
We now generate a stack-trace looking thing at the top of the report.

Also fix a bug I hit where the phone window manager was sending a
broadcast before the boot had completed.

Change-Id: I0cee16180e4d05c9bd3fe715212a28f504ec91ac
2011-11-29 12:55:50 -08:00
Mathias Agopian
3f2730c531 Merge "temporarily hardcode Nexus S refresh rate" into ics-mr1 2011-11-29 11:35:07 -08:00
Dianne Hackborn
81de8b99f5 Fix issue #5642121: Proximity sensor didn't turn the screen on in call
Turning animations back on exposed this.  The problem is that when the
screen brightness changes, it initiates a brightness animation.  When
we force the screen to black as we wait for it to be ready to display,
it sees that an animation is running so stops it and thinks this means
it should now turn the display off.

To fix this, don't modify the screen brightness while we are waiting
to show the screen.  This is good anyway because the whole point is to
avoid showing the screen until ready, and modifying the brightness at
that point would turn it on prematurely.

Change-Id: I84b296f8ca5705c2d237ea7741cdeb95c5521df9
2011-11-28 16:57:37 -08:00
Dianne Hackborn
6d05fd3c79 Fix issue #5588689: Black camera preview after coming back from gmail
Make surface management between SurfaceView and the window manager
much more controlled, to ensure that SurfaceView always gets to report
the current surface is destroyed before the window manager actually
destroys it.

Also a small tweak to allow windows that have a wallpaper background
to still have a preview window.  This makes launching home after it
has been killed feel much more responsive.

Change-Id: I0d22cf178a499601a770cb1dbadef7487e392d85
2011-11-28 14:45:50 -08:00