9395 Commits

Author SHA1 Message Date
Svetoslav Ganov
e45c0b230b Crash in the touch explorer.
1. The touch explorer was notified for accessibility events from
   a binder thread which was poking the internal state of the
   latter which by design is not tread safe. Since the touch
   explorer is expected to be running only on the main thread
   the accessibility manager service delivers the accessibility
   events to the explorer on that thread.

bug:6635496

Change-Id: Ifdc5329e4be8e485d7f77f0fb472184494fa0d15
2012-06-08 17:49:52 -07:00
Svetoslav Ganov
ee33ad24cd Settings crash after enabling TalkBack accessibility.
1. AccessibilityInput filter was not checking whether the touch
   explorer instance is not null before passing it an accessibility
   event. If the accessibility event is dispatched before the input
   filter is installed but after it is created we runt into this
   case.

2. Added a missing null check in accessibility node info.

bug:6635089

Change-Id: Ia389dc1f427427eb73794f6331ccb870e0b44c55
2012-06-08 16:09:36 -07:00
Craig Mautner
78fc35bde4 Merge "Hide wallpaper when wallpaper target gets hidden." into jb-dev 2012-06-08 13:14:54 -07:00
Chia-chi Yeh
dadc857d9d VPN: move VpnDialogs away from system uid.
Bug: 6632536
Change-Id: Iece647c077caf5298ccfe7d7aba5f0911a4ed0d1
2012-06-08 13:05:58 -07:00
Craig Mautner
ff92f04e76 Hide wallpaper when wallpaper target gets hidden.
Another location that potentially hides the wallpaper target while
leaving the wallpaper itself still visible. Causes the wallpaper to
show up when upper surfaces are transparent all the way down.

Fixes bug b6621986.

Change-Id: If75053160f041eb78868eda36b7820fb2110d069
2012-06-08 12:56:14 -07:00
Craig Mautner
7f786b8fa2 Merge "Do not animate keyboard and button brightness." into jb-dev 2012-06-08 12:48:19 -07:00
Craig Mautner
fab75dc830 Merge "Turn off dimming immediately for removed windows." into jb-dev 2012-06-08 11:36:36 -07:00
Dianne Hackborn
0876ab0ac1 Merge "Fix issue #6295373: "Package com.google.android.apps.authenticator2 has..." into jb-dev 2012-06-08 11:01:42 -07:00
Craig Mautner
236a35b77a Turn off dimming immediately for removed windows.
Dimming was only turning off immediately for app-animated windows.
For removed windows dimming wouldn't turn off until the window was
completely gone.

Fixes bug 6628057.

Change-Id: I3ba6501b10a31b6f8c91012e17ad8734a84050c4
2012-06-08 09:54:59 -07:00
Craig Mautner
291576ec6f Do not animate keyboard and button brightness.
Keyboard and button brightness are always set to assign values
immediately but were being passed through the animation process
anyways. This interfered with the state of the screen brightness
animation. Intercept keyboard and button brightness directives and
implement them immediately.

Also use actual screen brightness and value to determine when we
are dimming or brightening. Previously we were using the sensor
values to determine whether the action called for was to brighten or
dim. This looks at the actual screen brightness level to make that
determination. If the two values get out of sync it is better to rely
on the screen value than the sensor value.

Fixes bug 6626681.

Change-Id: I82158f5188ffb739e01f818ba88e79f03a405c58
2012-06-08 09:22:36 -07:00
Kenny Root
f27f2f8f71 Merge "Delete old forward-locked apps on upgrade" into jb-dev 2012-06-08 09:16:40 -07:00
Svetoslav Ganov
75fb3e7ac2 Merge "Cannot click on the last touch explored auto-completion item." into jb-dev 2012-06-07 19:52:19 -07:00
Dianne Hackborn
d0c5f515c0 Fix issue #6295373: "Package com.google.android.apps.authenticator2 has...
...mismatched uid: X on disk, Y in settings" errors on Froyo and Gingerbread

Deal more gracefully with the uid changing in three ways:

1. If the uid on disk has become root, then have installd change it to
   the application's uid.  This is to correct a potential case where
   installd was interrupted while linking or unlinking the libs dir,
   during which it temporarily changes the owner of the dir to root
   so that a malicious app can not get in its way.  So if the uid on
   disk has become root, we assume we can safely just change it back
   to the correct uid.

2. When scaning packages at boot, use the same "delete and rebuild data
   directory" code for third party applications as we have for system
   applications.  This allows us to at least end up in a state where the
   app will run, even if its data is lost.

3. But we really don't want to get in to case 2, so if an application
   update is being installed and we find that the uid we now have for
   the app is different than the one on disk, fail the update.  This will
   protect against for example a developer changing the sharedUserId of
   their app and getting into this bad state.

Bug: 6295373
Change-Id: Ic802fdd818ac62449ff3c61d1fff1aa4d4942f39
2012-06-07 16:57:57 -07:00
Svetoslav Ganov
385d9f24b5 Cannot click on the last touch explored auto-completion item.
1. When typing into an auto completion edit field a list of completions pops up and if
   the user touch explores the list and tries to double tap to select the touched
   completion the latter is not selected.

   The auto completion is a popup that does not take input focus and is overlaid on
   top of the window that has input focus. The touch explorer was clicking on the
   location of the accessibility focus if the last touch explored location is within
   the bounds of the active window. In this case this was the window with the edit
   text into which the user is typing. The check performed by the touch explorer
   was missing the case when the last touch explored location was within the bounds
   of the active window but it actually was deloverd to another overlaid window.
   Now we are poking on the accessibility focus location if the last explored
   location is within the active window and was delivered to it.

bug:6629535

Change-Id: Ie66d5bb81ab021f2bb0414339b7de26d96826191
2012-06-07 16:35:11 -07:00
Kenny Root
87353093ef Merge "Measure ASECs for forward-locked apps" into jb-dev 2012-06-07 15:40:54 -07:00
Kenny Root
906272b977 Merge "Only call fixSdPermissions when appropriate" into jb-dev 2012-06-07 14:21:14 -07:00
Kenny Root
2afded11aa Measure ASECs for forward-locked apps
Forward-locked apps are mostly in ASEC containers now, so the
containers need to be measured as well.

Bug: 6606390
Change-Id: I69e9fe47aabe1e130568779a45fe8000b3ce9d4c
2012-06-07 13:23:10 -07:00
Kenny Root
c7a8999a52 Only call fixSdPermissions when appropriate
When media packages were loaded, they would lose their forward-locked
status since the flags covering it was not available when the
doPostInstall step was called.

Bug: 6611980
Change-Id: I807fcec6b61cedf7654808b704fba7de9c7c1922
2012-06-07 12:50:15 -07:00
Svetoslav Ganov
86783474fd Cannot interact with dialogs when IME is up and on not touch explored popups.
1. If the last touch explored location is within the active window we
   used to click on exact location if it is within the accessibility
   focus otherwise in the accessibility focus center. If the last touch
   explored location is not within the active window we used to just
   click there. This breaks in the case were one has touch explored
   at a given place in the current window and now a dialog opens *not*
   covering the touch explored location. If one uses swipes to move
   accessibility focus i.e. to traverse the dialog without touching
   it one cannot activate anything because the touch explorer is using
   the last touch explored location that is outside of the active
   window e.g the dialog.

   The solution is to clear the last touch explored location when a
   window opens or accessibility focus moves. If the last touch
   explored location is null we are clicking in the accessibility
   focus location.

bug:6620911

2. There is a bug in the window manager that does not notify a
   window that its location has changed (bug:6623031). This breaks
   accessibility interaction with dialogs that have input because
   when the IME is up the dialog is moved but not notified. Now
   the accessibility layer gets incorrect location for the
   accessibility focus and the window bounds.

   The soluion is when the accessibility manager service calls
   into the remove thress to obtain some accessibility node infos
   it passes the window left and top which it gets from the
   window manager. These values are used to update the attach info
   window left and top so all accessibility node infos emitted
   from that window had correct bounds in screen coordinates.

bug:6620796

Change-Id: I18914f2095c55cfc826acf5277bd94b776bda0c8
2012-06-07 12:02:16 -07:00
Kenny Root
84e35eadfb Delete old forward-locked apps on upgrade
The old style forward-locked apps were in a directory called
/data/app-private but the new style forward-locked apps are in ASEC
containers. This made the upgrade path confused and it wouldn't
correctly generate the InstallArgs to delete the old file.

Bug: 6619438
Change-Id: If4323fa8701d9fc653998f5db58670b4124b9e87
2012-06-06 16:06:21 -07:00
Craig Mautner
a9144ffd64 Merge "Disable automatic screen dimming." into jb-dev 2012-06-06 15:24:36 -07:00
Craig Mautner
a4e96d5a6e Disable automatic screen dimming.
Done by setting the dimming period to Integer.MAX_VALUE. While it
doesn't technically disable dimming it will take 248 days to get to
any target value.

Fixes bug 6616423.

Change-Id: I5b753286b9d93664fbff79021be38adf4d8a007d
2012-06-06 14:49:44 -07:00
Craig Mautner
3793368f72 Set screen brightness to match sensor at power on.
Use the first sensor value received after screen on to set the screen
brightness. Do this setting immediately rather than animate to the
target brightness.

Fixes bug 6612418.

Change-Id: I6c24c55e0bd35ef58a6494d3b5e449954241fd00
2012-06-06 14:13:39 -07:00
Dianne Hackborn
1e1228505d Merge "Fix issue #6609383: java.lang.SecurityException: Requires..." into jb-dev 2012-06-05 18:01:29 -07:00
Dianne Hackborn
bd145dbfd7 Fix issue #6609383: java.lang.SecurityException: Requires...
...MANAGE_APP_TOKENS permission

Bug: 6609383
Change-Id: I5ce8ac1ec496af50477111b46e6daea81181e3ca
2012-06-05 16:20:46 -07:00
Svetoslav Ganov
cab5b8a91d Merge "Nodes with contentDescription should always be important for accessibility." into jb-dev 2012-06-05 15:55:42 -07:00
Svetoslav Ganov
e47957a0bb Nodes with contentDescription should always be important for accessibility.
1. Now after setting the content description on a view we mark is as
   important for accessibility of the current important for accessibility
   mode of that view is auto.

2. Minor tweak to a touch explorer coefficient to make performing double
   tapping easier.

bug:6615353

Change-Id: I3b477f533a3ebde85d425caf32ace5e851240f88
2012-06-05 14:48:58 -07:00
Craig Mautner
35b691f056 Merge "Eliminate wallpaper exposure during transition." into jb-dev 2012-06-05 13:40:14 -07:00
Craig Mautner
ad5725d798 Eliminate wallpaper exposure during transition.
Make sure that the wallpaper target exists and is visible before
exposing the wallpaper.

Fixes bug 6570335.

Change-Id: I1dddfe26683e84fd813e7bee884ba2bd4bb85272
2012-06-05 10:20:56 -07:00
Svetoslav Ganov
ccf97dc1af Merge "Global accessibility action to open recent apps shows the old dialog style." into jb-dev 2012-06-04 23:06:42 -07:00
Irfan Sheriff
5751f816f0 Merge "Add contentobserver for nsd_on setting" into jb-dev 2012-06-04 22:53:00 -07:00
Irfan Sheriff
919aca5663 Add contentobserver for nsd_on setting
Bug: 6606274
Change-Id: I863b9e2a2446d697f3c9c49f24dcdc2b599f091e
2012-06-04 15:54:30 -07:00
Svetoslav Ganov
c682fc965d Global accessibility action to open recent apps shows the old dialog style.
1. The global action to open recent apps shows the old dialog style rent apps
   panel. Apparently the key code to open recent apps is not opening the new
   UI so the AccessibilityManagerService is calling directly the method on
   the IStatusBarSerivce to do so.

bug:6607664

Change-Id: I94c1963b07947776bf1c2448903b26f3603f9a59
2012-06-04 14:06:45 -07:00
Daniel Sandler
ab886f588d Don't do closing animation on an opening app.
Check to make sure that the closing wallpaper animation isn't used on
an opening app token. This can happen when a previous animation hasn't
completed when the next animation is starting.

Fixes bug 6557751.

Change-Id: Ib8bd4dd7de1e361f6fc0cab11d0997e70f9ddd0b
2012-06-04 13:57:49 -07:00
Dianne Hackborn
6593be0c20 Merge "Work on issue #6579997: Mariner entrance animation" into jb-dev 2012-06-04 10:29:32 -07:00
Svetoslav Ganov
cc822a769e Merge "Touch exploration gesture end not delivered to clients." into jb-dev 2012-06-03 20:30:12 -07:00
Svetoslav Ganov
cd94caf2bb Touch exploration gesture end not delivered to clients.
1. Touch exploration gestures are demarcated by start and end
   events. Due to a bug in the AccessibilityManagerService
   the gesture end event was not dispatched. This caused the
   AccessibilityNodeInfoCache to be off sync since it relies
   on getting such events not to mention that the clients were
   not getting the end but only the start event. The issue
   was that the notified service types variable was not reset
   after every event so when the manager sends the last hover
   exit it flags that the service type is already notified
   resulting in dropping on the floor the following gesture
   end event.

bug:6539306

Change-Id: I2b96bcecea3b2240199d67f01afa6a033afce1de
2012-06-03 19:34:38 -07:00
Svetoslav Ganov
778fa81f5d Merge "Fixing a crash in the TouchExplorer." into jb-dev 2012-06-03 12:38:57 -07:00
Craig Mautner
da652f6e51 Merge "Revert change to correct animations." into jb-dev 2012-06-03 00:57:23 -07:00
Svetoslav Ganov
ebac1b79c4 Fixing a crash in the TouchExplorer.
1. If the runnable for performing a long press is not
   removed when all pointers are up and it is executed
   the explorer gets into delegating mode with no pointer
   down and the next down crashes the explorer. Added
   code to remove the long press runnable in a few places
   it was missing and also added a safety in the runnable
   to avoid executing it in case there are no active pointers.

bug:6557183

Change-Id: I9dab3de88fd08d8e2b38af18249ac551837c0736
2012-06-02 16:26:59 -07:00
Craig Mautner
3aa7fcac1c Revert change to correct animations.
Incorrect animation was introduced with CL 196207 (perhaps in
combination with a later CL). Reverting part of that CL fixes
the incorrect animation and so far has not reintroduced the jank
that was fixed by that CL. If the jank reappears it should be
fixed in a different fashion than in CL 196207.

Fixes bug 6597505.

Change-Id: Ie8012237a8d49810ede51bd8d78ef8c2fd91ddd4
2012-06-02 15:31:33 -07:00
Craig Mautner
d672b241f6 Merge "Fix power manager issues." into jb-dev 2012-06-02 11:24:29 -07:00
Dianne Hackborn
84375876fc Work on issue #6579997: Mariner entrance animation
Add a new variation of ActivityOptions that allows you to
supply custom animation resources and get a callback when the
animation starts.

Use this in SearchPanelView to determine when to start hiding
the search panel instead of having a fixed delay.

Fix some issues in the activity manager where we would cancel
the options in cases where we should actually keep them to give
to the window manager for a transition.  (Basically when the
activity being started is not actually ending up launched, but
just results in a shift in the activity stack.)

Note that this is not quite what the design calls for -- the
entire search UI is waiting and then disappearing when the
animation starts, instead of the ring first disappearing while
waiting for the time to fade out the circle.

Change-Id: Iee9a404ba530908d73cdbd4a9d0d2907ac03428f
2012-06-01 19:13:55 -07:00
Craig Mautner
d29568cf5f Fix power manager issues.
1. If a new brightness animation is started while an unrelated one is
ongoing complete the old animation immediately. Unrelated means that
the old and new animations apply to different devices (button,
keyboard, or screen).

2. Do not interpret turning off the keyboard or button lights as
turning off the screen in isScreenTurningOffLocked().

Fixes bug 6519847.

Change-Id: I53a20951036bcdb793daeff84a9ebeed44be01fc
2012-06-01 16:02:47 -07:00
Daniel Sandler
01827ce9f2 Merge "Be more discriminating when canceling notifications on changing packages." into jb-dev 2012-06-01 14:31:05 -07:00
Svetoslav Ganov
6acca24425 Merge "Cannot double tap and hold outside of the input focused window." into jb-dev 2012-06-01 14:19:05 -07:00
Svetoslav Ganov
238099c0db Cannot double tap and hold outside of the input focused window.
1. The long press routine was using the coordintates of the
   accessibility focused item in the input focused window.
   As a result double tap and hold did not work in a window
   that does not take input focus such as the system bar.
   Now the routine is using the last touch explored location
   if it cannot find accessibility focus in the last touched
   window.

bug:6584438

Change-Id: Ifd43adb20a066f389a9d4bd5716dd7ad834dd574
2012-06-01 13:59:28 -07:00
Daniel Sandler
26ece57dad Be more discriminating when canceling notifications on changing packages.
Specifically: don't do it if the package is enabled at the
time the PACKAGE_CHANGED broadcast is sent. (We only want to
cancel notifications when packages enter the disabled
state.)

Bug: 6589355
Change-Id: Iba754cef27e2bdff35a13e403a867933c996f562
2012-06-01 16:26:46 -04:00
Jeff Brown
40ba4dad4c Merge "Add a thread to handle the radio shutdown." into jb-dev 2012-06-01 12:47:07 -07:00
Dianne Hackborn
a93c2c117d Extend process observer to be usable for media routing.
It now has a new callback to report changes in the "importance"
of processes.  Rewrote the dispatching code to be a bit more
efficient now that we are sending more reports.

Change-Id: Ie865cfd286455819f04e8c14e9b6fd54d028f8f2
2012-05-31 18:58:34 -07:00