Fixing some invalid checks and cleaning some redundant conditions
am: b740f59c7d
* commit 'b740f59c7d572d54402e3a74fb2a23c0f1b1af48':
Fixing some invalid checks and cleaning some redundant conditions
This commit is contained in:
commit
13f682f74e
8 files changed
+25
-36
No files matched your search
@@ -2304,7 +2304,7 @@ public class Workspace extends PagedView
|
||||
boolean willCreateUserFolder(ItemInfo info, View dropOverView, boolean considerTimeout) {
|
||||
if (dropOverView != null) {
|
||||
CellLayout.LayoutParams lp = (CellLayout.LayoutParams) dropOverView.getLayoutParams();
|
||||
if (lp.useTmpCoords && (lp.tmpCellX != lp.cellX || lp.tmpCellY != lp.tmpCellY)) {
|
||||
if (lp.useTmpCoords && (lp.tmpCellX != lp.cellX || lp.tmpCellY != lp.cellY)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2336,7 +2336,7 @@ public class Workspace extends PagedView
|
||||
boolean willAddToExistingUserFolder(ItemInfo dragInfo, View dropOverView) {
|
||||
if (dropOverView != null) {
|
||||
CellLayout.LayoutParams lp = (CellLayout.LayoutParams) dropOverView.getLayoutParams();
|
||||
if (lp.useTmpCoords && (lp.tmpCellX != lp.cellX || lp.tmpCellY != lp.tmpCellY)) {
|
||||
if (lp.useTmpCoords && (lp.tmpCellX != lp.cellX || lp.tmpCellY != lp.cellY)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2365,7 +2365,7 @@ public class Workspace extends PagedView
|
||||
|
||||
if (v == null || hasntMoved || !mCreateUserFolderOnDrop) return false;
|
||||
mCreateUserFolderOnDrop = false;
|
||||
final long screenId = (targetCell == null) ? mDragInfo.screenId : getIdForScreen(target);
|
||||
final long screenId = getIdForScreen(target);
|
||||
|
||||
boolean aboveShortcut = (v.getTag() instanceof ShortcutInfo);
|
||||
boolean willBecomeShortcut = (newView.getTag() instanceof ShortcutInfo);
|
||||
@@ -3220,11 +3220,11 @@ public class Workspace extends PagedView
|
||||
boolean isWidget = pendingInfo.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET
|
||||
|| pendingInfo.itemType == LauncherSettings.Favorites.ITEM_TYPE_CUSTOM_APPWIDGET;
|
||||
|
||||
View finalView = isWidget ? ((PendingAddWidgetInfo) pendingInfo).boundWidget : null;
|
||||
AppWidgetHostView finalView = isWidget ?
|
||||
((PendingAddWidgetInfo) pendingInfo).boundWidget : null;
|
||||
|
||||
if (finalView instanceof AppWidgetHostView && updateWidgetSize) {
|
||||
AppWidgetHostView awhv = (AppWidgetHostView) finalView;
|
||||
AppWidgetResizeFrame.updateWidgetSizeRanges(awhv, mLauncher, item.spanX,
|
||||
if (finalView != null && updateWidgetSize) {
|
||||
AppWidgetResizeFrame.updateWidgetSizeRanges(finalView, mLauncher, item.spanX,
|
||||
item.spanY);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user