When updating workspace items, make sure to not process Folder icons as Workspace items.
Also, in Folder.java the DeviceProfile obtained using the activity, in this case the Activity is TaskbarActivityContext is returning a different DeviceProfile form the Launcher which causes the update. So this triggers an update when is not needed but even if we make a faulty update the workspace should be able to differentiate between workspace item and folder items. This issue was triggered by this flag com.android.window.flags.enable_taskbar_recents_layout_transition . Fix: 407630150 Test: NA Flag: EXEMPT bug fix Change-Id: I255052506e7d198b1384c15ebfe2f6f2753da1ed
This commit is contained in:
1 parent
243e95fd5f
commit
abcc99f015
1 file changed
+6
-1
@@ -76,6 +76,7 @@ import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.DragSource;
|
||||
import com.android.launcher3.DropTarget;
|
||||
import com.android.launcher3.ExtendedEditText;
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.OnAlarmListener;
|
||||
import com.android.launcher3.R;
|
||||
@@ -1141,8 +1142,12 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
|
||||
}
|
||||
|
||||
private void updateItemLocationsInDatabaseBatch(boolean isBind) {
|
||||
// b/409061698 We need to get the DeviceProfile directly from the activity but to fix the
|
||||
// issue we will merge this solution.
|
||||
FolderGridOrganizer verifier = createFolderGridOrganizer(
|
||||
mActivityContext.getDeviceProfile()).setFolderInfo(mInfo);
|
||||
InvariantDeviceProfile.INSTANCE.get(mActivityContext.asContext())
|
||||
.getDeviceProfile(mActivityContext.asContext())
|
||||
).setFolderInfo(mInfo);
|
||||
|
||||
ArrayList<ItemInfo> items = new ArrayList<>();
|
||||
int total = mInfo.getContents().size();
|
||||
|
||||
Reference in new issue
Block a user