summaryrefslogtreecommitdiff
path: root/core/java/android/view/Window.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view/Window.java')
-rw-r--r--core/java/android/view/Window.java61
1 files changed, 61 insertions, 0 deletions
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 06974d31e86e..b3a069935d99 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -708,6 +708,11 @@ public abstract class Window {
public void addFlags(int flags) {
setFlags(flags, flags);
}
+
+ /** @hide */
+ public void addPrivateFlags(int flags) {
+ setPrivateFlags(flags, flags);
+ }
/**
* Convenience function to clear the flag bits as specified in flags, as
@@ -751,6 +756,14 @@ public abstract class Window {
}
}
+ private void setPrivateFlags(int flags, int mask) {
+ final WindowManager.LayoutParams attrs = getAttributes();
+ attrs.privateFlags = (attrs.privateFlags & ~mask) | (flags & mask);
+ if (mCallback != null) {
+ mCallback.onWindowAttributesChanged(attrs);
+ }
+ }
+
/**
* Set the amount of dim behind the window when using
* {@link WindowManager.LayoutParams#FLAG_DIM_BEHIND}. This overrides
@@ -1256,4 +1269,52 @@ public abstract class Window {
* @param mask Flags specifying which options should be modified. Others will remain unchanged.
*/
public void setUiOptions(int uiOptions, int mask) { }
+
+ /**
+ * Set the primary icon for this window.
+ *
+ * @param resId resource ID of a drawable to set
+ */
+ public void setIcon(int resId) { }
+
+ /**
+ * Set the default icon for this window.
+ * This will be overridden by any other icon set operation which could come from the
+ * theme or another explicit set.
+ *
+ * @hide
+ */
+ public void setDefaultIcon(int resId) { }
+
+ /**
+ * Set the logo for this window. A logo is often shown in place of an
+ * {@link #setIcon(int) icon} but is generally wider and communicates window title information
+ * as well.
+ *
+ * @param resId resource ID of a drawable to set
+ */
+ public void setLogo(int resId) { }
+
+ /**
+ * Set the default logo for this window.
+ * This will be overridden by any other logo set operation which could come from the
+ * theme or another explicit set.
+ *
+ * @hide
+ */
+ public void setDefaultLogo(int resId) { }
+
+ /**
+ * Set focus locally. The window should have the
+ * {@link WindowManager.LayoutParams#FLAG_LOCAL_FOCUS_MODE} flag set already.
+ * @param hasFocus Whether this window has focus or not.
+ * @param inTouchMode Whether this window is in touch mode or not.
+ */
+ public void setLocalFocus(boolean hasFocus, boolean inTouchMode) { }
+
+ /**
+ * Inject an event to window locally.
+ * @param event A key or touch event to inject to this window.
+ */
+ public void injectInputEvent(InputEvent event) { }
}