Do not show overview when menu pressed on CustomContent screen.

Bug: 12524591
Change-Id: I2bc0c4d206214d994c9a9e1bd13b42f2e53dba9f
This commit is contained in:
Yura
2014-02-04 14:15:21 +00:00
parent fc2440566a
commit 4f93ec63b1
+15 -9
View File
@@ -2044,18 +2044,24 @@ public class Launcher extends Activity
}
}
public boolean isOnCustomContent() {
return mWorkspace.isOnOrMovingToCustomContent();
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
// Close any open folders
closeFolder();
// Stop resizing any widgets
mWorkspace.exitWidgetResizeMode();
if (!mWorkspace.isInOverviewMode()) {
// Show the overview mode
showOverviewMode(true);
} else {
showWorkspace(true);
if (!isOnCustomContent()) {
// Close any open folders
closeFolder();
// Stop resizing any widgets
mWorkspace.exitWidgetResizeMode();
if (!mWorkspace.isInOverviewMode()) {
// Show the overview mode
showOverviewMode(true);
} else {
showWorkspace(true);
}
}
return false;
}