am d7d37b13: DO NOT MERGE Adding sycnhronous loading of current page to support seamless rotation. (Bug 6792288)

* commit 'd7d37b134b7a3b12858ff099069eba369a6b5373':
  DO NOT MERGE Adding sycnhronous loading of current page to support seamless rotation. (Bug 6792288)
This commit is contained in:
Adam Cohen
2012-07-18 20:15:14 -07:00
committed by Android Git Automerger
5 changed files with 693 additions and 449 deletions

View File

@@ -1,4 +1,6 @@
<resources>
<bool name="allow_rotation">true</bool>
<integer name="cell_count_x">6</integer>
<integer name="cell_count_y">6</integer>
<integer name="hotseat_cell_count">7</integer>

View File

@@ -1,7 +1,6 @@
<resources>
<bool name="config_largeHeap">true</bool>
<bool name="is_large_screen">true</bool>
<bool name="allow_rotation">true</bool>
<!-- AllApps/Customize/AppsCustomize -->
<!-- Out of 100, the percent to shrink the workspace during spring loaded mode. -->

View File

@@ -338,6 +338,11 @@ public final class Launcher extends Activity
mAppWidgetHost = new LauncherAppWidgetHost(this, APPWIDGET_HOST_ID);
mAppWidgetHost.startListening();
// If we are getting an onCreate, we can actually preempt onResume and unset mPaused here,
// this also ensures that any synchronous binding below doesn't re-trigger another
// LauncherModel load.
mPaused = false;
if (PROFILE_STARTUP) {
android.os.Debug.startMethodTracing(
Environment.getExternalStorageDirectory() + "/launcher");
@@ -365,7 +370,7 @@ public final class Launcher extends Activity
}
if (!mRestoring) {
mModel.startLoader(true);
mModel.startLoader(true, mWorkspace.getCurrentPage());
}
if (!mModel.isAllAppsLoaded()) {
@@ -677,7 +682,7 @@ public final class Launcher extends Activity
mPaused = false;
if (mRestoring || mOnResumeNeedsLoad) {
mWorkspaceLoading = true;
mModel.startLoader(true);
mModel.startLoader(true, -1);
mRestoring = false;
mOnResumeNeedsLoad = false;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1329,6 +1329,14 @@ public class Workspace extends SmoothPagedView
}
super.onDraw(canvas);
// Call back to LauncherModel to finish binding after the first draw
post(new Runnable() {
@Override
public void run() {
mLauncher.getModel().bindRemainingSynchronousPages();
}
});
}
boolean isDrawingBackgroundGradient() {