diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-10-01 14:04:18 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-10-05 14:14:19 -0700 |
commit | 77ccb8d03c17aeb32dccfb0930ae974f6cca7455 (patch) | |
tree | 4bd7bc1805278685a23d87bb5b441a953a417d3c /src/com/android/launcher3/Workspace.java | |
parent | 8220d8afaad78fe4ac4e2935193f3789c456ac3a (diff) | |
download | android_packages_apps_Trebuchet-77ccb8d03c17aeb32dccfb0930ae974f6cca7455.tar.gz android_packages_apps_Trebuchet-77ccb8d03c17aeb32dccfb0930ae974f6cca7455.tar.bz2 android_packages_apps_Trebuchet-77ccb8d03c17aeb32dccfb0930ae974f6cca7455.zip |
Removing some unused resources
Change-Id: I6aa8a2d7eb4599ed2351c54fe0885839b5ba4521
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index ada937421..d409cf643 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -116,9 +116,6 @@ public class Workspace extends PagedView @Thunk final WallpaperManager mWallpaperManager; @Thunk IBinder mWindowToken; - private int mOriginalDefaultPage; - private int mDefaultPage; - private ShortcutAndWidgetContainer mDragSourceInternal; @Thunk LongArrayMap<CellLayout> mWorkspaceScreens = new LongArrayMap<>(); @@ -309,14 +306,10 @@ public class Workspace extends PagedView mFadeInAdjacentScreens = false; mWallpaperManager = WallpaperManager.getInstance(context); - TypedArray a = context.obtainStyledAttributes(attrs, - R.styleable.Workspace, defStyle, 0); mSpringLoadedShrinkFactor = res.getInteger(R.integer.config_workspaceSpringLoadShrinkPercentage) / 100.0f; mOverviewModeShrinkFactor = res.getInteger(R.integer.config_workspaceOverviewShrinkPercentage) / 100f; - mOriginalDefaultPage = mDefaultPage = a.getInt(R.styleable.Workspace_defaultScreen, 1); - a.recycle(); setOnHierarchyChangeListener(this); setHapticFeedbackEnabled(false); @@ -423,7 +416,7 @@ public class Workspace extends PagedView * Initializes various states for this workspace. */ protected void initWorkspace() { - mCurrentPage = mDefaultPage; + mCurrentPage = getDefaultPage(); LauncherAppState app = LauncherAppState.getInstance(); DeviceProfile grid = mLauncher.getDeviceProfile(); mIconCache = app.getIconCache(); @@ -445,6 +438,10 @@ public class Workspace extends PagedView setEdgeGlowColor(getResources().getColor(R.color.workspace_edge_effect_color)); } + private int getDefaultPage() { + return numCustomPages(); + } + private void setupLayoutTransition() { // We want to show layout transitions when pages are deleted, to close the gap. mLayoutTransition = new LayoutTransition(); @@ -577,9 +574,6 @@ public class Workspace extends PagedView addFullScreenPage(customScreen); - // Ensure that the current page and default page are maintained. - mDefaultPage = mOriginalDefaultPage + 1; - // Update the custom content hint if (mRestorePage != INVALID_RESTORE_PAGE) { mRestorePage = mRestorePage + 1; @@ -605,9 +599,6 @@ public class Workspace extends PagedView mCustomContentCallbacks = null; - // Ensure that the current page and default page are maintained. - mDefaultPage = mOriginalDefaultPage - 1; - // Update the custom content hint if (mRestorePage != INVALID_RESTORE_PAGE) { mRestorePage = mRestorePage - 1; @@ -4340,7 +4331,7 @@ public class Workspace extends PagedView } void moveToDefaultScreen(boolean animate) { - moveToScreen(mDefaultPage, animate); + moveToScreen(getDefaultPage(), animate); } void moveToCustomContentScreen(boolean animate) { |