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:
Dianne Hackborn
2009-09-23 22:20:11 -07:00
parent f11cc96ee8
commit ffa424800d
20 changed files with 151 additions and 39 deletions

View File

@@ -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;