summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r--src/com/android/launcher3/Launcher.java35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index ab3f1daa0..997e28fef 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -287,7 +287,7 @@ public class Launcher extends Activity
private View mAllAppsButton;
- private SearchDropTargetBar mSearchDropTargetBar;
+ protected SearchDropTargetBar mSearchDropTargetBar;
private AppsCustomizeLayout mAppsCustomizeLayout;
private AppsCustomizePagedView mAppsCustomizeContent;
private boolean mAutoAdvanceRunning = false;
@@ -306,6 +306,8 @@ public class Launcher extends Activity
private boolean mWorkspaceLoading = true;
+ private boolean mDynamicGridUpdateRequired = false;
+
private boolean mPaused = true;
private boolean mRestoring;
private boolean mWaitingForResult;
@@ -427,8 +429,6 @@ public class Launcher extends Activity
public void onReceive(Context context, Intent intent) {
// Update the workspace
updateDynamicGrid();
- mWorkspace.hideOutlines();
- mSearchDropTargetBar.showSearchBar(false);
}
};
@@ -1060,6 +1060,9 @@ public class Launcher extends Activity
}
super.onResume();
+
+ updateGridIfNeeded();
+
if(isGelIntegrationEnabled() && isGelIntegrationSupported()) {
GelIntegrationHelper.getInstance().handleGelResume();
}
@@ -1194,9 +1197,6 @@ public class Launcher extends Activity
if (mWorkspace.getCustomContentCallbacks() != null) {
mWorkspace.getCustomContentCallbacks().onHide();
}
-
- //Reset the OverviewPanel position
- ((SlidingUpPanelLayout) mOverviewPanel).collapsePane();
}
QSBScroller mQsbScroller = new QSBScroller() {
@@ -2116,6 +2116,8 @@ public class Launcher extends Activity
}
super.onNewIntent(intent);
+ updateGridIfNeeded();
+
// Close the menu
if (Intent.ACTION_MAIN.equals(intent.getAction())) {
// also will cancel mWaitingForResult.
@@ -4924,17 +4926,30 @@ public class Launcher extends Activity
}
public void updateDynamicGrid() {
- mSearchDropTargetBar.setupQSB(this);
- mSearchDropTargetBar.hideSearchBar(false);
+ mSearchDropTargetBar.setupQSB(Launcher.this);
initializeDynamicGrid();
- mGrid.layout(this);
- mWorkspace.showOutlines();
+ mGrid.layout(Launcher.this);
// Synchronized reload
mModel.startLoader(true, mWorkspace.getCurrentPage());
mWorkspace.updateCustomContentVisibility();
+
+ }
+
+ public void setUpdateDynamicGrid() {
+ mDynamicGridUpdateRequired = true;
+ }
+
+ public boolean updateGridIfNeeded() {
+ if (mDynamicGridUpdateRequired) {
+ updateDynamicGrid();
+ mDynamicGridUpdateRequired = false;
+ return true;
+ }
+
+ return false;
}
public boolean isSearchBarEnabled() {