[Android] Use Room for customDirectory

Habib Kazemi git at videolan.org
Tue Aug 14 18:32:35 CEST 2018


vlc-android | branch: master | Habib Kazemi <kazemihabib1996 at gmail.com> | Sun Aug 12 14:04:50 2018 +0430| [a74a6a122ca073603209bda99a630450efb8287f] | committer: Geoffrey Métais

Use Room for customDirectory

I added Dao and repository for CustomDirectory and previous
customDirectories will be added to the database in migration.
Also I wrote tests for Dao and Repository and migration

Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>

> https://code.videolan.org/videolan/vlc-android/commit/a74a6a122ca073603209bda99a630450efb8287f
---

 .../vlc/database/CustomDirectoryDaoTest.kt         |  75 ++++++++++++
 .../org/videolan/vlc/database/MigrationTest.kt     |  57 ++++++---
 .../28.json                                        | 135 +++++++++++++++++++++
 .../videolan/vlc/database/CustomDirectoryDao.kt    |  19 +++
 .../src/org/videolan/vlc/database/MediaDatabase.kt |   6 +-
 .../src/org/videolan/vlc/database/Migrations.kt    |  19 +++
 .../vlc/database/models/CustomDirectory.kt         |  11 ++
 .../vlc/repository/BrowserFavRepository.kt         |   2 +-
 .../vlc/repository/CustomDirectoryRepository.kt    |  35 ++++++
 .../test-common/org/videolan/vlc/util/TestUtil.kt  |  12 ++
 .../repository/CustomDirectoryRepositoryTest.kt    | 115 ++++++++++++++++++
 11 files changed, 465 insertions(+), 21 deletions(-)

Diff:   https://code.videolan.org/videolan/vlc-android/commit/a74a6a122ca073603209bda99a630450efb8287f


More information about the Android mailing list