mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 13:05:31 +03:00
Fix crash with getting db
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
3f21d8bfbe
commit
8dbd381adb
1 changed files with 9 additions and 2 deletions
|
@ -96,8 +96,15 @@ public final class MainActivity extends AppCompatActivity implements ActionBarPr
|
|||
|
||||
router = Conductor.attachRouter(this, container, savedInstanceState);
|
||||
|
||||
if (!router.hasRootController() && sqlCipherDatabaseSource.getWritableDatabase() != null &&
|
||||
userUtils.anyUserExists()) {
|
||||
boolean hasDb = true;
|
||||
|
||||
try {
|
||||
sqlCipherDatabaseSource.getWritableDatabase();
|
||||
} catch (Exception exception) {
|
||||
hasDb = false;
|
||||
}
|
||||
|
||||
if (!router.hasRootController() && hasDb && userUtils.anyUserExists()) {
|
||||
router.setRoot(RouterTransaction.with(new MagicBottomNavigationController())
|
||||
.pushChangeHandler(new HorizontalChangeHandler())
|
||||
.popChangeHandler(new HorizontalChangeHandler()));
|
||||
|
|
Loading…
Reference in a new issue