diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-04-19 15:50:33 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-04-19 15:50:33 +0000 |
| commit | 0e47206b0a157159ec51b4b0739c4e4127507df1 (patch) | |
| tree | d0f70c68377ec56e17d8bb58f90ef87c3c312e59 /core/java/android | |
| parent | 0f6a128108e298784c38779848509c59068923a9 (diff) | |
| parent | d5da89479eafee5fb8e28da1b8f83eda32d44ddf (diff) | |
Merge "Use the existing wallpaper command API to send wake/sleep events to the wallpaper." into sc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/IWallpaperManager.aidl | 14 | ||||
| -rw-r--r-- | core/java/android/app/WallpaperManager.java | 24 |
2 files changed, 38 insertions, 0 deletions
diff --git a/core/java/android/app/IWallpaperManager.aidl b/core/java/android/app/IWallpaperManager.aidl index e83557c18f8f..4f7c6841d6bb 100644 --- a/core/java/android/app/IWallpaperManager.aidl +++ b/core/java/android/app/IWallpaperManager.aidl @@ -190,4 +190,18 @@ interface IWallpaperManager { * Called from SystemUI when it shows the AoD UI. */ oneway void setInAmbientMode(boolean inAmbientMode, long animationDuration); + + /** + * Called from SystemUI when the device is waking up. + * + * @hide + */ + oneway void notifyWakingUp(int x, int y, in Bundle extras); + + /** + * Called from SystemUI when the device is going to sleep. + * + * @hide + */ + void notifyGoingToSleep(int x, int y, in Bundle extras); } diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index 6a71c92fbc37..8d332ab1d58b 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -190,6 +190,30 @@ public class WallpaperManager { public static final String COMMAND_DROP = "android.home.drop"; /** + * Command for {@link #sendWallpaperCommand}: reported by System UI when the device is waking + * up. The x and y arguments are a location (possibly very roughly) corresponding to the action + * that caused the device to wake up. For example, if the power button was pressed, this will be + * the location on the screen nearest the power button. + * + * If the location is unknown or not applicable, x and y will be -1. + * + * @hide + */ + public static final String COMMAND_WAKING_UP = "android.wallpaper.wakingup"; + + /** + * Command for {@link #sendWallpaperCommand}: reported by System UI when the device is going to + * sleep. The x and y arguments are a location (possibly very roughly) corresponding to the + * action that caused the device to go to sleep. For example, if the power button was pressed, + * this will be the location on the screen nearest the power button. + * + * If the location is unknown or not applicable, x and y will be -1. + * + * @hide + */ + public static final String COMMAND_GOING_TO_SLEEP = "android.wallpaper.goingtosleep"; + + /** * Command for {@link #sendWallpaperCommand}: reported when the wallpaper that was already * set is re-applied by the user. * @hide |
