Merge "Fix issue #4974633: Block the HOME button using TYPE_KEYGUARD"
This commit is contained in:
committed by
Android (Google) Code Review
commit
7de6578f1c
@@ -2498,6 +2498,10 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
int attrChanges = 0;
|
int attrChanges = 0;
|
||||||
int flagChanges = 0;
|
int flagChanges = 0;
|
||||||
if (attrs != null) {
|
if (attrs != null) {
|
||||||
|
if (win.mAttrs.type != attrs.type) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"Window type can not be changed after the window is added.");
|
||||||
|
}
|
||||||
flagChanges = win.mAttrs.flags ^= attrs.flags;
|
flagChanges = win.mAttrs.flags ^= attrs.flags;
|
||||||
attrChanges = win.mAttrs.copyFrom(attrs);
|
attrChanges = win.mAttrs.copyFrom(attrs);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user