OSDN Git Service

Work on issue #2263557: PMF3000 showing hybrid of portrait and landscape modes
authorDianne Hackborn <hackbod@google.com>
Thu, 18 Feb 2010 03:46:25 +0000 (19:46 -0800)
committerDianne Hackborn <hackbod@google.com>
Thu, 18 Feb 2010 23:47:34 +0000 (15:47 -0800)
commite36d6e277e49475076b7872d36ea6a5c5b996e9d
tree83fa38d654d5bf93315b12423a7e9aa81ec45f9e
parenta696f5d667227365da732481770767dcb330dd23
Work on issue #2263557: PMF3000 showing hybrid of portrait and landscape modes

This is a bunch of reworking of how configuration changes are handled:

- When orientation is changing (for whatever reason), the window manager no
  longer tries to pre-emptively compute a new configuration.  Instead, it
  just determines  change is happening and tells the window manager.
- The activity manager is now responsible for giving the window manager the
  final configuration it is using.  This is both so it knows whem the
  activity manager is done with its configuration updates, and so the window
  manager can use the "real" configuration.
- When an orientation or other configuration change is happening, freeze the
  screen and keep it frozen until the activity manager has given us the
  final configuration.
- The window manager can now send new configurations to its clients during
  its layout pass, as part of a resize, if it has determined that it has
  changed.  This allows for a new View.onConfigurationChanged() API for any
  view to easily find out when the configuration has changed.
- ViewRoot now also works with the activity thread to make sure the process's
  current resources are updated to the new configuration when it receives one
  from a window.  This ensures that at the time onConfigurationChanged() and
  other view callbacks are happening, the correct configuration is in force.
- There is now a sequence number associated with Configuration, which
  ActivityThread uses to avoid using stale configurations.  This is needed now
  that it can receive configurations asynchronously from both the window
  manager and activity manager.
- The hack for keeping the locale has been removed, and underlying problem
  fixed by having Configuration initialize its locale to "unknown" instead of
  a valid default value.
15 files changed:
api/current.xml
core/java/android/app/ActivityThread.java
core/java/android/content/res/Configuration.java
core/java/android/content/res/Resources.java
core/java/android/service/wallpaper/WallpaperService.java
core/java/android/view/IWindow.aidl
core/java/android/view/IWindowManager.aidl
core/java/android/view/SurfaceView.java
core/java/android/view/View.java
core/java/android/view/ViewGroup.java
core/java/android/view/ViewRoot.java
core/java/com/android/internal/view/BaseIWindow.java
services/java/com/android/server/WindowManagerService.java
services/java/com/android/server/am/ActivityManagerService.java
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java