OSDN Git Service

Add new wallpaper features for insets and offsets.
authorDianne Hackborn <hackbod@google.com>
Mon, 8 Sep 2014 06:14:30 +0000 (23:14 -0700)
committerDianne Hackborn <hackbod@google.com>
Tue, 9 Sep 2014 01:02:18 +0000 (18:02 -0700)
commit067e5f68b9216b233df1c6529db182ff9b2887ab
tree6ffa000238b204c01bc00274851262945c0ed812
parent8232d822aa97e78e982ed154ac618cde34baac2a
Add new wallpaper features for insets and offsets.

Issue #17394151: WallpaperService / Engines need to get notified
of WindowInsets

Issue #17394203 Wallpapers need a system API to be shifted in order
to support burn in protection

Adds a new API on WallpaperManager to set additional offsets to
make wallpapers extend beyond the display size.

Insets are now reported to wallpapers, to use as they may.  This
includes information about the above offsets, so they can place
their content within the visible area.  And to help with this, also
expose the stable offsets APIs in WindowInsets which is also very
useful information for the wallpaper.

Another new API on WallpaperManager to set a raw offset to apply
to the wallpaper window, forcing it to move on the screen regardless
of what the wallpaper is drawing.

Fix wallpapers when used with overscan enabled, so they still extend
out across the entire screen.  Conveniently, the above new window
insets information is very useful for this case as well!

And a new wallpaper test app for all this stuff.

Change-Id: I287ee36581283dd34607609fcd3170d99d120d8e
27 files changed:
api/current.txt
core/java/android/app/IWallpaperManager.aidl
core/java/android/app/WallpaperManager.java
core/java/android/service/wallpaper/IWallpaperEngine.aidl
core/java/android/service/wallpaper/IWallpaperService.aidl
core/java/android/service/wallpaper/WallpaperService.java
core/java/android/view/IWindowSession.aidl
core/java/android/view/ViewRootImpl.java
core/java/android/view/WindowInsets.java
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
services/core/java/com/android/server/wm/Session.java
services/core/java/com/android/server/wm/WindowManagerService.java
services/core/java/com/android/server/wm/WindowState.java
services/core/java/com/android/server/wm/WindowStateAnimator.java
tests/WallpaperTest/Android.mk [new file with mode: 0644]
tests/WallpaperTest/AndroidManifest.xml [new file with mode: 0644]
tests/WallpaperTest/res/drawable-hdpi/test_wallpaper_thumb.png [new file with mode: 0644]
tests/WallpaperTest/res/layout/activity_main.xml [new file with mode: 0644]
tests/WallpaperTest/res/values-v11/styles.xml [new file with mode: 0644]
tests/WallpaperTest/res/values-v21/styles.xml [new file with mode: 0644]
tests/WallpaperTest/res/values/colors.xml [new file with mode: 0644]
tests/WallpaperTest/res/values/strings.xml [new file with mode: 0644]
tests/WallpaperTest/res/values/styles.xml [new file with mode: 0644]
tests/WallpaperTest/res/xml/test_wallpaper.xml [new file with mode: 0644]
tests/WallpaperTest/src/com/example/wallpapertest/MainActivity.java [new file with mode: 0644]
tests/WallpaperTest/src/com/example/wallpapertest/TestWallpaper.java [new file with mode: 0644]