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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-android
Commits
8b622bc5
Commit
8b622bc5
authored
Dec 9, 2018
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
No related branches found
No related tags found
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 @@
* Copyright (C) 2004-2018 Savoir-faire Linux Inc.
*
* 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
* it under the terms of the GNU General Public License as published by
...
...
@@ -18,8 +19,6 @@
*/
package
cx.ring.account
;
import
android.view.View
;
import
javax.inject.Inject
;
import
javax.inject.Named
;
...
...
@@ -29,29 +28,25 @@ import cx.ring.services.AccountService;
import
io.reactivex.Scheduler
;
public
class
AccountEditionPresenter
extends
RootPresenter
<
AccountEditionView
>
{
private
static
final
String
TAG
=
RingAccountSummaryPresenter
.
class
.
getSimpleName
();
protected
AccountService
mAccountService
;
private
final
AccountService
mAccountService
;
private
final
Scheduler
mUiScheduler
;
private
Account
mAccount
;
@Inject
@Named
(
"UiScheduler"
)
protected
Scheduler
mUiScheduler
;
@Inject
public
AccountEditionPresenter
(
AccountService
accountService
)
{
public
AccountEditionPresenter
(
AccountService
accountService
,
@Named
(
"UiScheduler"
)
Scheduler
uiScheduler
)
{
mAccountService
=
accountService
;
mUiScheduler
=
uiScheduler
;
}
public
void
init
(
String
accountId
)
{
final
AccountEditionView
view
=
getView
();
if
(
accountId
==
null
)
{
mAccount
=
accountId
==
null
?
null
:
mAccountService
.
getAccount
(
accountId
);
if
(
mAccount
==
null
)
{
if
(
view
!=
null
)
view
.
exit
();
return
;
}
mAccount
=
mAccountService
.
getAccount
(
accountId
);
view
.
displayAccountName
(
mAccount
.
getAlias
());
if
(
mAccount
.
isRing
())
{
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