OSDN Git Service

Do updateWorkspaceScreenOrder inside a single transaction.
authorYura <yura@google.com>
Tue, 11 Feb 2014 15:15:29 +0000 (15:15 +0000)
committerYura <yura@google.com>
Tue, 11 Feb 2014 15:15:29 +0000 (15:15 +0000)
commit085c853a5702c45865e9b017d21fa15cf2b151b9
treee9e367aea2ff7ca572bfd5dcc91975c506af7137
parentec0d61d79ef50010660b426b259a8ccb14656b31
Do updateWorkspaceScreenOrder inside a single transaction.

The workspacescreens table is updated in LauncherModel.updateWorkspaceScreenOrder
and that the operation to remove all screens, then reinsert the new list of
screens in not inside a single transaction, so if the app is updating or
crashes between ContentResolver.delete and ContentResolver.bulkInsert then
the data will be lost. This CL makes it all happen inside 1 transaction.

Bug: 12523285
Change-Id: I409dbc9f48fa9c8bd4bf3b1453204a4daac1689a
src/com/android/launcher3/LauncherModel.java
src/com/android/launcher3/LauncherProvider.java