Add logs and prevent collissions when adding items
-AddWorkspaceItemsTask can add multiple items to the same position, we avoid that here by adding each item to the database before processing the next item. -We add more logs to InstallSessionHelper to be able to check who the installer is Bug: 432237485, 425754534 Test: AddWorkspaceItemsTaskTest Flag: EXEMPT bugfix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4b439e999734852a017ce662543b4789b36e0e3b) Merged-In: I2d238f3eb27734ab9cb723e2fe9d6752c5921dd1 Change-Id: I2d238f3eb27734ab9cb723e2fe9d6752c5921dd1
This commit is contained in:
1 parent
02aa11510d
commit
df328e5dfa
6 files changed
+71
-15
No files matched your search
@@ -21,6 +21,7 @@ import com.android.launcher3.InvariantDeviceProfile
|
||||
import com.android.launcher3.LauncherAppState
|
||||
import com.android.launcher3.LauncherModel
|
||||
import com.android.launcher3.model.data.AppInfo
|
||||
import com.android.launcher3.model.data.ItemInfo
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo
|
||||
import com.android.launcher3.util.GridOccupancy
|
||||
import com.android.launcher3.util.IntArray
|
||||
@@ -50,6 +51,7 @@ abstract class AbstractWorkspaceModelTest {
|
||||
protected lateinit var mAppState: LauncherAppState
|
||||
protected lateinit var mExistingScreens: IntArray
|
||||
protected lateinit var mNewScreens: IntArray
|
||||
protected lateinit var mAddedWorkspaceItems: ArrayList<ItemInfo>
|
||||
protected lateinit var mScreenOccupancy: IntSparseArrayMap<GridOccupancy>
|
||||
|
||||
val model: LauncherModel
|
||||
@@ -64,6 +66,7 @@ abstract class AbstractWorkspaceModelTest {
|
||||
mExistingScreens = IntArray()
|
||||
mScreenOccupancy = IntSparseArrayMap()
|
||||
mNewScreens = IntArray()
|
||||
mAddedWorkspaceItems = ArrayList()
|
||||
}
|
||||
|
||||
/** Sets up workspaces with the given screen IDs with some items and a 2x2 space. */
|
||||
|
||||
Reference in new issue
Block a user