610 Commits

Author SHA1 Message Date
Craig Mautner
2ad920759b Revert ActivityManager changes for tasks. DO NOT MERGE
Keeping all activity=>task changes in master and removing them
from jb-mr2.

Revert "Update histories simultaneously."
Revert "Add null check to setAppGroupId."
Revert "Fix crashing bug in validator."
Revert "Switch topRunning* and moveTaskTo*"
Revert "Begin switch over to task based history."
Revert "Reset and reuse Iterators and don't new() one."
Revert "Remove AppWindowToken lists."
Revert "Fix build."
Revert "Remove unused App methods."
Revert "Stop using AppToken movement and start using Task."
Revert "Replace access to mAppTokens with AppTokenIterator"
Revert "Refactor setAppOpVisibility implementation."
Revert "Add AppWindowTokens to TaskList."
Revert "Make ActivityStack.mHistory private."
Revert "Migrate AppWindowToken lists into DisplayContent."

Change-Id: I5722c9a4956dccb52864207e2967690bc58e4ebb
2013-02-25 17:07:39 -08:00
Dianne Hackborn
c4aad01cbb Formalize overscan metrics.
The window manager now maintains and reports a new formal
"overscan insets" for each window, much like the existing
content and visible insets.  This is used to correctly
position the various UI elements in the various combination
of layout options.  In particular, this allows us to have
an activity that is using fitSystemWindows to have the content
of its UI extend out to the visible content part of the screen
while still positioning its fixed UI elements inside the
standard content rect (and the entire window extending all
the way into the overscan area to fill the screen as desired).

Okay, maybe that is not written so clearly.  Well, it made
my head hurt too, so suffer!

The key thing is that windows now need to know about three
rectangles: the overall rectangle of the window, the rectangle
inside of the overscan area, and the rectangle inside of the
content area.  The FLAG_LAYOUT_IN_OVERSCAN option controls
whether the second rectangle is pushed out to fill the entire
overscan area.

Also did some improvements to debug dumping in the window
manager.

Change-Id: Ib2368c4aff5709d00662c799507c37b6826929fd
2013-02-22 19:14:37 -08:00
Jim Miller
29ae06633d am ec6156f9: Merge "Fix the build."
* commit 'ec6156f9e884ba85c76a9c4683f83f18b3f64afa':
  Fix the build.
2013-02-20 17:08:24 -08:00
Jim Miller
ef04a9b7e1 Fix the build.
Change-Id: If53878937fe1ca01ad8db9f9d201d0f9aaaec81b
2013-02-20 16:58:59 -08:00
Dianne Hackborn
4f7fb00f6c am ee973c27: Fix build.
* commit 'ee973c27e339a23e0b93d816a97b33954af66bea':
  Fix build.
2013-02-19 13:38:49 -08:00
Dianne Hackborn
ee973c27e3 Fix build.
Change-Id: I277de38a70f3a2e5c1997a3fe5c2e825692ae9e1
2013-02-19 13:36:32 -08:00
Craig Mautner
102f711043 am 534d136a: Merge "Remove unused App methods."
# Via Android (Google) Code Review (1) and Craig Mautner (1)
* commit '534d136aa66fb13f7c1b482513627de45c218c29':
  Remove unused App methods.
2013-02-14 10:16:57 -08:00
Craig Mautner
b0c0b1fd70 Remove unused App methods.
Now that the Task methods have replaced the App methods remove
the App methods.

Change-Id: I0e7432f2c6f99708759ed8c871d20eb5bd38c3c2
2013-02-13 15:24:14 -08:00
Chris Craik
c932760f66 Merge "Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE" 2013-02-13 23:14:58 +00:00
Chris Craik
7c1a49f5f5 Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE
This reverts commit 6c0307dd0aefe9a08794b155fc03ee60ebd14f25, reversing
changes made to a2cd828b749c444d55c2c41c7dbb85088ff94b9f.

Conflicts:
	packages/SystemUI/res/values-sv/strings.xml

Change-Id: Ia178efe8b14751583d47b2826bfe3d3d5463dd2e
2013-02-13 10:50:20 -08:00
Xavier Ducrohet
4f0dd02d00 am 36ee5485: am 5d5c05de: am b7a4aed9: am f70b8c1c: Merge "Fix DateFormat for layoutlib." into jb-mr1.1-dev
# Via Android Git Automerger (3) and others
* commit '36ee5485b85e34008dc31e0f7bace1b2516c5db5':
  Fix DateFormat for layoutlib.
2013-02-12 15:54:02 -08:00
Xavier Ducrohet
36ee5485b8 am 5d5c05de: am b7a4aed9: am f70b8c1c: Merge "Fix DateFormat for layoutlib." into jb-mr1.1-dev
# Via Android Git Automerger (2) and others
* commit '5d5c05dee9911eaf8add2d4298641e60f2a113d5':
  Fix DateFormat for layoutlib.
2013-02-12 15:52:46 -08:00
Xavier Ducrohet
47a021f764 Fix DateFormat for layoutlib.
Change-Id: I389c9d106b93b9f81dd3614398a5b66ba2b39a70
2013-02-12 14:05:32 -08:00
Derek Sollenberger
23e500d168 Merge "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" 2013-02-06 12:57:38 +00:00
Dianne Hackborn
961321fe4e App ops: add op for writing settings.
Also fix a build.

And fix a bug that I think was introduced in the multi-user work
that removed the permission check for writing to settings...!

Change-Id: I5945682faa789ffc78fd3546c0df7d03693f106d
2013-02-05 17:22:41 -08:00
Svetoslav
5cf6f8adfa am 573a18cc: Merge "Fixing the build"
# Via Android (Google) Code Review (1) and Svetoslav (1)
* commit '573a18ccd883d18046dea600855d34f5c9a57fa8':
  Fixing the build
2013-01-29 02:15:48 -08:00
Svetoslav
f5f7d9751a Fixing the build
Change-Id: I8d47c7094efc8ff458cdac58a761d5f187c8fc32
2013-01-29 02:08:54 -08:00
Dianne Hackborn
c152e16b07 am 8fea4e72: Merge "Rework ParceledListSlice to be much easier to use."
* commit '8fea4e72e4dcff9fa76168b9e26cf5907102f70b':
  Rework ParceledListSlice to be much easier to use.
2013-01-18 16:20:40 -08:00
Dianne Hackborn
d8e1dbb6bc Rework ParceledListSlice to be much easier to use.
Take advantage of this to return better information about
packages filtered by permissions -- include the permissions
they have in the requested array.

Also fix issue #8026793 (Contact picture shows default pic
while searching for a contact in qsb) by using the base
package name of the Context when reporting the app name
of an operation.  Otherwise you could make a resource-only
context for another application and do calls through that
and get reported as the wrong app.

Change-Id: I5e0488bf773acea5a3d22f245641828e1a106fb8
2013-01-18 13:02:26 -08:00
Dianne Hackborn
7ed6c6d83b am 35654b61: More work on App Ops service.
* commit '35654b61e8fe7bc85afcb076ddbb590d51c5865f':
  More work on App Ops service.
2013-01-16 12:14:53 -08:00
Dianne Hackborn
35654b61e8 More work on App Ops service.
Implemented reading and writing state to retain information
across boots, API to retrieve state from it, improved location
manager interaction to monitor both coarse and fine access
and only note operations when location data is being delivered
back to app (not when it is just registering to get the data at
some time in the future).

Also implement tracking of read/write ops on contacts and the
call log.  This involved tweaking the content provider protocol
to pass over the name of the calling package, and some
infrastructure in the ContentProvider transport to note incoming
calls with the app ops service.  The contacts provider and call
log provider turn this on for themselves.

This also implements some of the mechanics of being able to ignore
incoming provider calls...  all that is left are some new APIs for
the real content provider implementation to be involved with
providing the correct behavior for query() (return an empty
cursor with the right columns) and insert() (need to figure out
what URI to return).

Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
2013-01-16 12:11:01 -08:00
Tor Norbye
3cd80d949c am 72c6137a: Handle empty flag attributes, such as gravity=""
* commit '72c6137a7aa5e5ada6a4aeca52f33d060742beb6':
  Handle empty flag attributes, such as gravity=""
2013-01-04 16:05:18 -08:00
Tor Norbye
72c6137a7a Handle empty flag attributes, such as gravity=""
Without this, an empty string will be passed into
XmlUtils.convertValueToInt, which throws an
index out of range exception.

Change-Id: Ibd1a140e207653b205852087f33ccb87fbbb9bbc
2013-01-04 15:48:58 -08:00
Derek Sollenberger
2fa54cef47 Merge "Update framework to support r5967 of Skia." into master-chromium 2012-12-19 06:18:11 -08:00
John Spurlock
330dd53484 Remove remaining doc references to StyledAttributes.
It appears StyledAttributes was renamed to TypedArray
prior to fw 1.0.  Leaving references to the old name
around in the public docs is confusing.

Deliberating leaving...
   tests/coretests/src/android/widget/LabelView.java
... as is - it's clearly unused.

Change-Id: I3f66e5f9cbe945d9d86530d37b88369b401f054d
2012-12-18 12:03:11 -05:00
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
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
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
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
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
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
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
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
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
6dfd0b39a6 Fix SDK layout rendering in Eclipse.
Change-Id: I0e9e85632012c0929b987ee9d0ccf7c25eece322
2012-10-15 15:14:44 -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
c38c9be031 Coordinate screen on with the window manager.
Bug: 7267457
Change-Id: Ic2c322253639e1f0b2e4e72a7b145025d0240f93
2012-10-05 14:39:23 -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
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
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
edce6a7978 Remove clearUserActivityTimeout().
This function is not implemented and not needed.

Bug: 7165399
Change-Id: Ib1c50fabad6292ccf670404ba70aeb1242c4614d
2012-09-30 16:23:05 -07:00
Jeff Brown
120664816a Get rid of preventScreenOn().
Bug: 7165399
Change-Id: I1968265ecd74fff4d85efd2ca03b1983425ea518
2012-09-28 18:21:36 -07:00
Jeff Brown
62c82e4d92 Make DreamManagerService more robust.
Clearly isolated the DreamManagerService and DreamController
responsibilities.  DreamManagerService contains just enough logic to
manage the global synchronous behaviors.  All of the asynchronous
behaviors are in DreamController.

Added a new PowerManager function called nap() to request the device
to start napping.  If it is a good time to nap, then the
PowerManagerService will call startDream() on the DreamManagerService
to start dreaming.

Fixed a possible multi-user issue by explicitly tracking for
which user a dream service is being started and stopping dreams
when the current user changes.  The user id is also passed to
bindService() to ensure that the dream has the right environment.

Fix interactions with docks and the UI mode manager.  It is
important that we always send the ACTION_DOCK_EVENT broadcast
to the system so that it can configure audio routing and the like.
When docked, the UI mode manager starts a dock app if there is
one, otherwise it starts a dream.

This change resolves issues with dreams started for reasons other
than a user activity timeout.

Bug: 7204211
Change-Id: I3193cc8190982c0836319176fa2e9c4dcad9c01f
2012-09-26 15:24:27 -07:00
Jeff Sharkey
6d51571835 Allow acquiring ContentProviders across users.
Otherwise services like SystemUI will always open content://-style
Uris as USER_OWNER.  Surfaces through createPackageContextAsUser()
which points all ContentResolver operations towards a given user.

Start using in RemoteViews, so that Notifications correctly resolve
image Uris to the sending user.  Also add user support for "content"
shell tool.

Bug: 7202982
Change-Id: I8cb7fb8a812e825bb0b5833799dba87055ff8699
2012-09-21 19:49:43 -07:00
Dianne Hackborn
9d9ece3c1e Animations for user switching.
The window manager now has a facility to provide a full-screen
animation, which the activity manager uses every time a user
switch happens.

The current animation is just a simple dumb slide until we get
a design from UX.

Also some cleanup: moved the portrait task animations to the
default config so we always have an animation for them, and finally
got the java symbol stuff out of public.xml.

Change-Id: I726f77422b2ef5f2d98f961f8da003e045f0ebe8
2012-09-10 19:58:21 -07:00