Removing some unused resources

Change-Id: I6aa8a2d7eb4599ed2351c54fe0885839b5ba4521
This commit is contained in:
Sunny Goyal
2015-10-01 14:04:18 -07:00
parent 8220d8afaa
commit 77ccb8d03c
14 changed files with 8 additions and 150 deletions
+6 -15
View File
@@ -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) {