1419 Commits

Author SHA1 Message Date
Svetoslav Ganov
2ec5093e5a Fixing the build
Change-Id: I01349d65ac5915da090cfb018f99e0a508f9d5ad
2012-12-14 17:45:44 -08:00
Derek Sollenberger
ca79cf69d0 Update framework to support r5967 of Skia.
bug: 6906025
Change-Id: Iefdb830ec3aa2ab3472c1c142484a7aa21788a15
2012-12-12 15:28:54 -05:00
Dianne Hackborn
f9ae5f75af am 23307cbb: am e0a676a3: Merge "Fix issue #7649590: Background windows sometimes not being hidden for secondary users" into jb-mr1.1-dev
* commit '23307cbb6b432b658b0fd7437dacfedd6298af94':
  Fix issue #7649590: Background windows sometimes not being hidden for secondary users
2012-12-03 16:08:35 -08:00
Dianne Hackborn
23307cbb6b am e0a676a3: Merge "Fix issue #7649590: Background windows sometimes not being hidden for secondary users" into jb-mr1.1-dev
* commit 'e0a676a3bb0e7b9aced9359a021e4c5d2ffef752':
  Fix issue #7649590: Background windows sometimes not being hidden for secondary users
2012-12-03 15:54:34 -08:00
Dianne Hackborn
bb4ca5271a Fix issue #7649590: Background windows sometimes not being hidden for secondary users
There are two things going on here:

(1) In secondary users, some times theme information such as whether
the window is full screen opaque was not being retrieved, so the window
manager didn't know that it could hide the windows behind the app.
This would just be a performance problem, except that:

(2) There appear to be a number of applications that declare that they
are full screen opaque, when in fact they are not.  Instead they are
using window surfaces with an alpha channel, and setting some pixels
in their window to a non-opaque alpha level.  This will allow you to
see whatever is behind the app.  If the system happens to completely
remove the windows behind the app, and somebody is filling the frame
buffer with black, then you will see what the app intends -- those
parts of its UI blended with black.  If one of those cases doesn't
hold (and though we have never guaranteed they would, in practice this
is generally what happens), then you will see something else.

At any rate, if nothing else than for performance reasons, we need to
fix issue #1.

It turns out what is happening here is that the AttributeCache used
by the activity manager and window manager to retreive theme and other
information about applications has not yet been updated for multi-user.

One of the things we retrieve from this is the theme information telling
the window manager whether an application's window should be treated
as full screen opaque, allowing it to hide any windows behind it.  In
the current implementation, the AttributeCache always retrieves this
information about the application as the primary user (user 0).

So, if you have an application that is installed on a secondary user but
not installed on the primary user, when the AttributeCache tries to retrieve
the requested information for it, then from the perspective of the primary user
it considers the application not installed, and is not able to retrieve that
info.

The change here makes AttributeCache multi-user aware, keeping all of its
data separately per-user, and requiring that callers now provide the user
they want to retrieve information for.  Activity manager and window manager
are updated to be able to pass in the user when needed.  This required some
fiddling of the window manager to have that information available -- in
particular it needs to be associated with the AppWindowToken.

Change-Id: I4b50b4b3a41bab9d4689e61f3584778e451343c8
2012-12-03 14:09:06 -08:00
Svetoslav Ganov
152e9bb81a Refactoring of the screen magnification feature.
1. The screen magnification feature was implemented entirely as a part of the accessibility
   manager. To achieve that the window manager had to implement a bunch of hooks for an
   external client to observe its internal state. This was problematic since it dilutes
   the window manager interface and allows code that is deeply coupled with the window
   manager to reside outside of it. Also the observer callbacks were IPCs which cannot
   be called with the window manager's lock held. To avoid that the window manager had
   to post messages requesting notification of interested parties which makes the code
   consuming the callbacks to run asynchronously of the window manager. This causes timing
   issues and adds unnecessary complexity.

   Now the magnification logic is split in two halves. The first half that is responsible
   to track the magnified portion of the screen and serve as a policy which windows can be
   magnified and it is a part of the window manager. This part exposes higher level APIs
   allowing interested parties with the right permissions to control the magnification
   of a given display. The APIs also allow a client to be registered for callbacks on
   interesting changes such as resize of the magnified region, etc. This part servers
   as a mediator between magnification controllers and the window manager.

   The second half is a controller that is responsible to drive the magnification
   state based on touch interactions. It also presents a highlight when magnified to
   suggest the magnified potion of the screen. The controller is responsible for auto
   zooming out in case the user context changes - rotation, new actitivity. The controller
   also auto pans if a dialog appears and it does not interesect the magnified frame.

bug:7410464

2. By design screen magnification and touch exploration work separately and together. If
   magnification is enabled the user sees a larger version of the widgets and a sub section
   of the screen content. Accessibility services use the introspection APIs to "see" what
   is on the screen so they can speak it, navigate to the next item in response to a
   gesture, etc. Hence, the information returned to accessibility services has to reflect
   what a sighted user would see on the screen. Therefore, if the screen is magnified
   we need to adjust the bounds and position of the infos describing views in a magnified
   window such that the info bounds are equivalent to what the user sees.

   To improve performance we keep accessibility node info caches in the client process.
   However, when magnification state changes we have to clear these caches since the
   bounds of the cached infos no longer reflect the screen content which just got smaller
   or larger.

   This patch propagates not only the window scale as before but also the X/Y pan and the
   bounds of the magnified portion of the screen to the introspected app. This information
   is used to adjust the bounds of the node infos coming from this window such that the
   reported bounds are the same as the user sees not as the app thinks they are. Note that
   if magnification is enabled we zoom the content and pan it along the X and Y axis. Also
   recomputed is the isVisibleToUser property of the reported info since in a magnified
   state the user sees a subset of the window content and the views not in the magnified
   viewport should be reported as not visible to the user.

bug:7344059

Change-Id: I6f7832c7a6a65c5368b390eb1f1518d0c7afd7d2
2012-12-03 10:38:48 -08:00
Christopher Tate
fac7b0a603 am 5f958e9b: am 67b38c44: Cache resource ID lookups in aapt
* commit '5f958e9bfc793b3b653dfc88418bbd7745e633e1':
  Cache resource ID lookups in aapt
2012-11-29 10:58:26 -08:00
Christopher Tate
67b38c44e8 Cache resource ID lookups in aapt
This speeds up certain workloads considerably, particularly
those involved in buildling apps via the SDK.  Windows-based
use should particularly benefit from the change.

(cherry picked from commit d8dde13a63565dcd72bcf03a5088407b737ba793)

Change-Id: I33835bc64ade77688d41e8bfcd371b0a5f59d8fd
2012-11-28 15:32:46 -08:00
Christopher Tate
68d1b63e6c am e659cea6: am d51ffbea: am faeabc7b: Merge "Cache resource ID lookups in aapt"
* commit 'e659cea645c55fb6ecc744881e288007d53fc9a2':
  Cache resource ID lookups in aapt
2012-11-27 18:48:42 -08:00
Christopher Tate
d8dde13a63 Cache resource ID lookups in aapt
This speeds up certain workloads considerably, particularly
those involved in buildling apps via the SDK.  Windows-based
use should particularly benefit from the change.

Change-Id: I29f4b3a77400b201ee219729cc28a5e359c0c5e8
2012-11-27 18:28:49 -08:00
Jim Miller
08bb2316f1 am 061b4fae: am a2bf6181: am 2c29deaa: am 6be441c5: Merge "Add mechanism to kick keyguard to show the assistant" into jb-mr1-lockscreen-dev
* commit '061b4fae3daf40c90b46e16b12e7f22142eb498c':
  Add mechanism to kick keyguard to show the assistant
2012-11-08 15:58:03 -08:00
Jim Miller
061b4fae3d am a2bf6181: am 2c29deaa: am 6be441c5: Merge "Add mechanism to kick keyguard to show the assistant" into jb-mr1-lockscreen-dev
* commit 'a2bf6181dfca0f93461fc041f2bd2444551a4515':
  Add mechanism to kick keyguard to show the assistant
2012-11-08 15:47:04 -08:00
Jim Miller
d97b09b0f3 am bef82757: am c7dc250d: am fe7e94a0: am 088fb915: Merge "Add isSafeModeEnabled() API to WindowManagerService" into jb-mr1-lockscreen-dev
* commit 'bef827572ce9644253ea42ab91b11b8107d2300f':
  Add isSafeModeEnabled() API to WindowManagerService
2012-11-08 15:37:01 -08:00
Jim Miller
bef827572c am c7dc250d: am fe7e94a0: am 088fb915: Merge "Add isSafeModeEnabled() API to WindowManagerService" into jb-mr1-lockscreen-dev
* commit 'c7dc250d5a3dab93ff87e9986a71ae58ff124399':
  Add isSafeModeEnabled() API to WindowManagerService
2012-11-08 15:32:09 -08:00
Jim Miller
a2bf6181df am 2c29deaa: am 6be441c5: Merge "Add mechanism to kick keyguard to show the assistant" into jb-mr1-lockscreen-dev
* commit '2c29deaa2650091d9206b8fa93f8a447ee247d52':
  Add mechanism to kick keyguard to show the assistant
2012-11-08 13:13:23 -08:00
Jim Miller
4eeb4f664a Add mechanism to kick keyguard to show the assistant
Fixes bug 7499778

Change-Id: Ic9ea514feb489feeee6716f40bdb9792842f9515
2012-11-08 00:39:04 -08:00
Kenny Root
7b172a49a9 am 58ed5d74: am 768d9e1a: Merge "Correct executable bit for source files"
* commit '58ed5d748c0b9b64845975ef5844ad313de7c3f6':
  Correct executable bit for source files
2012-11-07 13:08:25 -08:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Jim Miller
c7dc250d5a am fe7e94a0: am 088fb915: Merge "Add isSafeModeEnabled() API to WindowManagerService" into jb-mr1-lockscreen-dev
* commit 'fe7e94a094746b608eb926fadc3ee1446bbb0d58':
  Add isSafeModeEnabled() API to WindowManagerService
2012-11-07 11:17:08 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08:00
Jim Miller
bfec0a8616 Add isSafeModeEnabled() API to WindowManagerService
This adds a means of determining when the device is in safe mode,
as required by keyguard to disabled some features.

Change-Id: I31d357e6738c92e1837f9e0263e5f3f4de66315a
2012-11-05 20:27:38 -08:00
Maurice Chu
32d7f8cb86 Merge "Enhance AIDL to take an explicit id for methods" 2012-10-19 10:34:10 -07:00
Xavier Ducrohet
dc8ae9f758 am 26d76606: am d8149b03: Merge "Layoutlib: Read and close XML files as soon as possible." into jb-mr1-dev
* commit '26d76606aff48680fc61f9decaeddff3a568ca58':
  Layoutlib: Read and close XML files as soon as possible.
2012-10-18 15:32:57 -07:00
Xavier Ducrohet
26d76606af am d8149b03: Merge "Layoutlib: Read and close XML files as soon as possible." into jb-mr1-dev
* commit 'd8149b03a8676a49f6ca500eecafe79fadf046a7':
  Layoutlib: Read and close XML files as soon as possible.
2012-10-18 15:30:24 -07:00
Maurice Chu
02822d0590 Enhance AIDL to take an explicit id for methods
This adds an annotation to methods in AIDL of the form
"void myMethod() = 3;" to explicitly set the onTransact
id for the method.  Either all methods must have explicitly
annotated id's or none of them should be explicitly annotated.
There is error checking in the AIDL compiler
for duplicate id's and id's outside of the valid range.

Bug: 7353910
Change-Id: I868045e3f112c9a279c573cea368a621116cbf77
2012-10-18 14:47:13 -07:00
Xavier Ducrohet
c48b0b940d Layoutlib: Read and close XML files as soon as possible.
Because passing an InputStream to KXML does not close the
stream after the file has been parsed, the files are staying
locked on windows until the gc and finalizers are run.

This change preload the XML files and close their stream,
and then pass the content in a stream to the parser.

Change-Id: Iabe27989dc616ec9e7de88e52b1ec3af9f007f7c
2012-10-18 13:59:51 -07:00
Xavier Ducrohet
d5a68ad8b7 am 441f0672: am 9c474738: Merge "Update layoutlib for jb mr1." into jb-mr1-dev
* commit '441f0672ed65feead06c4a05d7e6bf894ab2a982':
  Update layoutlib for jb mr1.
2012-10-17 17:24:01 -07:00
Xavier Ducrohet
441f0672ed am 9c474738: Merge "Update layoutlib for jb mr1." into jb-mr1-dev
* commit '9c474738a29f77359a461035855d6e9b3935ade1':
  Update layoutlib for jb mr1.
2012-10-17 17:21:36 -07:00
Xavier Ducrohet
891b703f7b Update layoutlib for jb mr1.
Status bar displayed on all devices.
Update logic for displaying nav bar to whether or not
device has soft button.

Update navigation buttons to new look.
Remove battery and signal from navigation bar.

Change-Id: I8241d71269a17126218a3062ba727e379a8e6c25
2012-10-17 17:15:31 -07:00
Xavier Ducrohet
50e137c7df am 136bd7c6: am 477687c1: Merge "Fix SDK layout rendering in Eclipse." into jb-mr1-dev
* commit '136bd7c6aef8767dc208811ad87f90956333e78f':
  Fix SDK layout rendering in Eclipse.
2012-10-15 15:19:50 -07:00
Xavier Ducrohet
136bd7c6ae am 477687c1: Merge "Fix SDK layout rendering in Eclipse." into jb-mr1-dev
* commit '477687c1eb1919c54e2bffba2a740df3b4af6668':
  Fix SDK layout rendering in Eclipse.
2012-10-15 15:17:46 -07:00
Xavier Ducrohet
6dfd0b39a6 Fix SDK layout rendering in Eclipse.
Change-Id: I0e9e85632012c0929b987ee9d0ccf7c25eece322
2012-10-15 15:14:44 -07:00
Craig Mautner
337aa27a63 am 8ee7ac22: am 33877e15: Merge "Adds showWhenLocked attribute to Activities." into jb-mr1-dev
* commit '8ee7ac22e6aec5df5405a3e2130d593c50bc39b2':
  Adds showWhenLocked attribute to Activities.
2012-10-07 11:53:43 -07:00
Craig Mautner
8ee7ac22e6 am 33877e15: Merge "Adds showWhenLocked attribute to Activities." into jb-mr1-dev
* commit '33877e15b8bfc50bd874027689a4794aa93b923d':
  Adds showWhenLocked attribute to Activities.
2012-10-07 11:50:54 -07:00
Craig Mautner
33877e15b8 Merge "Adds showWhenLocked attribute to Activities." into jb-mr1-dev 2012-10-07 11:48:50 -07:00
Craig Mautner
5962b12bed Adds showWhenLocked attribute to Activities.
The new attribute allows an Activity such as the alarm to appear
on all users screens.

Bug: 7213805 fixed.
Change-Id: If7866b13d88c04af07debc69e0e875d0adc6050a
2012-10-06 13:09:58 -07:00
Jeff Brown
4bb6d07a8b am 513b8ea1: am 3f1246a2: Merge "Coordinate screen on with the window manager." into jb-mr1-dev
* commit '513b8ea16fdedd7b6debd718798c0220edd61d7f':
  Coordinate screen on with the window manager.
2012-10-05 15:00:47 -07:00
Jeff Brown
513b8ea16f am 3f1246a2: Merge "Coordinate screen on with the window manager." into jb-mr1-dev
* commit '3f1246a29b58cf78ebe674ec0905ad1795027aac':
  Coordinate screen on with the window manager.
2012-10-05 14:58:01 -07:00
Jeff Brown
c38c9be031 Coordinate screen on with the window manager.
Bug: 7267457
Change-Id: Ic2c322253639e1f0b2e4e72a7b145025d0240f93
2012-10-05 14:39:23 -07:00
Adam Cohen
451d49b34c am a39c5c36: am 327424d6: Merge "Plumbing to allow keyguard to be shown with user switcher (issue 7175023)" into jb-mr1-dev
* commit 'a39c5c369af24cc25f77b9ac97dfffae41c73eb6':
  Plumbing to allow keyguard to be shown with user switcher (issue 7175023)
2012-10-04 18:05:48 -07:00
Adam Cohen
a39c5c369a am 327424d6: Merge "Plumbing to allow keyguard to be shown with user switcher (issue 7175023)" into jb-mr1-dev
* commit '327424d69b99213e872e91f05feba2d0a137d6c7':
  Plumbing to allow keyguard to be shown with user switcher (issue 7175023)
2012-10-04 18:03:36 -07:00
Adam Cohen
f752202bee Plumbing to allow keyguard to be shown with user switcher (issue 7175023)
-> Also reduced calls to lockNow, and moved this call in ActivityManagerService

Change-Id: I9ba34ca902f7c0f71fa4ec302104688ca8d11f55
2012-10-04 17:53:01 -07:00
Dianne Hackborn
85486bd33d am cd09cb8f: am 6fb7fd3a: Merge "Fix issue #7267494, issue #7212347" into jb-mr1-dev
* commit 'cd09cb8fb79442aa22018db9134ef1ef22059360':
  Fix issue #7267494, issue #7212347
2012-10-03 18:50:18 -07:00
Dianne Hackborn
cd09cb8fb7 am 6fb7fd3a: Merge "Fix issue #7267494, issue #7212347" into jb-mr1-dev
* commit '6fb7fd3a0939413d8968fc0d404ed499d7f7dc52':
  Fix issue #7267494, issue #7212347
2012-10-03 18:47:51 -07:00
Dianne Hackborn
c428aae642 Fix issue #7267494, issue #7212347
7267494 Calendar is not syncing
Check for whether a content provider is dead before returning
it.  This is kind-of a band-aid, but probably the right thing
to do; I'm just not sure exactly the full details of why this
problem is happening.  Hopefully this "fixes" it, though I don't
have a way to repro to tell.

7212347 System power off dialog is only visible to user 0
Make it visible.  Also turn on some battery debugging stuff and
clean it up so we can just keep it.

Change-Id: I5add25bf2a763c8dfe1df23bc5c753a9ea5d157a
2012-10-03 18:07:23 -07:00
Jeff Brown
13176e639c am cd781ce2: am cb6f950f: Merge "New internal API to eliminate poke locks." into jb-mr1-dev
* commit 'cd781ce2ebc104cf83d630889ae330a980635c9e':
  New internal API to eliminate poke locks.
2012-10-01 15:25:30 -07:00
Jeff Brown
cd781ce2eb am cb6f950f: Merge "New internal API to eliminate poke locks." into jb-mr1-dev
* commit 'cb6f950f15919794d26a55c20090fe5dacd11e4a':
  New internal API to eliminate poke locks.
2012-10-01 15:22:45 -07:00
Jeff Brown
1e3b98d47d New internal API to eliminate poke locks.
Added a new WindowManager.LayoutParams inputFeatures flag
to disable automatic user activity behavior when an input
event is sent to a window.

Added a new WindowManager.LayoutParams field userActivityTimeout.

Bug: 7165399
Change-Id: I204eafa37ef26aacc2c52a1ba1ecce1eebb0e0d9
2012-10-01 14:27:34 -07:00
Jeff Brown
9370592e23 am 5d359a92: am 5e3dcf72: Merge "Remove clearUserActivityTimeout()." into jb-mr1-dev
* commit '5d359a92658d01b0220f77eb294d6124848739bc':
  Remove clearUserActivityTimeout().
2012-10-01 11:41:11 -07:00
Jeff Brown
5d359a9265 am 5e3dcf72: Merge "Remove clearUserActivityTimeout()." into jb-mr1-dev
* commit '5e3dcf7210bed65d8f9aec40d9da078daf76dead':
  Remove clearUserActivityTimeout().
2012-10-01 11:39:30 -07:00