1. Now we are asking the user to grant permission to the service to enable
touch exploration only the first time this service is enabled. If the
service was uninstalled and then later installed we ask the user again.
This avoids the scenario in which rebooting the device or upgrading an
accessibility service leaves the device in a state in which the user
cannot interact with.
bug:6582088
Change-Id: I51d24e4892b3b48c9fb11dfb09ec1118502ba526
For help in tracking down memory use issues, seeing how long
a connection has been held that is keeping other processes around.
Let's call this for issue #6577613: Unbelievably sluggish nexus-S
Change-Id: Ia3d016c5ed9d2155eea18ec884047e1e1d8a0ad5
AudioService is currently notified of wired headset and A2DP
sink connection states via broadcast intents from WiredAccessoryObserver
and BluetoothA2dpService. This is a problem as there is no guaranty that
AudioService can take actions upon the change before other apps are notified.
For instance, the Play On feature requires the UI to be refreshed when a device
is inserted/removed and we must guaranty that the UI component can read
new A2DP enable state from AudioManager after it receives a device connection state
change intent.
- Added hidden methods to AudioManager so that WiredAccessoryObserver
and BluetoothA2dpService can notify AudioService of device connection directly.
- The wired accessories connection intents are now sent by AudioService.
- The A2DP state change intent is delayed by BluetoothA2DPService when
ACTION_AUDIO_BECOMING_NOISY is sent by AudioService
- ACTION_AUDIO_BECOMING_NOISY intent is not sent when disconnecting A2DP
while a wired headset is present and vice versa.
Bug 6485897.
Change-Id: Ie160b3ee5f451132065530772b868593c90afd94
Revert to pre-dreams behavior. DeskClock once again launches the correct
activity (instead of Screensaver) when desk-dock is attached.
Bug: 6559590
Change-Id: I32a03a25469f17b5e87e16831839ec757d56c90b
...content provider and updating its oom adj
This introduces the concept of an "unstable" reference on a content
provider. When holding such a reference (and no normal stable ref),
the content provider dying will not cause the client process to be
killed.
This is used in ContentResolver.query(), .openAssetFileDescriptor(),
and .openTypedAssetFileDescriptor() to first access the provider
with an unstable reference, and if at the point of calling into the
provider we find it is dead then acquiring a new stable reference
and doing the operation again. Thus if the provider process dies
at any point until we get the result back, our own process will not
be killed and we can safely retry the operation.
Arguably there is still the potential for a race -- if somehow the
provider is killed way late by the OOM killer after the query or
open has returned -- but this should now be *extremely* unlikely.
We also continue to have the issue with the other calls, but these
are much less critical, and the same model can't be used there (we
wouldn't want to execute two insert operations for example).
The implementation of this required some significant changes to the
underlying plumbing of content providers, now keeping track of the
two different reference counts, and managing them appropriately. To
facilitate this, the activity manager now has a formal connection
object for a client reference on a content provider, which hands to
the application when opening the provider.
These changes have allowed a lot of the code to be cleaned up and
subtle issues closed. For example, when a process is crashing, we
now have a much better idea of the state of content provider clients
(olding a stable ref, unstable ref, or waiting for it to launch), so
that we can correctly handle each of these.
The client side code is also a fair amount cleaner, though in the
future there is more than should be done. In particular, the two
ProviderClientRecord and ProviderRefCount classes should be combined
into one, part of which is exposed to the ContentResolver internal
API as a reference on a content provider with methods for updating
reference counts and such. Some day we'll do that.
Change-Id: I87b10d1b67573ab899e09ca428f1b556fd669c8c
When we are in the middle of an app transition and need to change to a
new one we were not ending the old one in a clean state. Also,
wallpapers were defaulting to the wrong animation in certain
situations.
Remove ':' style iterators.
Fixes bug 6486708.
Change-Id: Ied17e8410486020295db380ff68df5dad08bc5cc
ActivityStack sets the mNextAppTransition value before moving the apps
to their proper position. This makes the test for mNextAppTransition
being TRANSITION_UNSET incorrect. Better to just look for animating.
Fixes bug 6565418.
Change-Id: I4651b7d3678e46fc712a8e901992fb01b94c415e
Use config_netowrkLocationProviderPackageName and
config_geocodeProviderPackageName as intial packages. If another
package exists (or is later installed) that also implements a
provider, and has the same signatures as the original providers,
and has a hgiher version number, then use that instead.
The old code used a funky fix of package name substring checks
and service checks that was broken and not upgradeable.
Bug: 6499445
Change-Id: Ic58f09cf85d31d9abf47707093e22f31dda25cf0
Prevents ANR on hover or scroll events.
Prevents ANR in the case where one finger touches a window which
is subsequently removed then a second finger comes along and tries
to touch something.
Change-Id: I985ccb70cd86659992328f14f8a705f3f05ea2e5
Send a message to all windows to redraw before notifying
PhoneWindowManager of screen on. This minimizes the delay in
screen update that causes the keyguard clock to display the old time
before displaying the current time.
Fixes bug 6381021.
Change-Id: Ida7071e7dac2284540f101c5d004511b52133b91
Logging exec time on startUsingNetworkFeature as we've had some reports suggesting it's
causing ANRs.
Remove some logging from NDC so it's local log is more useful.
bug:6492166
Change-Id: I258ff6c59bff2c65935242d50496d84720c5d493
Stop trying to keep track of the AppTokens that have been moved
to the top and bottom and then try and match the WindowStates when
transitions are goodToGo. Instead rebuild the WindowState order based
on the AppToken order when we are goodToGo.
When moving AppWindowTokens lower in mAppTokens create a new ArrayList
of AppWindowTokens to keep track of the apps in Z order while
animating.
Fixes bug 6481078.
Change-Id: I29b33a507b45752f15feb10a9f4b47a3f5eb9f0e
Do not create a StartingWindow for apps that show wallpaper.
Fix handling of obscure case where found wallpaper is hidden.
Fixes bug 6484034.
Change-Id: I07181c4aea56fa9e530df0c95d886fe8ad61ec9d
- use an ID instead of a String for StorageVolume description
- use this ID for getting the correct localized version of the description string
Change-Id: I30f3080fce2c889be38bfdf9f5121dffcf8a99e8
1. If a UI test automation accessibility service is connected to the
system we pospone state updates in the AccessibilityManagerService
for the moment the UI automations service dies or is disconnected.
bug:6540522
Change-Id: I48ddf603b53d2158a00edcf8ad05cfe2575d4d75
1. We are passing the interrogating process id in the remote
accessibility requests to catch the query from the same
thread. While all other methods were doing this correctly
somehow the perform action is using the incorrect process id.
bug:6534935
Change-Id: Icef50833903c562758d51ef316b60c53c7a336c0
Previous auto brightness policy was to only ratchet screen brightness
up and never return to dim levels until the device was turned off. This
caused the screen to be very bright in dim areas and reduced battery
life. This change allows the screen to dim down over the course of
a minute to the desired brightness level.
Fixes bug 6422464.
Change-Id: I5592c06a495650c6496ec2fc9846d7a10fac4b16
We should tell the app that it is inactive, before unbinding.
Otherwise when it is told to unbind it will see that it is still
supposed to be active and immediately re-bind.
Also change the calls to set the active state to go through the
message dispatch path, to ensure ordering is correct.
Change-Id: I246241eac8f7521f42c4c1eee7f46097337e7303
By moving the StrictModeViolation display onto the WindowManager
Handler we avoid potential deadlocks as found in the bug below.
Fixes bug 6537798.
Change-Id: Ia46a43d1f7f6e55256f770b9e196602092669b49
The problem was that when dismissing the lock screen, the window manager
would briefly turn off force hiding when it started animating the transition
and then turn it back on until the transition was done.
This would cause it to briefly switch focus to the app behind and then
take focus off it. The app would find out it got focus, and re-start
input on itself, asking the input method service to do so. At this
point the input method service would ask the window manager if the
caller really had focus, and it may or may not be told no depending
on the timing. If it is told no, then it doesn't allow the focus
switch to happen at that point, ignoring the new input connection,
and ultimately when focus does really switch the IME is left talking
with an old dead input connection.
I added some code to the input connection to make sure when we are
no longer using one that we mark it inactive and can't use it. This
bug was especially difficult to track down because it would only
visibly break when a GC happened during this time, causing the weak
reference on the input connection to become null. With this change
it will now always break (though in the scenario here only if you
hit the race condition correctly).
Change-Id: I81a6164dc140c548da1a9736e42cd253e8238a80
1. The internal service instance created by AccessibilityManagerService
was getting the looper of the current thread when created. This works
for real accessibility services but since UI automation service is
registered via an IPC the binder thread has no looper. Now we explicitly
get the correct looper.
bug:6535435
Change-Id: I63a2ada1b65c4b3c71c3d1e6deb3dfdeb7a3d6d6