TokenWatcher.acquire() synchronizes on mTokens, not this,
so we need to synchronize on mKeyguardDisabled in disableKeyguard()
to synchronize properly with reenableKeyguard().
This should fix b/2180142 (Stuck in enable keyguard when receiving phone call)
Change-Id: Iad66a2748c7fbf2c516fdb8a00988696719ea80c
Signed-off-by: Mike Lockwood <lockwood@android.com>
The dock app is forcing the screen to a particular brightness level. This
causes the window manager to often call into the power manager with the
new brightness. This causes us to go in to updateLightsLocked() to figure
out and apply the real brightness to use. When the screen is off the
real brightness always remains 0, but even if it didn't change from the
last one we would start an animation which would when done put the system
to sleep and fight with the user trying to turn the device on.
Now, if the new target brightness is the same as the last one, we leave the
animation as-is -- either running or not as appropriate.
Change-Id: I067d55ea2b39e294c5d5291587a4d8727c0b8083
Since the StatusBarPolicy is run in the System Process and shouldn't therefore call into
the Telephony process we decided to make sure all the needed info was passed along with the
original notifications.
bug: 2173053
- Don't crash if the service's app process doesn't have a thread (this
can happen if we are currently starting the process and then try to
start the service again).
- Be more robust about deciding to start a service's process: try each
time it is started; the startProcess call will take care of ignoring
it if the process is already started.
- Fix some issues where we would leave dead processes on the low memory
list.
Change-Id: I490e01ba7b45adc191bab7ace377b6873e284897
Use ConnectivityManager.CONNECTIVITY_ACTION broadcast in LocationManagerService
to notify GPS when SUPL connection is ready instead of TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED,
which is not sent in all cases.
Expand LocationProvider.updateNetworkState() to include NetworkInfo object.
Fixes bug b/2155661
Change-Id: Iee227ace7d536b36cf7973e3e6a8b7a621ce6565
Signed-off-by: Mike Lockwood <lockwood@android.com>
In LocationManagerService if a LocationListener is removed while it has
a pending broadcast the wake lock held while pending broadcasts are
outstanding do not get cleared properly.
There are 2 cases of this race that are fixed:
1. locationCallbackFinished was changed to check the mReceivers HashMap
directly instead of calling getReceiver. getReceiver would add the
ILocationListener as a new Receiver if it did not exist which caused
a receiver that was removed when it still had a broadcast pending to
be added back in a bad state when the pending broadcast completed.
2. removeUpdatesLocked was changed to decrement the pending broadcasts
when a Receiver is removed that has pending broadcasts.
Fixes bug b/2163871
Change-Id: I50a321c9b3359bf69845236dc4a4b9e38e847335
Signed-off-by: Mike Lockwood <lockwood@android.com>
There was another way we could ignore the application windows flags
while the lock screen was displayed. This is the infrastructure to
deal with that.
Change-Id: Id8c9cb2f7081df6757ccb797a7cde618e82f7b38
Merge commit '3161795b2353171bb0636fb3ea6dab7dec80a4f4' into eclair
* commit '3161795b2353171bb0636fb3ea6dab7dec80a4f4':
when logging free space on /data, log /system and /cache as well
This is the main entry point to the Bluetooth APIs, and returns the default
local Bluetooth adapter.
It replaces context.getSystemService(Context.BLUETOOTH_SERVICE). This was
never in a public SDK release.
DrNo: eastham
Bug: 2158765
Joke: Why can't you play cards in the jungle? Because there's too many cheetas!
Change-Id: Ieed8be009ee5aba621cb69090ee8c8a9c19c840d
Don't hold a lock when the activity thread is telling the activity manager
to release a provider.
This requires that the activity manager now keep a reference count on the
providers, because without the lock it is possible for activity thread to
call in to request the provider again before it has finished telling
about the release.
Change-Id: I5f912903891f4edae85e28819d4e6f14b8f2e688
Tell the broadcast receiver whether it is getting an initial sticky value,
so it will be quiet about attempts to do ordered broadcast stuff.
Note that the original bug being reported was not actually a crash, just
an error log. So all we are doing here is making the log quieter.
Change-Id: Iaf1b718d82093ec1197142410a64feff47eb3859
There was a bug with the starting window where it could be added to
the app window list twice, so the buddy list would end up with one
left over after all was done. This would result in visibility
changes not being delivered to it correctly, delaying the dispatch
of onStop.
Change-Id: If1993eaf9cfbba1f523ce5aaa478be0239d0c7db
We now just don't send out dock broadcasts/launches when the
device is not provisioned. Good enough for our purposes.
Change-Id: Iee6384121675e0e9854745ec1168245e8a23a241
Windows with a negative Y position can end up in createSurfaceLocked()
with mFrame containing a negative height, causing SurfaceFlinger to go
crazy when asked to create the surface. This change simply guards
against such a situation by instead asking for a 1x1 surface and relying
or later layout operations to resize the window to the appropriate size.
Change-Id: I66f2058f4cd1cf069b12d3d23e6fd340dc76b74e
(when booted while docked)
This isn't really a fix, but we now have the activity report the configuration
it actually launched in, so the activity manager will later adjust it if
needed. Should help us recover from hitting the race in this particular case.
Change-Id: I3bb83a48c2d692b4cb1822d8ae7d924cfa9187b2
The core logging in BackupManagerService and in the Google backup transport are
still enabled at this point.
Change-Id: I10abfa565bbd1097dd3631051b6aca163e4af33a
Stop using SIM card icons for USB notifications
Fixes b/1700510
Change-Id: Ic7e251a7ecad3ed46044181eae41481791df85bd
Signed-off-by: Mike Lockwood <lockwood@android.com>
If not these system services will end up with inconsistent settings files
when the device runs out of storage.
Delete mangled settings file in PackageManager if the current write fails
so that we don't end up overwriting the backed up version with the
mangled version
Include null check when retrieving fwd locked resource for an existing package
I think when we were scanning the updated app in the system image,
from an older version on the data partition, we were not setting
the existing package to have the system flag, so not auto-granting
any new permissions.
This also includes some other cleanup in the package manager to
remove old files in various places, and tighten up logging.
Also similar logging cleanup elsewhere.
Change-Id: I6d113c7cf7e736ab9be512d6d7c94c806a24199a
* changes:
Only re-initialize backup state if @pm@ metadata is missing, to defensively work around a still-mysterious bug where the list of saved packages ends up being empty even though we still have state pending. If we do re-initialize, then wipe all state to make sure the right thing happens.
to defensively work around a still-mysterious bug where the
list of saved packages ends up being empty even though we still
have state pending. If we do re-initialize, then wipe all state
to make sure the right thing happens.
Don't keep open journal files -- close them after every update.
A bit less efficient, but possibly more reliable (again, this is
defensive programming here). Also change "rwd" to "rws" mode
for fully synchronous operation.
* changes:
- make SyncManager get the accounts list during the constructor, which will allow syncs to be scheduled during bootup. The providers need this so that they can potentially schedule syncs while they are starting up. - make the SyncManager message handler wait until boot has completed to start dispatching messages
which will allow syncs to be scheduled during bootup. The
providers need this so that they can potentially schedule
syncs while they are starting up.
- make the SyncManager message handler wait until boot
has completed to start dispatching messages
We already had a delay if we were associated, but we have some race conditions
we think will be masked if we delay the driver stop for the other cases
too. Don't wait as long (2 min instead of 15).
bug: 2147260
on success, record "backup_initialize" event; on failure,
record "backup_transport_failure" event (and add tags to
"backup_transport_failure" events that aren't associated
with a particular package -- namely "(initialize)" and
"(finish)").
Track requests independently with seperate timers. Clean up on expiration
by just stopping that particular request, not immediately restoring the default.
bug: 2127590
Now that we can have a non-app-window cross-wallpaper animation,
we need to make sure to not access a null app token.
Change-Id: Ia00debd4b2b431d15bd074927a9035e1bc0a6445
The APIs for checking whether keys are held down now also look
at virtual keys.
However it turns out there is less than a second between the time we
start the input thread and check for safe mode, so there is not enough
time to actually open all of the devices and get the data from them
about the finger being down to determine if a virtual key is down.
So now you can also hold DPAD center, trackball center, or s to
enter safe mode. Also give some vibrator feedback.
Change-Id: I55edce63bc0c375813bd3751766b8070beeb0153