diff options
author | Michael Jurka <mikejurka@google.com> | 2011-07-27 22:56:52 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-27 22:56:52 -0700 |
commit | 292bffbdc8bf1c9110c0ef9fcd4fedc5f002c9e4 (patch) | |
tree | e1f2c0399519bc93434c68fb3ca166762e1cae55 /src/com | |
parent | 365055f289bc9c3c730f1dcf26c99afc6d8b31c5 (diff) | |
parent | 99633da90012dc732cbc12a96b33e17abcecb464 (diff) | |
download | android_packages_apps_Trebuchet-292bffbdc8bf1c9110c0ef9fcd4fedc5f002c9e4.tar.gz android_packages_apps_Trebuchet-292bffbdc8bf1c9110c0ef9fcd4fedc5f002c9e4.tar.bz2 android_packages_apps_Trebuchet-292bffbdc8bf1c9110c0ef9fcd4fedc5f002c9e4.zip |
Merge "Fix bug where Launcher would appear all black"
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 37 | ||||
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 21 |
2 files changed, 8 insertions, 50 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 0f302a012..1cf558bc5 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -212,12 +212,6 @@ public final class Launcher extends Activity private static HashMap<Long, FolderInfo> sFolders = new HashMap<Long, FolderInfo>(); - // Hotseats (quick-launch icons next to AllApps) - private String[] mHotseatConfig = null; - private Intent[] mHotseats = null; - private Drawable[] mHotseatIcons = null; - private CharSequence[] mHotseatLabels = null; - private Intent mAppMarketIntent = null; // Related to the auto-advancing of widgets @@ -436,16 +430,6 @@ public final class Launcher extends Activity } } - // Note: This doesn't do all the client-id magic that BrowserProvider does - // in Browser. (http://b/2425179) - private Uri getDefaultBrowserUri() { - String url = getString(R.string.default_browser_url); - if (url.indexOf("{CID}") != -1) { - url = url.replace("{CID}", "android-google"); - } - return Uri.parse(url); - } - /** * Returns whether we should delay spring loaded mode -- for shortcuts and widgets that have * a configuration step, this allows the proper animations to run after other transitions. @@ -1922,27 +1906,6 @@ public final class Launcher extends Activity showDialog(DIALOG_CREATE_SHORTCUT); } - private void pickShortcut() { - // Insert extra item to handle picking application - Bundle bundle = new Bundle(); - - ArrayList<String> shortcutNames = new ArrayList<String>(); - shortcutNames.add(getString(R.string.group_applications)); - bundle.putStringArrayList(Intent.EXTRA_SHORTCUT_NAME, shortcutNames); - - ArrayList<ShortcutIconResource> shortcutIcons = new ArrayList<ShortcutIconResource>(); - shortcutIcons.add(ShortcutIconResource.fromContext(Launcher.this, - R.drawable.ic_launcher_application)); - bundle.putParcelableArrayList(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, shortcutIcons); - - Intent pickIntent = new Intent(Intent.ACTION_PICK_ACTIVITY); - pickIntent.putExtra(Intent.EXTRA_INTENT, new Intent(Intent.ACTION_CREATE_SHORTCUT)); - pickIntent.putExtra(Intent.EXTRA_TITLE, getText(R.string.title_select_shortcut)); - pickIntent.putExtras(bundle); - - startActivityForResult(pickIntent, REQUEST_PICK_SHORTCUT); - } - private class RenameFolder { private EditText mInput; diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index e4865c20b..10b218a31 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -142,7 +142,6 @@ public class Workspace extends SmoothPagedView private int[] mTempEstimate = new int[2]; private float[] mDragViewVisualCenter = new float[2]; private float[] mTempDragCoordinates = new float[2]; - private float[] mTempTouchCoordinates = new float[2]; private float[] mTempCellLayoutCenterCoordinates = new float[2]; private float[] mTempDragBottomRightCoordinates = new float[2]; private Matrix mTempInverseMatrix = new Matrix(); @@ -1290,12 +1289,6 @@ public class Workspace extends SmoothPagedView } } - private boolean childLayersEnabled() { - boolean isSmallOrSpringloaded = - isSmall() || mIsSwitchingState || mState == State.SPRING_LOADED; - return isSmallOrSpringloaded || isPageMoving() || mIsDragOccuring; - } - private void updateChildrenLayersEnabled() { boolean small = isSmall() || mIsSwitchingState || mState == State.SPRING_LOADED; @@ -1713,6 +1706,14 @@ public class Workspace extends SmoothPagedView } void unshrink(boolean animated, boolean springLoaded) { + if (mFirstLayout) { + // (mFirstLayout == "first layout has not happened yet") + // cancel any pending shrinks that were set earlier + mSwitchStateAfterFirstLayout = false; + mStateAfterFirstLayout = State.NORMAL; + return; + } + if (isSmall()) { float finalScaleFactor = 1.0f; float finalBackgroundAlpha = 0.0f; @@ -2058,7 +2059,6 @@ public class Workspace extends SmoothPagedView final Bitmap b = createDragBitmap(child, new Canvas(), bitmapPadding); final int bmpWidth = b.getWidth(); - final int bmpHeight = b.getHeight(); mLauncher.getDragLayer().getLocationInDragLayer(child, mTempXY); final int dragLayerX = (int) mTempXY[0] + (child.getWidth() - bmpWidth) / 2; @@ -2778,8 +2778,6 @@ public class Workspace extends SmoothPagedView // Identify whether we have dragged over a side page if (isSmall()) { - int left = d.x - d.xOffset; - int top = d.y - d.yOffset; layout = findMatchingPageForDragOver(d.dragView, mDragViewVisualCenter[0], mDragViewVisualCenter[1], true); if (layout != mDragTargetLayout) { @@ -3109,7 +3107,6 @@ public class Workspace extends SmoothPagedView } public void resetTransitionTransform(CellLayout layout) { if (isSwitchingState()) { - int index = indexOfChild(layout); mCurrentScaleX = layout.getScaleX(); mCurrentScaleY = layout.getScaleY(); mCurrentTranslationX = layout.getTranslationX(); @@ -3340,7 +3337,6 @@ public class Workspace extends SmoothPagedView int count = layout.getChildCount(); for (int i = 0; i < count; i++) { View child = layout.getChildAt(i); - CellLayout.LayoutParams lp = (CellLayout.LayoutParams) child.getLayoutParams(); if (child instanceof Folder) { Folder f = (Folder) child; if (f.getInfo() == tag && f.getInfo().opened) { @@ -3380,7 +3376,6 @@ public class Workspace extends SmoothPagedView } void removeItems(final ArrayList<ApplicationInfo> apps) { - final int screenCount = getChildCount(); final AppWidgetManager widgets = AppWidgetManager.getInstance(getContext()); final HashSet<String> packageNames = new HashSet<String>(); |