Fix issue #2133206: dialogs/menus should auto-dismiss when screen turns off
Lot of infrastructure for more things to go away when "clear system dialogs" happens, and now do this when we turn on the lock screen. Change-Id: I567130296fe47ce82df065ed58ef21b37416ceaf
This commit is contained in:
@@ -3913,6 +3913,20 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
return mPolicy.inKeyguardRestrictedKeyInputMode();
|
||||
}
|
||||
|
||||
public void closeSystemDialogs(String reason) {
|
||||
synchronized(mWindowMap) {
|
||||
for (int i=mWindows.size()-1; i>=0; i--) {
|
||||
WindowState w = (WindowState)mWindows.get(i);
|
||||
if (w.mSurface != null) {
|
||||
try {
|
||||
w.mClient.closeSystemDialogs(reason);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static float fixScale(float scale) {
|
||||
if (scale < 0) scale = 0;
|
||||
else if (scale > 20) scale = 20;
|
||||
|
||||
Reference in New Issue
Block a user