summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorLucas Dupin <dupin@google.com>2017-06-14 19:34:12 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-06-14 19:34:12 +0000
commit8f773577027ef95ba98b458175f71977920b9deb (patch)
treeb485766f0102fd31a3f3b1fe27de2a9f22d1c2b9 /core/java/android
parent2fe6586160917949fd8252f53443058742bf3e8f (diff)
parent8521eebfad5734df14b05b340044019018dc515c (diff)
Merge changes from topic 'wallpaper_grey_scrim-oc-dr1-dev' into oc-dr1-dev
am: 8521eebfad Change-Id: If523c47be47a0c1f251124c0607802068fd14900
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/IWallpaperVisibilityListener.aidl30
-rw-r--r--core/java/android/view/IWindowManager.aidl14
2 files changed, 44 insertions, 0 deletions
diff --git a/core/java/android/view/IWallpaperVisibilityListener.aidl b/core/java/android/view/IWallpaperVisibilityListener.aidl
new file mode 100644
index 000000000000..349f98493a43
--- /dev/null
+++ b/core/java/android/view/IWallpaperVisibilityListener.aidl
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view;
+
+/**
+ * Listener to be invoked when wallpaper visibility changes.
+ * {@hide}
+ */
+oneway interface IWallpaperVisibilityListener {
+ /**
+ * Method that will be invoked when wallpaper becomes visible or hidden.
+ * @param visible True if wallpaper is being displayed; false otherwise.
+ * @param displayId The id of the display where wallpaper visibility changed.
+ */
+ void onWallpaperVisibilityChanged(boolean visible, int displayId);
+}
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index 2b73c14540d5..e576a0fbdb2b 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -39,6 +39,7 @@ import android.view.IDockedStackListener;
import android.view.IOnKeyguardExitResult;
import android.view.IPinnedStackListener;
import android.view.IRotationWatcher;
+import android.view.IWallpaperVisibilityListener;
import android.view.IWindowSession;
import android.view.IWindowSessionCallback;
import android.view.KeyEvent;
@@ -256,6 +257,19 @@ interface IWindowManager
Bitmap screenshotWallpaper();
/**
+ * Registers a wallpaper visibility listener.
+ * @return Current visibility.
+ */
+ boolean registerWallpaperVisibilityListener(IWallpaperVisibilityListener listener,
+ int displayId);
+
+ /**
+ * Remove a visibility watcher that was added using registerWallpaperVisibilityListener.
+ */
+ void unregisterWallpaperVisibilityListener(IWallpaperVisibilityListener listener,
+ int displayId);
+
+ /**
* Used only for assist -- request a screenshot of the current application.
*/
boolean requestAssistScreenshot(IAssistScreenshotReceiver receiver);