OSDN Git Service

installd: parameterize user data snapshots with snapshot_id
authorNikita Ioffe <ioffe@google.com>
Mon, 4 Feb 2019 11:06:37 +0000 (11:06 +0000)
committerNikita Ioffe <ioffe@google.com>
Wed, 20 Feb 2019 23:52:58 +0000 (23:52 +0000)
commitb68f0d14931905472b93ad08a753a01a33bd315b
tree82fddd85d2b9514d8723627d89b0558ec7a0c577
parent9e9aae44a730c0c01b9f4b49949c487612c29817
installd: parameterize user data snapshots with snapshot_id

- snapshot_id will be provided by RollbackManagerService and for a given
  rollback will be equal to its rollback_id.
- snapshotAppData now creates a folder to snapshot data to, in case it
  does not exist.
- removed ceDataInode from restoreAppDataSnapshot API, since it's only
  called if users phone is unlocked, meaning that CE data is available and
  doesn't require inode to be accessed.
- refactored installd_service_test to reduce test set up boilerplate.
- added a test to cover case when snapshots for different packages have
  the same snapshot_id.

Bug: 124029909
Test: installd_utils_test installd_service_test, RollbackTest
Change-Id: I4177a44a60cdfdc5429a28c613ce661b24482b8b
cmds/installd/InstalldNativeService.cpp
cmds/installd/InstalldNativeService.h
cmds/installd/binder/android/os/IInstalld.aidl
cmds/installd/tests/installd_service_test.cpp
cmds/installd/tests/installd_utils_test.cpp
cmds/installd/utils.cpp
cmds/installd/utils.h