Merge "Remove special code path for not animating folder open in power save mode" into ub-launcher3-calgary
This commit is contained in:
@@ -2727,7 +2727,7 @@ public class Launcher extends Activity
|
|||||||
FolderIcon folderIcon = (FolderIcon) v;
|
FolderIcon folderIcon = (FolderIcon) v;
|
||||||
if (!folderIcon.getFolderInfo().opened && !folderIcon.getFolder().isDestroyed()) {
|
if (!folderIcon.getFolderInfo().opened && !folderIcon.getFolder().isDestroyed()) {
|
||||||
// Open the requested folder
|
// Open the requested folder
|
||||||
openFolder(folderIcon, true);
|
openFolder(folderIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mLauncherCallbacks != null) {
|
if (mLauncherCallbacks != null) {
|
||||||
@@ -3002,7 +3002,7 @@ public class Launcher extends Activity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void growAndFadeOutFolderIcon(FolderIcon fi, boolean animate) {
|
private void growAndFadeOutFolderIcon(FolderIcon fi) {
|
||||||
if (fi == null) return;
|
if (fi == null) return;
|
||||||
FolderInfo info = (FolderInfo) fi.getTag();
|
FolderInfo info = (FolderInfo) fi.getTag();
|
||||||
if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
|
if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
|
||||||
@@ -3022,9 +3022,6 @@ public class Launcher extends Activity
|
|||||||
}
|
}
|
||||||
oa.setDuration(getResources().getInteger(R.integer.config_folderExpandDuration));
|
oa.setDuration(getResources().getInteger(R.integer.config_folderExpandDuration));
|
||||||
oa.start();
|
oa.start();
|
||||||
if (!animate) {
|
|
||||||
oa.end();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void shrinkAndFadeInFolderIcon(final FolderIcon fi, boolean animate) {
|
private void shrinkAndFadeInFolderIcon(final FolderIcon fi, boolean animate) {
|
||||||
@@ -3064,8 +3061,7 @@ public class Launcher extends Activity
|
|||||||
*
|
*
|
||||||
* @param folderIcon The FolderIcon describing the folder to open.
|
* @param folderIcon The FolderIcon describing the folder to open.
|
||||||
*/
|
*/
|
||||||
public void openFolder(FolderIcon folderIcon, boolean animate) {
|
public void openFolder(FolderIcon folderIcon) {
|
||||||
animate &= !Utilities.isPowerSaverOn(this);
|
|
||||||
|
|
||||||
Folder folder = folderIcon.getFolder();
|
Folder folder = folderIcon.getFolder();
|
||||||
Folder openFolder = mWorkspace != null ? mWorkspace.getOpenFolder() : null;
|
Folder openFolder = mWorkspace != null ? mWorkspace.getOpenFolder() : null;
|
||||||
@@ -3090,12 +3086,9 @@ public class Launcher extends Activity
|
|||||||
Log.w(TAG, "Opening folder (" + folder + ") which already has a parent (" +
|
Log.w(TAG, "Opening folder (" + folder + ") which already has a parent (" +
|
||||||
folder.getParent() + ").");
|
folder.getParent() + ").");
|
||||||
}
|
}
|
||||||
if (animate) {
|
folder.animateOpen();
|
||||||
folder.animateOpen();
|
|
||||||
} else {
|
growAndFadeOutFolderIcon(folderIcon);
|
||||||
folder.open();
|
|
||||||
}
|
|
||||||
growAndFadeOutFolderIcon(folderIcon, animate);
|
|
||||||
|
|
||||||
// Notify the accessibility manager that this folder "window" has appeared and occluded
|
// Notify the accessibility manager that this folder "window" has appeared and occluded
|
||||||
// the workspace items
|
// the workspace items
|
||||||
|
|||||||
@@ -644,29 +644,6 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
|
|||||||
mContent.verifyVisibleHighResIcons(mContent.getNextPage());
|
mContent.verifyVisibleHighResIcons(mContent.getNextPage());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Opens the folder without any animation
|
|
||||||
*/
|
|
||||||
public void open() {
|
|
||||||
if (!(getParent() instanceof DragLayer)) return;
|
|
||||||
|
|
||||||
mContent.completePendingPageChanges();
|
|
||||||
if (!mDragInProgress) {
|
|
||||||
// Open on the first page.
|
|
||||||
mContent.snapToPageImmediately(0);
|
|
||||||
}
|
|
||||||
centerAboutIcon();
|
|
||||||
mFolderName.setTranslationX(0);
|
|
||||||
mContent.setMarkerScale(1);
|
|
||||||
|
|
||||||
// Make sure the folder picks up the last drag move even if the finger doesn't move.
|
|
||||||
if (mDragController.isDragging()) {
|
|
||||||
mDragController.forceTouchMove();
|
|
||||||
}
|
|
||||||
|
|
||||||
mContent.verifyVisibleHighResIcons(mContent.getNextPage());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void beginExternalDrag(ShortcutInfo item) {
|
public void beginExternalDrag(ShortcutInfo item) {
|
||||||
mCurrentDragInfo = item;
|
mCurrentDragInfo = item;
|
||||||
mEmptyCellRank = mContent.allocateRankForNewItem(item);
|
mEmptyCellRank = mContent.allocateRankForNewItem(item);
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ public class FolderIcon extends FrameLayout implements FolderListener {
|
|||||||
item = (ShortcutInfo) mDragInfo;
|
item = (ShortcutInfo) mDragInfo;
|
||||||
}
|
}
|
||||||
mFolder.beginExternalDrag(item);
|
mFolder.beginExternalDrag(item);
|
||||||
mLauncher.openFolder(FolderIcon.this, true);
|
mLauncher.openFolder(FolderIcon.this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user