11144 Commits

Author SHA1 Message Date
Jeff Brown
074b8b7cf1 Eliminate potential reentrance from unregisterInputChannel.
Ensure that all callbacks into the window manager policy occur
on the input dispatcher thread in the right place.  This fixes
a potential deadlock that may occur if the window manager
unregisters an input channel while holding its own lock.

The change is simply to defer running asynchronous commands
(usually callbacks into the policy) until the next iteration
of the dispatch looper thread.

Bug: 7382388
Change-Id: I90095580d717fcddb2209ef332df56400f837a34
2012-10-31 19:01:31 -07:00
Svetoslav Ganov
c4842c1193 Accessibility support for the lockscreen - phone.
Change-Id: Idc99f1322a1d635dd07e1f5efa1665a4676267c2
2012-10-31 17:49:10 -07:00
Adam Cohen
8f697d8580 Stripping dead API related to keyguard widgets
Change-Id: Ieb6c57ef736712b3266de08027f9626104cdf1bb
2012-10-31 17:42:26 -07:00
Chet Haase
fe28ff0d06 Merge "Fix for regression in WindowManager orientation changes" into jb-mr1-dev 2012-10-31 16:49:12 -07:00
Chet Haase
d5d11af3d3 Fix for regression in WindowManager orientation changes
A fix yesterday for #7428221 caused a regression where new orientations would
sometimes cause a flash through black on the way to seeing the real static wallpaper.
There is a fundamental problem in WindowManagerService where we show a window before
it has all of the layout/sizing information it needs, which is the cause of the black
flash. The regression yesterday was that we are now less aggressive about layout out
hidden windows, so we won't layout the window until after the window is shown with the
incorrect sizing info.

The fix/workaround is to back off the layout logic specifically for the wallpaper,
ensuring that we will lay it out on orientation changes, even when hidden. This means that
when we finally do show it, it will already have been drawn in the correct orientation/size.

Issue #7444971 Home jank regression

Change-Id: Ib20fdabc43ece9720b261bf04b272c5511e2d902
2012-10-31 15:40:54 -07:00
Amith Yamasani
03f7ebfeaa Merge "Relax permission requirements for posting notifications across users" into jb-mr1-dev 2012-10-31 13:06:56 -07:00
Chet Haase
27f752eb1d Merge "WindowManager shouldn't layout non-visible windows" into jb-mr1-dev 2012-10-30 17:42:43 -07:00
Amith Yamasani
a07d047f34 Merge "Don't clean up wallpaper map entry when stopping a user." into jb-mr1-dev 2012-10-30 17:40:13 -07:00
Chet Haase
9cceae9a5f WindowManager shouldn't layout non-visible windows
A recent change in WindowManager made background windows perform layout
(when they should really be left alone). This resulted in artifacts
where rotating the device and then going to a backgrojnd activity (launcher,
Recents) would briefly show that activity in the wrong size/orientation, then
flash to the correct one after a proper layout.

This fix is a simple workaround, leaving in the original fix that the code
change addressed (for keyguard orientation changes), while going back to the
previous (don't layout gone windows) for all other cases.

Issue #7428221 sometimes recents is drawn off-center and then fixes itself

Change-Id: I41b47933c2bd86f29133853d3387bb7294be8f48
2012-10-30 16:35:45 -07:00
Amith Yamasani
2c7ebeae9f Relax permission requirements for posting notifications across users
Bug: 7430689
Change-Id: I2430b20137705ed2d6dc0f870690acda0662392b
2012-10-30 16:12:54 -07:00
Amith Yamasani
0c29371712 Don't clean up wallpaper map entry when stopping a user.
Sometimes on quickly stopping and starting a user, a race condition
causes the user entry to disappear, causing crashes in Launcher and
SystemUI. Removing this step, since it doesn't really leave much
residue behind.

Bug: 7434849
Change-Id: Ia188602f1a79f75d307397459c2a03fadee4c722
2012-10-30 12:23:52 -07:00
Craig Mautner
ad09bccfe4 Bring up unlock screen for FLAG_DISMISS_KEYGUARD.
Widgets that did not launch Activitys would not display the unlock
screens when they were tapped. Now any window that is shown with
FLAG_DISMISS_KEYGUARD set while the keyguard is locked will
cause the unlock screen to be displayed.

Bug: 7301530 fixed.
Change-Id: I90d11b52d2b63260bdb5f2b6eb7e98eb7a4d9331
2012-10-30 12:08:22 -07:00
Dianne Hackborn
44251a70ed Merge "Work on issue #7343200: Fails to show wallpaper in the background..." into jb-mr1-dev 2012-10-30 10:45:49 -07:00
Dianne Hackborn
ef03a7f441 Work on issue #7343200: Fails to show wallpaper in the background...
...for lockscreen sometimes and remains black / blank

Add some debug output to try to track down what is going on.

Change-Id: I98a96c5da9c04b988e948f6fc2766d927db49ebf
2012-10-29 18:46:52 -07:00
Kenny Root
ca60ba1874 Merge "Move app-lib definition up for system app scanning" into jb-mr1-dev 2012-10-29 17:14:51 -07:00
Amith Yamasani
7c258505ec Merge "Fix for some downloaded apps showing up on all users" into jb-mr1-dev 2012-10-29 14:57:53 -07:00
Kenny Root
584c4cdbf3 Move app-lib definition up for system app scanning
System apps were getting the wrong path because app-lib directory was
defined after the scanning of packages.

Bug: 7425516
Change-Id: I7a7a6b2a74f846c84516440ee950099bdc564d0b
2012-10-29 10:46:42 -07:00
Victoria Lease
269518e83e Revert "make FLP play nicely with multiuser"
This reverts commit e5601ce9bfa4effbddb84186f0fe1bfe4ad50301

Change-Id: Icd12f2d2c18f2eeeb2c367a885fb6d170ce426ae
2012-10-29 08:26:54 -07:00
Jeff Brown
99e88721a8 Merge "Don't scale screen brightness by electron beam level." into jb-mr1-dev 2012-10-28 17:01:38 -07:00
Jeff Brown
356bd4cf2c Don't scale screen brightness by electron beam level.
This change removes the modulation of the screen brightness
by the electron beam level.  The screen brightness remains
constant while the electron beam animation is playing.

Previously we were multiplying the screen brightness by the
electron beam level so as to animate both at the same time.
The problem is that when the screen brightness is already dim
to begin with, it may not be possible to see the electron beam
animation because the modulated screen brightness rapidly
converges on 0.  This may manifest give the appearance of
an abrupt transition or a flash as the screen turns off.

Bug: 7387800
Change-Id: I27b90f0098bbdc3de1d66fad819548d1301405cd
2012-10-26 18:44:51 -07:00
Victoria Lease
319c7e8501 Merge "make FLP play nicely with multiuser" into jb-mr1-dev 2012-10-26 17:32:02 -07:00
Amith Yamasani
f031f230f5 Fix for some downloaded apps showing up on all users
Bug: 7226656

In the case of packages with sharedUserId, the packages were inserted
into mPackages a little later. We were reading the package restrictions
before this happened and so the apps were being removed from the restricted
list, effectively setting installed=true.

Moved the block that reads the restrictions to after the processing of
mPendingPackages.

Also, don't setInstalled for all users in the pending packages processing.

Change-Id: I382787e45fecdb871d80ffb4d854782d8e32e4a7
2012-10-26 17:10:51 -07:00
Dianne Hackborn
8a6f6a8ca9 Merge "Fix issue #7419050: Time is not getting updated after launching Clock" into jb-mr1-dev 2012-10-26 16:18:30 -07:00
Amith Yamasani
084824548f Merge "Fix the user name for the owner." into jb-mr1-dev 2012-10-26 15:54:56 -07:00
Victoria Lease
e5601ce9bf make FLP play nicely with multiuser
Frameworks' FusedLocationProvider runs as a specific user so that it
can join a specific process. The solution that works for NLP, run one
copy per user as that user, does not work for FLP.

To make FLP play nicely with multiuser, I've allowed SYSTEM_UID to
operate in the background and included a hardcoded exception to
prevent ServiceWatcher from trying to launch one FLP per user.

Bug: 7279799
Change-Id: I573ea5226d8d00777421b39c5c3fb0899bf09b4d
2012-10-26 15:37:18 -07:00
Dianne Hackborn
db5aca9aa6 Fix issue #7419050: Time is not getting updated after launching Clock
Change-Id: Iaa8de2d3732bffd63fcd4fafba50955d1776611d
2012-10-26 13:39:41 -07:00
Amith Yamasani
6f34b41114 Fix the user name for the owner.
Use a version number to update the name to Owner, from Primary.
For new installations, use the correct localized string.

Bug: 7417150

Fix a typo in the permission description.

Bug: 7333304
Change-Id: I123741e581c6a02d4597b3cd81f2ca48a8587e2a
2012-10-26 10:06:22 -07:00
Jeff Brown
92130f6407 Add MediaRouter API to get presentation display.
This new API makes it possible for an application to ask on
which Display it should show a Presentation based on the currently
selected media route.

Also added a new API on DisplayManager to query displays that
support a certain category of uses.

Improved the documentation of the Presentation class to explain
how to choose an appropriate Display for presentation.

Bug: 7409073
Change-Id: Iab451215e570ae55f3718fc228303143c800fe51
2012-10-25 20:31:21 -07:00
Svetoslav Ganov
7fd9882ba3 Accessibility layer in inconsistent state after running UI test automation tests.
1. The accessibility layer has a back door for a UI test automation code running
   from the shell to attach. The unregister code does an incorrect identity check
   and as a result the register UI test automation service is not disconnected
   until its process is killed. The fix is super safe and simple.

bug:7409261

Change-Id: I4b1da18be6c5619dadd4a58fca6724529bc59dea
2012-10-25 09:41:11 -07:00
Jeff Brown
900e0ba516 Merge "Dim the screen quickly in response to user activity timeout." into jb-mr1-dev 2012-10-24 14:55:41 -07:00
Jeff Brown
5244c93176 Dim the screen quickly in response to user activity timeout.
Reverts a previous change that made the screen dim slowly instead.
The quick transition does a better job of attracting the user's
attention to the fact that the screen is about to turn off
unless the user touches the screen.

Bug: 7386034
Change-Id: I81e4d8939f6791b96352004984a9e5b2aab79788
2012-10-24 14:46:26 -07:00
Amith Yamasani
cd66855441 Merge "Fix a crash in InputMethodManagerService due to permission failure." into jb-mr1-dev 2012-10-24 13:30:01 -07:00
Christopher Tate
acf5943c44 Merge "Fix the Backup Manager's uninstall tracking" into jb-mr1-dev 2012-10-24 12:24:51 -07:00
Jeff Brown
1202c43685 Merge "Secure windows, secure surface views and secure displays." into jb-mr1-dev 2012-10-24 12:14:08 -07:00
Zhihai Xu
8e080d7e10 Merge "License of files Bluetooth package is not updated to ASL2" into jb-mr1-dev 2012-10-24 10:44:16 -07:00
Dianne Hackborn
ecf4725ef4 Merge "Fix issue #7401818: Wrong transition animation when clearing task" into jb-mr1-dev 2012-10-24 10:28:30 -07:00
Amith Yamasani
f043de93eb Fix a crash in InputMethodManagerService due to permission failure.
Clear calling identity before sending broadcast to the current user.

Bug: 7403829
Change-Id: If2b27d07d917b892470163e1303883b29a86c0e4
2012-10-24 06:45:12 -07:00
Dave Burke
799916e6ac Merge "Revert "Check non-primary user dirs during package scan"" into jb-mr1-dev 2012-10-23 23:14:15 -07:00
Dave Burke
383fa18b51 Revert "Check non-primary user dirs during package scan"
This reverts commit 4525f5b69cb44a9a0c92f9c525fc47541f456621

Change-Id: I31b7a0860972532478ab3420556b806bfa78739a
2012-10-23 23:12:19 -07:00
Jeff Brown
f0681b34df Secure windows, secure surface views and secure displays.
Add new API to determine whether a display is secure.
Add new API to make a SurfaceView secure.
Clarify documentation.

Bug: 7368436
Change-Id: I7068c34c910e43b4bc72e43fa0dded59a25f0fe2
2012-10-23 20:37:40 -07:00
Dianne Hackborn
9622ca4f88 Fix issue #7401818: Wrong transition animation when clearing task
When we are clearing activities off the top of a task, propagate
any activity options down from the top-most one to whatever top
activity we are keeping.  This ensures that if we set the activity
options on the top activity of the task previously to give it the
correct animation, we still keep that animation for the activity
that really ends up being the top.

Change-Id: I6919b644a530ac283fe4d320496edc2bf72aa04e
2012-10-23 18:56:33 -07:00
Kenny Root
92bc9b3196 PMS: check outInfo for null during delete
It appears that changing an application's signature during boot can pass
an outInfo of null to this function.

Bug: 7402550
Change-Id: I839fea6c8ee728a352c6b906f0fa6671c85f8694
2012-10-23 17:44:26 -07:00
Dianne Hackborn
56e75631bd Merge "Fix issue #7342364: JellyBean broke Toddler Lock, again" into jb-mr1-dev 2012-10-23 17:35:59 -07:00
Zhihai Xu
fa0fd39a4b License of files Bluetooth package is not updated to ASL2
bug 7385618

Change-Id: I6232f537f4fda979d3aabe3a059c11d3299de9b8
2012-10-23 17:31:56 -07:00
Kenny Root
da2509c434 Merge "Check non-primary user dirs during package scan" into jb-mr1-dev 2012-10-23 17:03:09 -07:00
Christopher Tate
e82f68d016 Fix the Backup Manager's uninstall tracking
The bug was that when an app was uninstalled, the Backup Manager was
discarding its bookkeeping about that app being represented in the
device's current live backup dataset.  This in turn meant that if the
app was subsequently reinstalled, its data would not be restored from
that most-recent dataset: it would be restored from the *ancestral*
dataset if possible, or not at all.

Now the "ever backed up" state is retained correctly, and the app
will get its most-recent-data restored as expected.

Bug 7394519

Change-Id: I733cf41737765676e0a3a05fb1bcd32b165cb4ba
2012-10-23 15:40:27 -07:00
Dianne Hackborn
77119bc6c9 Fix issue #7342364: JellyBean broke Toddler Lock, again
Change-Id: I400c02711edc302a1bc7fbf98b62fcb9f76e5e12
2012-10-23 15:02:25 -07:00
Jeff Brown
6fd394ae79 Merge "Improve auto-brightness hysteresis." into jb-mr1-dev 2012-10-23 12:43:47 -07:00
Jeff Brown
e941b1e27f Improve auto-brightness hysteresis.
Reintroduced the stability time heuristic which requires brightness
to remain significantly above or below the currently accepted
ambient brightnes before effecting a brightness change.  The
heuristic has the nice property of preventing light sensor noise
from causing oscillations in brightness even when the noise has
a relatively large magnitude (such as in low light environments).

The time bound and filter thresholds are current set so that
brightness increases typically occur within 5 seconds of a change
in the ambient environment.  Decreases take somewhat longer and
typically occur within 10 seconds.

Changed the timing for brightness animations when the screen is
being dimmed due to a pending user activity timeout.  The screen
now dims slowly but then brightens rapidly when touched.
Previously the screen dimmed quickly and brightened slowly which
felt somewhat unresponsive.

Fixed a problem where a brightness change might not occur because
the light sensor had not reported a new value in a long time.
Now we synthesize measurements when needed to ensure that a
transition will take place if appropriate.

Bug: 7387800
Change-Id: I998df2fec59922042a41a1ba4af97ea52c0bd02a
2012-10-22 18:56:39 -07:00
Kenny Root
4525f5b69c Check non-primary user dirs during package scan
During package scan, only the primary user data directories were
checked. If the secondary user didn't have an application directory, it
would happily ignore it. The app would then crash upon startup.

Bug: 7391882
Change-Id: I1fa92aa27386104d4ac6bc5dc92bfbf2e7dfac9f
2012-10-22 18:48:24 -07:00