Prevents sending out ConnectivityManager broadcasts when the connection
is repeating the same major state. This means continued wifi scanning
does not generate CM broadcasts (though wifi state broadcasts continue).
bug: 2265222
Dr No approval: jsh
This provides a quick fix for http://b/2298803 (if the
in-call UI comes up while the user is holding the
windowshade, the shade sticks in place and the display
becomes unresponsive).
Merged from master (I92a824fe).
TODO: safely restore code to animate the shade closed rather
than simply causing it to disappear.
Change-Id: I53dc76fdfe86636f30f37a223a88d27a5766d3eb
This may fix the issue, but we have no repro steps so no way to
make sure.
What appeared to be going on was that the emergency dialer was
created, but still had the starting preview window above it. We
were stuck in this state because the preview window didn't have
the "hide lock screen" flag set, so the lock screen would never
be removed, and thus we would never take care of finishing the
show of the emergency dialer (because it was not visible) and
thus not remove the starting window.
The solution here is to simply propagate the lock flags up to the
starting window.
Change-Id: I6da9f6494537f0661d9d230664ebf745c293ea7d
The problem is due to spurious headset connection indications received from event observer when a 3.5mm headset w/o mic is connected.
In this particular case, The HeadsetObserver first received a valid indication of headset with mic connection, followed by a headset with mic disconnection and finally a headset w/o mic connection.
The HeadsetObserver delays the headset disconnection intent to leave time to music app to pause music before the output path is switched.
As the last headset w/o mic connection indication is received from the event observer before the intent corresponding to the spurious headset with mic disconnection is broadcast, the later is discarded. Results a state where the headset with mic is always considered as connected.
The fix consists in not canceling pending intents when a new headset state is received and carrying the HeadsetObserver state with the delayed message triggering the broacast of the disconnection intent.
There were a few places in the window manager where we wouldn't cause
a layout after making a window visible. This would leave it using
whatever size and position it last have since we don't layout windows
when they are not visible.
Also includes a little part I missed in the security issue that
allowed wallpapers to see input on the lock screen.
Change-Id: Icd7e037ad9a67ac936bc7039d87ed68f49502d73
Make sure the application is always given the most recent configuration
when launcher. Use the current configuration, instead of whatever happens
to be set by the app, for reporting what it was launched with.
Change-Id: I2ffe306f56cc9092b640546dd0a28d2c29b9c0b3
The system_server process is deadlocking between event dispatch and window
manager code. This change fixes the lock scoping to eliminate the deadlock.
Change-Id: I00f029e4d51d7432119ad3aeec260df215b52546
...in setup wizard ->Wifi setup screen.
We were stopped waiting for the wallpaper to draw, which it would never do
because it had been obscured and thus hidden.
Change-Id: Ia48b3f2a46ca970f143cbaee99f5f2a054378986
This is a quick and dirty hack to not deliver touch events to the wallpaper when
they are being sent to the keyguard. Perhaps we should have a separate window
flag for this, but... bleah. Maybe later. Or maybe I'll use that secure flag.
Or something.
Change-Id: Ifd95b9f5b10db24a0854a93b925a833b24331b4c
Accidentally submitted into eclair instead of eclair-mr2.
I apparently rebased my mr2 working dir to eclair by mistake.
Do not merge this so the desired change will survive on mr2 as intended.
bug: 2265222
Status bar uses the SINK_STATE_CHANGE intent to determine the icon.
This intent also has the device. Thus, we can get this intent for any
device and we update the icon wrongly. The same problem is with Wifi.
This was not commonly observed till now, but with the car dock changes
its easy to reproduce as we can get an incoming connection from the
car's bluetooth system. For Wifi, this will cause coexistance issues
especially with desk docks.
Dr No: Eastham
Bug: 2133530
Don't send a connectivity change notification if the change is in detailed state only.
IE, Disconnect/Idle -> Disconnect/Scanning should not trigger a connection change
notification.
bug: 2265222
Part of a fix for bug b/2300622 (Proximity sensor always blows up the lock screen while in call)
Change-Id: I9ef888638b19540a78a34507d52ff522f505102f
Signed-off-by: Mike Lockwood <lockwood@android.com>
1) Do not pulse notification LED when screen is on.
2) Pulse once on new notification if Settings.System.NOTIFICATION_LIGHT_PULSE is false,
otherwise pulse persistently while screen is off.
Fixes part of bug b/2238250 (trackball should pulse occasionally to indicate new email)
Change-Id: Icc49422a4e9d14412fc159a8e2596503a85bac51
Signed-off-by: Mike Lockwood <lockwood@android.com>
This fixes another case where the screen would turn on when the keyguard is open but hidden by another activity.
Change-Id: I2b7c8a329036401709e96ded4f4c138041192a71
Signed-off-by: Mike Lockwood <lockwood@android.com>
...Binary XML file line #37: Error inflating class <unknown> after adding a secondary account
The problem was that we weren't dealing well with the situation where we start a transition
from activity A to B, then transition back to A before B is shown (it finishes before being
shown), then transition from A to C. At this point we had some state showing that we
were in the process of showing A from it being hidden (due to the middle transition from
B to A), which would cause the layout pass to ensure its window is hidden before the
transition starts.
The solution is to detect the case where we are showing a token and it is already actually
shown, and in this case not do all of the token setup for it to wait for its windows to
be displayed before it is shown. This isn't needed, the windows are already displayed
or the token is already set up to wait for them to be displayed.
Change-Id: I16925b91e1e2449dd65ade162a5758173c6e2695
If reenableKeyguard() is called before the previous disableKeyguard() call is processed,
then TokenWatcher.sendNotificationLocked() will cancel the request, resulting in neither
the TokenWatcher acquired() or released() methods being called.
In that case, reenableKeyguard() will hang waiting for released() to set
mWaitingUntilKeyguardReenabled to false. Now we only wait in reenableKeyguard()
if the TokenWatcher acquired() method is called and the keyguard has actually been disabled.
This should fix bug b/2270192
Change-Id: Id886fb28df607dbb4543124f2db6997121d6a682
Signed-off-by: Mike Lockwood <lockwood@android.com>
Fixes b/2244560 (Time Stamp On Bug Reports And Pictures Is One Hour Off)
Change-Id: I69324a33f80e41ce68a0e6fdba08b80ed9453e19
Signed-off-by: Mike Lockwood <lockwood@android.com>
The cause of the problem is that under certain circumstance the HeadsetObserver receives unexpected connection events. For instance,
when removing a bad quality 3.5mm stereo jack without mic the following events can be received:
1 connection of a headset with mic
2 removal of a headset with mic.
The result is that the no mic headset is never disconnected and audio policy manager considers it is still present. Then the music or downlink call audio is always routed to headset even if none is connected giving the impression that audio is lost, except whne you reconnect a headset of enable speaker phone.
The fix consists in adding more checks in HeadsetObserver to reject illegal transitions in headset state received from event observer.
Add optional flag to Wakelock.release() to specify whether we should wait for proximity sensor to go negative before turning on the screen.
Clear the "waiting for proximity sensor to go negative" state when the power key is pressed.
Part of the fix for b/2243198 (Black screen lockup after ending call)
Change-Id: I813fdb7aa4192cd3384a25be9e59d7d4b90da53a
Signed-off-by: Mike Lockwood <lockwood@android.com>
Do not cancel screen brightness animation in forceUserActivityLocked unless screen is turning off.
Also not turn the screen on if PowerManager.preventScreenOn(false) is called while proximity sensor is active.
Fixes b/2254818 (dim display) where due to a race condition the screen is stuck in a dim state.
Change-Id: If6f805609c8d463631b9e22805e5242714ce34c0
Signed-off-by: Mike Lockwood <lockwood@android.com>
This prevents the device from sleeping while a deferred proximity sensor
event is pending.
Fixes b/2260005 (Proximity sensor can fail due to missing wakelock)
Change-Id: Ia4825f548b5b7d8a0b184f720b32c2f21b77b96e
Signed-off-by: Mike Lockwood <lockwood@android.com>