Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-android
Commits
8b622bc5
Commit
8b622bc5
authored
6 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
account edition: fix crash if account is not found
Change-Id: I54079635496475073c1efaf54afc42aee962d03d
parent
7ef0e9e6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ring-android/app/src/main/java/cx/ring/account/AccountEditionPresenter.java
+7
-12
7 additions, 12 deletions
...rc/main/java/cx/ring/account/AccountEditionPresenter.java
with
7 additions
and
12 deletions
ring-android/app/src/main/java/cx/ring/account/AccountEditionPresenter.java
+
7
−
12
View file @
8b622bc5
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* Copyright (C) 2004-2018 Savoir-faire Linux Inc.
* Copyright (C) 2004-2018 Savoir-faire Linux Inc.
*
*
* Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
* Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
* Author: Adrien Béraud <adrien.beraud@savoirfairelinux.com>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -18,8 +19,6 @@
...
@@ -18,8 +19,6 @@
*/
*/
package
cx.ring.account
;
package
cx.ring.account
;
import
android.view.View
;
import
javax.inject.Inject
;
import
javax.inject.Inject
;
import
javax.inject.Named
;
import
javax.inject.Named
;
...
@@ -29,29 +28,25 @@ import cx.ring.services.AccountService;
...
@@ -29,29 +28,25 @@ import cx.ring.services.AccountService;
import
io.reactivex.Scheduler
;
import
io.reactivex.Scheduler
;
public
class
AccountEditionPresenter
extends
RootPresenter
<
AccountEditionView
>
{
public
class
AccountEditionPresenter
extends
RootPresenter
<
AccountEditionView
>
{
private
final
AccountService
mAccountService
;
private
static
final
String
TAG
=
RingAccountSummaryPresenter
.
class
.
getSimpleName
();
private
final
Scheduler
mUiScheduler
;
protected
AccountService
mAccountService
;
private
Account
mAccount
;
private
Account
mAccount
;
@Inject
@Named
(
"UiScheduler"
)
protected
Scheduler
mUiScheduler
;
@Inject
@Inject
public
AccountEditionPresenter
(
AccountService
accountService
)
{
public
AccountEditionPresenter
(
AccountService
accountService
,
@Named
(
"UiScheduler"
)
Scheduler
uiScheduler
)
{
mAccountService
=
accountService
;
mAccountService
=
accountService
;
mUiScheduler
=
uiScheduler
;
}
}
public
void
init
(
String
accountId
)
{
public
void
init
(
String
accountId
)
{
final
AccountEditionView
view
=
getView
();
final
AccountEditionView
view
=
getView
();
if
(
accountId
==
null
)
{
mAccount
=
accountId
==
null
?
null
:
mAccountService
.
getAccount
(
accountId
);
if
(
mAccount
==
null
)
{
if
(
view
!=
null
)
if
(
view
!=
null
)
view
.
exit
();
view
.
exit
();
return
;
return
;
}
}
mAccount
=
mAccountService
.
getAccount
(
accountId
);
view
.
displayAccountName
(
mAccount
.
getAlias
());
view
.
displayAccountName
(
mAccount
.
getAlias
());
if
(
mAccount
.
isRing
())
{
if
(
mAccount
.
isRing
())
{
view
.
displaySummary
(
mAccount
.
getAccountID
());
view
.
displaySummary
(
mAccount
.
getAccountID
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment